OPEN-SOURCE SCRIPT

Session Levels Pro [PineLogic]

156
Session Levels Pro draws the reference prices intraday traders mark up by hand every morning - previous day and previous week extremes, today's open, and the opening range - and keeps them updated on one clean, non-repainting overlay.

WHAT IT PLOTS
PDH / PDL / PDC - previous day high, low and close
OPEN - today's opening price
PWH / PWL - previous week high and low
ORH / ORL - the opening range high and low, measured over a configurable number of minutes from the session open (default 15)

Each level is a single line with a right-hand label showing the level name and its exact price, so you can read the number without hovering.

HOW IT WORKS
Daily and weekly values are pulled with request.security() using lookahead together with a one-bar offset (high[1], low[1], close[1]). That combination is the correct non-repainting idiom: it returns only the completed prior period, so a level never changes after the fact, and what you see on history is what you would have seen live.

The opening range is tracked forward from each new daily bar. While the elapsed time is inside your chosen window the running high and low expand; once the window closes, ORH and ORL are fixed for the rest of the session. The opening range only appears on intraday timeframes, since it has no meaning on daily and above.

Levels are drawn once and repositioned on the last bar rather than redrawn per bar, which keeps the object count flat regardless of history length.

HOW TO USE IT
Most intraday approaches treat these prices as the day's decision points: a clean break and hold above PDH or the opening range high is continuation, a rejection back inside is a fade, and PWH/PWL frame the wider weekly context. The script marks the levels; it does not tell you which way to trade them.

ALERTS
Six alertcondition entries are included - break above/below PDH, PWH and ORH, and their downside equivalents. Create the alert from the chart and pick the condition you want.

SETTINGS
Toggle every level group independently (daily, weekly, opening range)
Opening range length in minutes, 1-240
Colours for high, low, neutral and opening-range levels
How far to the right the lines and labels extend

NOTES
Non-repainting by construction, as described above.
Previous-day and previous-week values depend on the symbol's session definition, so they follow whatever the exchange feed reports.
Works on any symbol; the opening range needs an intraday timeframe.

Open-source - read the code, change it, use it.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.