OPEN-SOURCE SCRIPT

Market Structure - By Leviathan

Updated
This indicator helps you identify market structure by plotting swing highs and lows (HH, LH, HL, LL), BOS/CHOCH and 0.5 retracement levels. Other functionalities will be added in future updates.

Indicator Settings Overview

SWING LENGTH
The number of leftbars and rightbars when searching for swing points. The lower the value, the more swing points are shown and the higher the value, the less swing points are shown. I suggest adjusting it to fit your style and when switching between different timeframes.

BOS CONFIRMATION
Choose whether a Break of Structure is determined by a candle close or a wick breaching previous swing point. Using the "Wick" confirmation option will result in more breaks of structure.

CHOCH
Turning this ON renames the first counter trend Break of Structure (BOS) to CHoCH (Change of Character) and therefore signaling a possible trend shift.

SHOW 0.5 RETRACEMENT LEVEL
This will show a level halfway between a swing low and a swing high of an expansion move, which can act as an approximate retracement point if the trend continues.
In uptrends, 0.5 level is drawn between Higher Lows (HL) and Higher Highs ( HHs ). Long entries can be placed around that level if you suspect that the uptrend will continue.
In downtrends, 0.5 level is drawn between Lower Highs (LH) and Lower Lows (LLs). Short entries can be placed around that level if you suspect that the downtrend will continue.
Release Notes
Added an option to show or hide swing points (HH, LH, HL, LL).
BOSchochmarketstructurepivotPivot points and levelsretracementswingpointsTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Register to support free indicators:
BYBIT: partner.bybit.com/b/Leviathan
WOO X: referral.woo.org/7MY2
Also on:

Disclaimer