Session High Low Indicator Tradingview​

session-high-low-indicator

Key Features of  Session High Low Indicator

Session High Low Indicator

Automated Session Boxes: Visualizes Asia, London, and NY Killzones using New York time.

Liquidity Sweep Detection: Real-time labels for “AH SWEEP” (Asian High) and “AL SWEEP” (Asian Low).

MSS Signal Integration: Built-in Market Structure Shift detection for entries after a sweep.

Fully Customizable: Adjust colors, session times, and pivot sensitivity to fit any asset.

Alerts Intergarted

How to Trade Session High Low Indicator  (Strategy Guide)

Wait for the Asia Range: Let the indicator draw the Asian box.

The Sweep: Wait for price to take out the Asian High or Low (the indicator will label this).

The Shift: Look for a Bullish or Bearish MSS arrow (provided by the script).

The Entry: Enter on the retest of the sweep level.

Best Broker Accounts Best Prop Firms
Register for XM (Trading Bonus Claim) Register for  The 5ers  
Register for Exness  (Instant withdrawals & 1:2000 leverage) Register for Funding Pips

 

Pine Script v6
//@version=5
indicator("Sessions Sweep System", overlay=true, max_labels_count=500)

// ──────────────
// INPUTS
// ──────────────
showAsiaBg     = input.bool(true, "Show Asia Background")
showLondonBg   = input.bool(true, "Show London Background")
showNYBg       = input.bool(true, "Show NY Background")

asiaFillColor  = input.color(color.new(color.gray, 85), "Asia Fill Color")
londonFillColor = input.color(color.new(color.blue, 90), "London Fill Color")
nyFillColor    = input.color(color.new(color.green, 90), "NY Fill Color")

// Sweep Label Settings
showSweepLabels = input.bool(true, "Show Sweep Detection Labels")
sweepLabelSize  = input.string("Small", "Sweep Label Size", options=["Tiny","Small","Normal","Large"])
lblSize = switch sweepLabelSize
    "Tiny"   => size.tiny
    "Small"  => size.small
    "Normal" => size.normal
    "Large"  => size.large
    => size.small

// ──────────────
// TIMEZONE
// ──────────────
TZ_FIXED_EST = "UTC-5"

// ──────────────
// SESSION TIMES
// ──────────────
asiaStartHour = 18
asiaEndHour   = 0

londonStartHour = 2
londonEndHour   = 6

nyStartHour = 7
nyEndHour   = 11

// ──────────────
// TIMESTAMPS
// ──────────────
asiaStart = timestamp(TZ_FIXED_EST, year, month, dayofmonth, asiaStartHour, 0)
asiaEnd   = timestamp(TZ_FIXED_EST, year, month, dayofmonth, asiaEndHour, 0)

londonStart = timestamp(TZ_FIXED_EST, year, month, dayofmonth, londonStartHour, 0)
londonEnd   = timestamp(TZ_FIXED_EST, year, month, dayofmonth, londonEndHour, 0)

nyStart = timestamp(TZ_FIXED_EST, year, month, dayofmonth, nyStartHour, 0)
nyEnd   = timestamp(TZ_FIXED_EST, year, month, dayofmonth, nyEndHour, 0)

// ──────────────
// SESSION LOGIC
// ──────────────
inAsia = asiaStartHour > asiaEndHour 
     ? (time >= asiaStart or time < asiaEnd)
     : (time >= asiaStart and time < asiaEnd)

inLondon = time >= londonStart and time < londonEnd
inNY     = time >= nyStart and time < nyEnd

isNewDay = ta.change(time("D", TZ_FIXED_EST))

// ──────────────
// ASIA VARIABLES
// ──────────────
var float asiaHigh = na
var float asiaLow  = na
var bool asiaSweepHiTriggered = false
var bool asiaSweepLoTriggered = false

// ──────────────
// LONDON VARIABLES
// ──────────────
var float londonHigh = na
var float londonLow  = na
var bool londonSweepHiTriggered = false
var bool londonSweepLoTriggered = false

// ──────────────
// ✅ NY VARIABLES (NEW - SAME AS ASIA/LONDON)
// ──────────────
var float nyHigh = na
var float nyLow  = na
var bool nySweepHiTriggered = false
var bool nySweepLoTriggered = false

// ──────────────
// DAILY RESET
// ──────────────
if isNewDay
    asiaHigh := na
    asiaLow  := na
    asiaSweepHiTriggered := false
    asiaSweepLoTriggered := false

    londonHigh := na
    londonLow  := na
    londonSweepHiTriggered := false
    londonSweepLoTriggered := false

    // ✅ NY Reset
    nyHigh := na
    nyLow  := na
    nySweepHiTriggered := false
    nySweepLoTriggered := false

// ──────────────
// ASIA LOGIC
// ──────────────
if inAsia
    asiaHigh := na(asiaHigh) ? high : math.max(asiaHigh, high)
    asiaLow  := na(asiaLow) ? low  : math.min(asiaLow, low)

if not inAsia and not asiaSweepHiTriggered and not na(asiaHigh)
    if high > asiaHigh
        asiaSweepHiTriggered := true
        if showSweepLabels
            label.new(time, asiaHigh, "AH SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_down, color=color.new(color.gray, 70), textcolor=color.white, size=lblSize)

if not inAsia and not asiaSweepLoTriggered and not na(asiaLow)
    if low < asiaLow
        asiaSweepLoTriggered := true
        if showSweepLabels
            label.new(time, asiaLow, "AL SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_up, color=color.new(color.gray, 70), textcolor=color.white, size=lblSize)

// ──────────────
// LONDON LOGIC
// ──────────────
if inLondon
    londonHigh := na(londonHigh) ? high : math.max(londonHigh, high)
    londonLow  := na(londonLow) ? low  : math.min(londonLow, low)

if not inLondon and not londonSweepHiTriggered and not na(londonHigh)
    if high > londonHigh
        londonSweepHiTriggered := true
        if showSweepLabels
            label.new(time, londonHigh, "LH SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_down, color=color.new(color.blue, 70), textcolor=color.white, size=lblSize)

if not inLondon and not londonSweepLoTriggered and not na(londonLow)
    if low < londonLow
        londonSweepLoTriggered := true
        if showSweepLabels
            label.new(time, londonLow, "LL SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_up, color=color.new(color.blue, 70), textcolor=color.white, size=lblSize)

// ──────────────
// ✅ NY SESSION LOGIC (NEW - SAME PATTERN)
// ──────────────
if inNY
    nyHigh := na(nyHigh) ? high : math.max(nyHigh, high)
    nyLow  := na(nyLow) ? low  : math.min(nyLow, low)

// NY High Sweep Detection
if not inNY and not nySweepHiTriggered and not na(nyHigh)
    if high > nyHigh
        nySweepHiTriggered := true
        if showSweepLabels
            label.new(time, nyHigh, "NH SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_down, color=color.new(color.green, 70), textcolor=color.white, size=lblSize)

// NY Low Sweep Detection
if not inNY and not nySweepLoTriggered and not na(nyLow)
    if low < nyLow
        nySweepLoTriggered := true
        if showSweepLabels
            label.new(time, nyLow, "NL SWEEP", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_up, color=color.new(color.green, 70), textcolor=color.white, size=lblSize)

// ──────────────
// PLOTS
// ──────────────
plot(not asiaSweepHiTriggered ? asiaHigh : na, color=color.new(color.gray, 20), linewidth=2, style=plot.style_linebr)
plot(not asiaSweepLoTriggered ? asiaLow : na, color=color.new(color.gray, 20), linewidth=2, style=plot.style_linebr)

plot(not londonSweepHiTriggered ? londonHigh : na, color=color.new(color.blue, 0), linewidth=2, style=plot.style_linebr)
plot(not londonSweepLoTriggered ? londonLow : na, color=color.new(color.blue, 0), linewidth=2, style=plot.style_linebr)

// ✅ NY PLOTS (GREEN)
plot(not nySweepHiTriggered ? nyHigh : na, color=color.new(color.green, 0), linewidth=2, style=plot.style_linebr)
plot(not nySweepLoTriggered ? nyLow : na, color=color.new(color.green, 0), linewidth=2, style=plot.style_linebr)

// ──────────────
// FILLS
// ──────────────
asiaHighFill = plot(showAsiaBg and inAsia ? asiaHigh : na, display=display.none)
asiaLowFill  = plot(showAsiaBg and inAsia ? asiaLow  : na, display=display.none)
fill(asiaHighFill, asiaLowFill, color=asiaFillColor)

londonHighFill = plot(showLondonBg and inLondon ? londonHigh : na, display=display.none)
londonLowFill  = plot(showLondonBg and inLondon ? londonLow  : na, display=display.none)
fill(londonHighFill, londonLowFill, color=londonFillColor)

// ✅ NY FILL
nyHighFill = plot(showNYBg and inNY ? nyHigh : na, display=display.none)
nyLowFill  = plot(showNYBg and inNY ? nyLow  : na, display=display.none)
fill(nyHighFill, nyLowFill, color=nyFillColor)

// ──────────────
// ✅ ONE-TIME ALERT EVENTS (NO alert() USED)
// ──────────────

// ASIA
asiaHighSweepEvent = not inAsia and not asiaSweepHiTriggered[1] and high > asiaHigh
asiaLowSweepEvent  = not inAsia and not asiaSweepLoTriggered[1] and low < asiaLow

// LONDON
londonHighSweepEvent = not inLondon and not londonSweepHiTriggered[1] and high > londonHigh
londonLowSweepEvent  = not inLondon and not londonSweepLoTriggered[1] and low < londonLow

// NY
nyHighSweepEvent = not inNY and not nySweepHiTriggered[1] and high > nyHigh
nyLowSweepEvent  = not inNY and not nySweepLoTriggered[1] and low < nyLow


// ──────────────
// ✅ ALERT CONDITIONS (SET INDIVIDUALLY IN TRADINGVIEW)
// ──────────────
alertcondition(asiaHighSweepEvent, "Asia High Sweep", "Asia High Sweep")
alertcondition(asiaLowSweepEvent, "Asia Low Sweep", "Asia Low Sweep")

alertcondition(londonHighSweepEvent, "London High Sweep", "London High Sweep")
alertcondition(londonLowSweepEvent, "London Low Sweep", "London Low Sweep")

alertcondition(nyHighSweepEvent, "NY High Sweep", "NY High Sweep")
alertcondition(nyLowSweepEvent, "NY Low Sweep", "NY Low Sweep")
    

Leave a Comment

Your email address will not be published. Required fields are marked *