OPEN-SOURCE SCRIPT

VASA Market Structure + Sessions

714
A clean read of market structure: confirmed swing highs and lows, Break of Structure (BOS) and Change of Character (CHoCH) labels when price closes through the last confirmed swing, session shading for Asia / London / New York, and prior-day and prior-week high/low.

How it works: swings are pivots that require a set number of candles to close on each side before they count. BOS/CHoCH fire only when a candle closes beyond the last confirmed swing — above the last swing high, or below the last swing low; a break that continues the prior direction is a BOS, a break that reverses it is a CHoCH. Prior high/low are read from the last fully closed daily and weekly bars using a non-repainting higher-timeframe request, so today's levels do not shift as the current bar moves.

How to use: use structure for context — trade with the direction of the most recent BOS and treat a CHoCH as an early warning that the trend may be turning. The session shading marks when volatility typically arrives (the London and New York opens especially); prior-day and prior-week levels act as targets and reaction points.

Non-repainting: swings are confirmed pivots, BOS/CHoCH fire on closed breaks, and prior levels use closed higher-timeframe values — nothing redraws.

Educational only — not financial advice. Trading involves substantial risk of loss.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.