OPEN-SOURCE SCRIPT

Multi Timeframe Market Structure Continuation

213
Overview

This indicator identifies Break of Structure (BOS) and Change of Character (ChoCh) patterns using multi-timeframe (MTF) analysis to filter high-probability trade setups. By aligning lower timeframe signals with higher timeframe bias, it helps traders enter positions in the direction of the dominant trend while avoiding counter-trend traps.

Multi-Timeframe Analysis
The indicator analyzes market structure on two timeframes simultaneously:

Current Timeframe (CTF): Detects immediate BOS and ChoCh signals for entry timing
Higher Timeframe (HTF): Establishes the overall trend direction (default: 1H, customizable)

Signals only appear when the current timeframe structure aligns with the higher timeframe bias, ensuring you're trading with the momentum, not against it.

Break of Structure (BOS)
BOS signals indicate trend continuation - when price breaks a previous high in an uptrend or a previous low in a downtrend. These are reliable entries that confirm the trend is still active and strong.

Change of Character (ChoCh)
ChoCh signals mark early trend reversals - when market structure shifts from bearish to bullish (or vice versa). When captured in alignment with the higher timeframe trend, ChoCh entries can achieve exceptional risk-to-reward ratios as they allow entry near the beginning of a new impulse move.

Exit Signals
Exit signals are plotted when a ChoCh occurs in the opposite direction of the HTF trend. For example, if the HTF is bullish and a bearish ChoCh forms on the current timeframe, an orange "EXIT" signal appears - warning long traders that the lower timeframe structure is shifting against them. This provides an early warning system to protect profits or minimize losses before the HTF trend itself reverses.

Trading Strategy Recommendations
Trending Markets (Recommended)

In strong trending conditions, both BOS and ChoCh signals can be taken when aligned with the HTF bias. ChoCh entries are particularly powerful as they catch early reversals within the larger trend, offering entries with tight stop losses and extended profit targets.

Ranging Markets
During consolidation or choppy conditions, it's best to be selective and take only BOS entries. BOS signals confirm that the trend is continuing beyond the range, reducing false breakouts and whipsaw trades that are common with counter-trend ChoCh signals in sideways markets.

Customization
Pivot Length: Adjust the sensitivity of structure detection (default: 5). Lower values detect structure more frequently with earlier but potentially noisier signals. Higher values provide cleaner, more significant structural breaks but with some delay.

Higher Timeframe: Customize the HTF to suit your trading style. Day traders might use 1H HTF on 5m charts, while swing traders could use 4H or Daily HTF.

Alert System

Six alert conditions available:

  • Long BOS Entry / Long ChoCh Entry
  • Short BOS Entry / Short ChoCh Entry
  • Long Exit / Short Exit


All alerts fire only on confirmed candle closes to eliminate repainting and false signals.


Visual Features

  • Color-coded background showing HTF bias
  • Clear BOS/ChoCh labels with horizontal lines at structure levels
  • Orange "EXIT" signals when structure breaks against your position
  • Gray lines tracking current swing highs/lows
  • HTF trend indicator in the top-right corner

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.