OPEN-SOURCE SCRIPT
Actualizado

Premarket High/Low (Today + Yesterday)

1 162
Plots Premarket High and Low (04:00–09:30 ET) for the current day and previous day.
Designed for intraday traders who use premarket structure as key levels.
Notas de prensa
Premarket indicator now plots Highs and Lows of Yesterday and Today (current session) without needing to switch to ETH.
Notas de prensa
What's new

Overnight high and low. New ONH and ONL levels covering 16:00 to 04:00 ET, sitting alongside the existing premarket levels. Today and yesterday, same as premarket.
The two windows don't overlap. Overnight ends at 04:00 where premarket begins, so each level tells you something the other doesn't. The overnight window is an input if you'd rather run it through to the open.
Levels are now lines with labels instead of dotted lines running the full chart width. Every level is named on the chart — PMH, PML, ONH, ONL, with a Y prefix for yesterday. All text is editable, and there's a single toggle to hide it if you prefer clean lines.
Colours are now settings rather than fixed in the code. Defaults are unchanged.

ATR bands changed

The old bands were drawn a full ATR beyond the premarket high and low. Daily ATR is built from True Range, which measures from the previous daily close — so anchoring it to a premarket extreme counted the overnight gap twice and pushed the targets too far out.

They're now drawn a full ATR above and below the previous daily close. Both lines are always visible: the upper is where a typical day's travel ends if price runs up, the lower if it runs down. A gap spends part of the budget before the open, so on gap days one target is already close and the other is far away — which is the whole point.

The lines are fixed for the session. The ATR uses completed daily bars only, so nothing drifts as the day develops.

Two new settings:

ATR smoothing — Wilder (RMA) by default, the standard ATR definition. Switch to Simple (SMA) if you want these to match an ATR indicator that uses a plain average.
Include today in the ATR — off by default so the targets stay fixed. Turn it on if you want the ATR value to update live.

If you had ATR bands switched on, they're off by default now under the new name Show ATR Targets.

A note on ATR smoothing, if your numbers don't match

There are two common ways to average true range, and they give slightly different results:

Wilder (RMA) — the original 1978 definition and what TradingView's built-in ATR uses. Each new day gets 1/14th weight while the running average carries the rest, so recent days matter more and old ones fade out gradually.
Simple (SMA) — a plain average: add the last 14 true ranges, divide by 14. Every day weighted equally, and a spike drops out completely after 14 days instead of fading.

Neither is wrong. Simple reacts faster to a change in volatility; Wilder is smoother and more widely used. On most symbols they land within a few percent of each other.

This ships with Wilder because it's the standard. If you run a separate ATR indicator that uses a plain average and the numbers don't line up, switch this setting to Simple and they will.

Why I added overnight

I started trading on the 24-hour chart and found overnight moves genuinely useful for reading how the regular session opens — a level set at 2am often matters at 9:30. The premarket levels were never wrong; this just adds the other half of the picture for anyone working the same way. If you only trade RTH, switch the overnight levels off and nothing changes for you.

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.