OPEN-SOURCE SCRIPT
Updated Equal & Relative Equal Highs/Lows

This indicator plots horizontal lines between equal highs and lows and relative equal highs and lows.
This tool is ideal for spotting equal & relative highs/lows (a classic price action concept), swing failure patterns, support/resistance zones based on liquidity, and areas where the market has previously shown equilibrium.
Price tends to create these highs and lows, as a zone of liquidity in which price will return to and sweep similar to the devils mark concept.
Key Features
--------------------
- Equal Lows (default: white lines) – Connects the current bar's low with the most recent prior low that matches it.
- Equal Highs (default: yellow lines) – Connects the current bar's high with the most recent prior high that matches it.
- Two Matching Modes:
-- Exact – Requires identical price levels.
-- Relative – Allows tolerance in ticks (1–3 ticks) for near-equal levels.
Conditions
-------------------
- Lines are drawn only when no lower low (for lows) or higher high (for highs) has occurred between the two matching bars — ensuring the level remains relevant.
- Lines are automatically removed once price sweeps through them (price closes below an equal-low line or above an equal-high line).
Settings
-------------------
- Max bars between equal levels – How far back to search for matching highs/lows (default 500).
- Max stored lines (per side) – Limits memory usage and clutter (default 100).
- Equal level matching – Exact or Relative mode.
- Relative tolerance (ticks) – Adjustable precision in Relative mode.
- Line colors & width – Fully customizable.
This tool is ideal for spotting equal & relative highs/lows (a classic price action concept), swing failure patterns, support/resistance zones based on liquidity, and areas where the market has previously shown equilibrium.
Price tends to create these highs and lows, as a zone of liquidity in which price will return to and sweep similar to the devils mark concept.
Key Features
--------------------
- Equal Lows (default: white lines) – Connects the current bar's low with the most recent prior low that matches it.
- Equal Highs (default: yellow lines) – Connects the current bar's high with the most recent prior high that matches it.
- Two Matching Modes:
-- Exact – Requires identical price levels.
-- Relative – Allows tolerance in ticks (1–3 ticks) for near-equal levels.
Conditions
-------------------
- Lines are drawn only when no lower low (for lows) or higher high (for highs) has occurred between the two matching bars — ensuring the level remains relevant.
- Lines are automatically removed once price sweeps through them (price closes below an equal-low line or above an equal-high line).
Settings
-------------------
- Max bars between equal levels – How far back to search for matching highs/lows (default 500).
- Max stored lines (per side) – Limits memory usage and clutter (default 100).
- Equal level matching – Exact or Relative mode.
- Relative tolerance (ticks) – Adjustable precision in Relative mode.
- Line colors & width – Fully customizable.
Release Notes
Increased relative tick max levels to 60, to incorporate relative equal highs/lows for higher timeframe levels (Monthly, Weekly, Daily, 4h)Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.