Market Structure, Breaks, and Higher-Timeframe Supply and Demand Zones
Summary
This Pine Script indicator and strategy organizes price action around pivot highs and lows. It labels successive highs as higher highs or lower highs and lows as higher lows or lower lows, then marks closes that cross the most recently identified pivot level. Depending on its stored trend state, a break is labeled a break of structure or a change of character.
The script also requests pivot and candle data from a configurable higher timeframe, defaulting to four hours, and begins drawing supply or demand zones from those pivots. Its inputs include pivot strength, ATR length, a minimum fair-value-gap size, an order-block lookback, and ATR-based stop and target distances; display controls cover gaps, blocks, structure breaks, zones, and swing labels. The provided document ends partway through the source, so later rules and order behavior cannot be assessed. It gives no backtest results or evidence that these structure labels and zones predict profitable trades; pivot confirmation also necessarily uses bars after the turning point.
Key ideas
- Pivot highs and lows are classified as higher or lower relative to the preceding confirmed pivots.
- A close crossing the latest pivot level is labeled according to the script’s stored trend state.
- Higher-timeframe pivots and candle values are used to construct supply and demand zones.
- The script exposes ATR, gap, and order-block parameters, but the excerpt does not show all implementation details.
- No performance results are supplied, and pivot confirmation can occur after the apparent turning point.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.