OPEN-SOURCE SCRIPT

Session Levels

337
Plots the High/Low of the three major sessions, the previous FULL trading day's High/Low, the all-time high, and fires sweep alerts when price takes out any of these levels.

ROLLING WINDOW:
// Each session shows only the CURRENT trading day's level plus the previous
// trading day's level -- never older -- so old session lines stop piling up
// and crossing each other.
//
// WEEKLY RESET:
// A trading day starts at 18:00 ET (CME open / Asia open). At the Sunday
// 18:00 ET weekly open every session line is wiped for a clean week.
//
// HOLIDAY AWARENESS:
// The previous-day references (PDH/PDL, the rolling session "previous day",
// and the Monday RTH/Post-market refs) skip US market holidays AND early-close
// half-days (Juneteenth, July 3, Black Friday, Christmas Eve...) and pull from
// the most recent FULL session instead. Holidays are computed algorithmically
// (incl. Good Friday via computus and the NYSE Sat->Fri / Sun->Mon observed
// rules), so there is no yearly list to maintain. Example: the Mon after a
// Juneteenth Friday references Thursday.
// PDH/PDL use a CALENDAR-day (midnight) boundary by default so the prior
// evening's overnight move is NOT lumped into the day -- switch to "RTH only"
// in the inputs if you prefer the cash-session high/low. They draw as a single
// line spanning only the live reference, not a step across all history.
//
// MONDAY REFERENCES:
// Monday's "previous day" is the weekend, so it shows the last full day's
// RTH High/Low and Post-market High/Low for context. These clear Mon evening.
//
// SWEEP ALERTS (new):
// Alert conditions fire when price sweeps a session High/Low (after that
// session closes), the PDH/PDL, or makes a new all-time high.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.