OPEN-SOURCE SCRIPT
Updated Key Levels By Spartan - Compression Safe

Key Levels Suite - Compression Safe
A confluence-level indicator that won't compress your chart. It plots HTF opens/highs/lows, day levels, moving averages, and volume profile POC/VA, but only draws what's close enough to price to matter, so distant levels never stretch the y-axis and squash your recent candles.
How it avoids compression: every level is checked against its distance from price before drawing. Close levels get a solid line and a full label with price and percent distance. Levels a bit further out still get a dashed line with just a name tag, faded down. Anything beyond that isn't drawn at all — it literally cannot affect auto-scale. Both distance thresholds are adjustable.
Overlapping levels: when two levels land on the same price (say a daily high and a weekly high coincide), most scripts either stack duplicate labels or hide one. This script merges them into a single label listing every contributing name with the price shown once, while each source keeps its own line and color.
Modules (each toggled independently):
HTF levels — daily through yearly, open/high/low/mid, current and previous period
Three configurable moving averages (EMA, SMA, WMA, HMA)
Volume profile POC/VAH/VAL for your chosen timeframe, current and previous period
Day levels — open/high/low/mid, previous day at reduced opacity
HTF and previous-period values are non-repainting: current period updates live, previous period is locked from its final confirmed close.
Settings cover line width, label size, extension length, what shows in labels, same-price merge tolerance, and which modules are active.
A confluence-level indicator that won't compress your chart. It plots HTF opens/highs/lows, day levels, moving averages, and volume profile POC/VA, but only draws what's close enough to price to matter, so distant levels never stretch the y-axis and squash your recent candles.
How it avoids compression: every level is checked against its distance from price before drawing. Close levels get a solid line and a full label with price and percent distance. Levels a bit further out still get a dashed line with just a name tag, faded down. Anything beyond that isn't drawn at all — it literally cannot affect auto-scale. Both distance thresholds are adjustable.
Overlapping levels: when two levels land on the same price (say a daily high and a weekly high coincide), most scripts either stack duplicate labels or hide one. This script merges them into a single label listing every contributing name with the price shown once, while each source keeps its own line and color.
Modules (each toggled independently):
HTF levels — daily through yearly, open/high/low/mid, current and previous period
Three configurable moving averages (EMA, SMA, WMA, HMA)
Volume profile POC/VAH/VAL for your chosen timeframe, current and previous period
Day levels — open/high/low/mid, previous day at reduced opacity
HTF and previous-period values are non-repainting: current period updates live, previous period is locked from its final confirmed close.
Settings cover line width, label size, extension length, what shows in labels, same-price merge tolerance, and which modules are active.
Release Notes
Update: Hide Mitigated LevelsAdded an option to hide a level once price has traded through it. This only applies to levels that are fixed once set: current-period opens, and everything from a completed previous period (previous O/H/L/Mid across all timeframes, previous volume profile POC/VAH/VAL). Current-period highs/lows/mids and moving averages are excluded, since those update every bar and can't be meaningfully "mitigated."
Release Notes
fixed a rare crash when only one level is queuedOpen-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.