OPEN-SOURCE SCRIPT
Key Levels - By Dukle

KEY LEVELS — current day dH / dO / dL and previous day pdH / pdL
WHAT IT DOES
Draws the five reference levels most day traders check first, as clean horizontal lines with small tags to the right of each line: the current day's Open (dO), High (dH) and Low (dL), plus the previous day's High and Low (pdH, pdL) in a second color.
HOW IT WORKS
The levels are computed directly from the chart's own intraday bars — no higher-timeframe security calls. The day boundary follows the symbol's exchange trading day, the same boundary the built-in daily candles use. dO is fixed at the session open. dH and dL update in real time: the moment price prints a new high or low of the day, the line moves with it — that is by design, since "today's high so far" is a moving value until the session closes. At the daily rollover, the finished day's high and low become the new pdH and pdL, and the current-day lines reset to the new open.
HOW TO USE IT
Works on any intraday timeframe (it deliberately draws nothing on Daily and above, where the current candle already is the day). Typical uses: pdH/pdL as breakout or rejection zones for the session, dO as the intraday bull/bear line, dH/dL as the developing range. All five lines can be toggled individually; colors, line width and how far the lines extend to the right of price are configurable in the settings.
NOTES
The current-day lines updating with new highs/lows is intended behavior, not lookahead — the previous-day levels never change during the session. Nothing here is financial advice.
WHAT IT DOES
Draws the five reference levels most day traders check first, as clean horizontal lines with small tags to the right of each line: the current day's Open (dO), High (dH) and Low (dL), plus the previous day's High and Low (pdH, pdL) in a second color.
HOW IT WORKS
The levels are computed directly from the chart's own intraday bars — no higher-timeframe security calls. The day boundary follows the symbol's exchange trading day, the same boundary the built-in daily candles use. dO is fixed at the session open. dH and dL update in real time: the moment price prints a new high or low of the day, the line moves with it — that is by design, since "today's high so far" is a moving value until the session closes. At the daily rollover, the finished day's high and low become the new pdH and pdL, and the current-day lines reset to the new open.
HOW TO USE IT
Works on any intraday timeframe (it deliberately draws nothing on Daily and above, where the current candle already is the day). Typical uses: pdH/pdL as breakout or rejection zones for the session, dO as the intraday bull/bear line, dH/dL as the developing range. All five lines can be toggled individually; colors, line width and how far the lines extend to the right of price are configurable in the settings.
NOTES
The current-day lines updating with new highs/lows is intended behavior, not lookahead — the previous-day levels never change during the session. Nothing here is financial advice.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.