Market Structure BOS CHoCH [GapAlgo]

This indicator maps market structure the way price action traders read it by hand: it labels every confirmed swing as a higher high, lower high, higher low or lower low, then marks the moment price breaks a swing. A break in the direction of the current structure is a Break of Structure (BOS). The first break against it is a Change of Character (CHoCH), which flips the structure from bullish to bearish or back. Candles are colored by the current structure, so the trend reads at a glance on any market and any timeframe.
After every break the script also projects two levels. The strong level is the extreme of the leg that produced the break, found by scanning back to the swing that was broken: in a bullish structure it is the low buyers defended, and a close below it would be the next CHoCH. The weak level is the running extreme since the break, the next level the trend has to take out. Both extend to the right of the last bar and update as new breaks print.
Nothing here is drawn in hindsight. A swing is only confirmed after Swing Length bars on each side, and it is labeled at its own bar only once that confirmation is complete. Breaks are evaluated on closed candles only, so a BOS or CHoCH that appears on the chart does not disappear. A newly confirmed swing can never be broken on the same bar it confirms, because by definition every bar after it traded below it (or above it for a low).
Break Confirmation set to Candle Close requires a candle to close beyond the swing, which ignores wicks that only run stops. Wick counts any trade beyond the swing and reacts sooner, at the cost of more breaks that reverse.
Settings
Structure
Display
Dashboard
Alerts
Bullish BOS, Bearish BOS, Bullish CHoCH, Bearish CHoCH, and Any structure break. All alerts fire once a candle closes.
How to use it
A bullish structure with the latest break a BOS means buyers are still making higher highs. A CHoCH is the first sign that has changed, not a guarantee that it has. Many traders wait for a CHoCH on a higher timeframe before taking breaks in the new direction on a lower one. The strong level is where the current read is proven wrong.
This indicator describes what price has done. It does not predict what it will do next and is not financial advice.
After every break the script also projects two levels. The strong level is the extreme of the leg that produced the break, found by scanning back to the swing that was broken: in a bullish structure it is the low buyers defended, and a close below it would be the next CHoCH. The weak level is the running extreme since the break, the next level the trend has to take out. Both extend to the right of the last bar and update as new breaks print.
Nothing here is drawn in hindsight. A swing is only confirmed after Swing Length bars on each side, and it is labeled at its own bar only once that confirmation is complete. Breaks are evaluated on closed candles only, so a BOS or CHoCH that appears on the chart does not disappear. A newly confirmed swing can never be broken on the same bar it confirms, because by definition every bar after it traded below it (or above it for a low).
Break Confirmation set to Candle Close requires a candle to close beyond the swing, which ignores wicks that only run stops. Wick counts any trade beyond the swing and reacts sooner, at the cost of more breaks that reverse.
Settings
Structure
- Swing Length: Bars on each side that confirm a swing high or low. Larger values follow bigger swings and give fewer, more significant breaks.
- Break Confirmation: Candle Close or Wick, as described above.
Display
- Show HH / HL / LH / LL Labels: Labels each confirmed swing against the previous swing on the same side.
- Show BOS / CHoCH Lines: Draws a line from the broken swing to the breaking candle. BOS lines are dashed, CHoCH lines are solid.
- Show Strong and Weak Levels: Projects the strong and weak level from the latest break.
- Color Candles by Structure: Bullish, bearish or neutral (before the first break).
- Tint Background by Structure: A light background tint in the structure color.
Dashboard
- Shows the current structure, the last break and how many bars ago it printed, the strong level and the swing settings in use.
Alerts
Bullish BOS, Bearish BOS, Bullish CHoCH, Bearish CHoCH, and Any structure break. All alerts fire once a candle closes.
How to use it
A bullish structure with the latest break a BOS means buyers are still making higher highs. A CHoCH is the first sign that has changed, not a guarantee that it has. Many traders wait for a CHoCH on a higher timeframe before taking breaks in the new direction on a lower one. The strong level is where the current read is proven wrong.
This indicator describes what price has done. It does not predict what it will do next and is not financial advice.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.