OPEN-SOURCE SCRIPT
已更新

Market Structure CH / BOS

880
Market Structure CH / BOS
Automatic intraday market structure mapping — Change of Character (CH) and Break of Structure (BOS) — built for the New York regular session.

This indicator tracks the live trend structure of any intraday chart using a state machine that follows two key levels at all times:

BOS (Break of Structure): the most recent structural extreme in the direction of the trend. A close beyond it confirms trend continuation.
CH (Change of Character): the origin of the current impulse. A close beyond it flips the structure to the opposite direction.
In a bearish structure the CH sits above and the BOS below; in a bullish structure it's mirrored.

How it works
Closes only. Wicks never break a level — only a confirmed candle close validates a BOS or a CH break. Nothing is decided on the in-progress candle.
Daily reset. The indicator works exclusively during the 09:30–15:59 New York regular session. The 09:30 candle sets the initial range, logic starts at 09:31, and everything is cleared and reinitialized at the next day's open. Outside the session, structure and drawings freeze.
Initialization. While direction is undefined, the day's running high/low are tracked. The first close below the opening low starts a bearish structure (and the first close above the opening high, a bullish one).
Continuation (BOS break): the BOS moves to the new extreme. The CH only advances if the prior pullback was significant.
Flip (CH break): the structure reverses, and the new CH is anchored to the absolute extreme of the finished phase — where the reversal impulse was actually born.
Minimum Pullback Filter
A standout feature: the Minimum Retracement (%) input. Small, single-candle dips inside the same impulse used to drag the CH around incorrectly. This filter measures each pullback as a percentage of the CH→BOS leg and only moves the CH when the retracement is real:

A ~63% rebound → moves the CH.
A ~20% dip → ignored as noise.
Configurable from 10% to 90% (default 35%).
Inputs
Regular session — session window (default 0930–1600 NY).
CH / BOS colors and line thickness (1–4).
Line extension — how many candles forward the levels project (default 15).
Minimum retracement (%) — the pullback filter described above.
Notes
Designed for intraday timeframes only.
Only the active CH/BOS pair is shown; previous levels are removed to keep the chart clean.
Times are fixed to the America/New_York timezone regardless of your chart's local time.
發行說明
Settings in english
發行說明
Added time zone as input
發行說明
little fix
發行說明
Update in timezone
發行說明
fix

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。