Indicator
Chart patterns
V6 ORB Retest NY Session// ORB Retest — NY Session (MNQ)
// Live companion to the walk-forward-validated strategy in orb_retest.py.
//
// Draws and alerts only. It never places an order.
//
// DESIGNED FOR A 5-MINUTE CHART. The strategy was validated on 5-minute bars;
// on any other timeframe the breakout/retest granularity differs from what was
// tested, so the panel shows a warning.
//
// Session times are pinned to America/New_York, so the 9:30 ET open is located
// correctly no matter what timezone your chart displays, and DST is handled
// automatically. No chart timezone change needed.
//
// Install: PulseWire -> Pine Editor -> paste -> Save -> Add to chart.
//@version=6
indicator("ORB Retest — NY Session", "ORB Retest", overlay = true,
max_boxes_count = 500, max_lines_count = 500, max_labels_count = 500)
// ───────────────────────── Inputs ─────────────────────────
grpS = "Session (always New York time)"
orSessionInput = input.session("0930-0945", "Opening range window", group = grpS, display = display.none)
tradeSessionInput = input.session("0930-1555", "Trading session (flat at end)", group = grpS, display = display.none)
cutoffInput = input.session("0930-1200", "Breakout must occur before", group = grpS, display = display.none)
grpR = "Trade rules"
targetR = input.float(2.5, "Target (multiple of risk)", minval = 0.5, step = 0.5, group = grpR,
tooltip = "2.5R tested best across both 2019-2026 and 2023-onward: target is hit on 48% of trades vs 38% at 3R, win rate 58% vs 52%, slightly more total profit and a smaller drawdown.",
display = display.none)
stopBufTicks = input.int(4, "Stop buffer beyond retest extreme (ticks)", minval = 0, group = grpR, display = display.none)
touchTolTicks = input.int(2, "Retest touch tolerance (ticks)", minval = 0, group = grpR, display = display.none)
invalTicks = input.int(4, "Invalidation buffer past level (ticks)", minval = 0, group = grpR, display = display.none)
retestDeadlineM = input.int(60, "Cancel if no retest within (minutes)", minval = 5, group = grpR, display = display.none)
maxRiskPts = input.float(0, "Skip if risk exceeds (points, 0 = no limit)", minval = 0, group = grpR,
tooltip = "Off by default. On a 5-minute chart a 40-point cap improved results (+0.72R to +0.80R, drawdown roughly halved). On a 15-minute chart stops are naturally wider and the same cap removes too many good trades, so leave it at 0 there.",
display = display.none)
grpF = "Day filter"
useRangeFilter = input.bool(true, "Skip days with unusual opening-range width", group = grpF, display = display.none)
rangeLookback = input.int(20, "Lookback (days)", minval = 5, group = grpF, display = display.none)
rangeMinMult = input.float(0.5, "Minimum multiple of average", step = 0.1, group = grpF, display = display.none)
rangeMaxMult = input.float(2.0, "Maximum multiple of average", step = 0.1, group = grpF, display = display.none)
grpV = "Display"
drawSessionInput = input.session("0930-1230", "Extend drawings during (NY time)", group = grpV,
tooltip = "Boxes and lines grow only inside this window, then freeze. Default = first 3 hours of the NY session, so old days stay compact.",
display = display.none)
keepDays = input.int(120, "Keep drawings for last N days", minval = 1, maxval = 250, group = grpV,
tooltip = "PulseWire caps an indicator at 500 drawings per type; at 4 lines per traded day that is roughly 125 days of full markup. Beyond the cap the oldest drawings drop off automatically.",
display = display.none)
pointValue = input.float(2.0, "Contract $ per point (MNQ = 2)", minval = 0.01, group = grpV, display = display.none)
showPanel = input.bool(true, "Show status panel", group = grpV, display = display.none)
showBox = input.bool(true, "Opening range box", group = grpV, display = display.none)
showLevels = input.bool(true, "Entry / stop / target lines", group = grpV, display = display.none)
showMarkers = input.bool(true, "Signal markers", group = grpV, display = display.none)
showLabels = input.bool(true, "Outcome labels", group = grpV, display = display.none)
showLegend = input.bool(true, "Show symbol legend (bottom-left)", group = grpV, display = display.none)
TZ = "America/New_York"
// ───────────────────── Session detection ─────────────────────
inOR = not na(time(timeframe.period, orSessionInput, TZ))
inTrade = not na(time(timeframe.period, tradeSessionInput, TZ))
beforeCut = not na(time(timeframe.period, cutoffInput, TZ))
inDraw = not na(time(timeframe.period, drawSessionInput, TZ))
orStart = inOR and not inOR
orEnd = not inOR and inOR
tradeEnd = not inTrade and inTrade
tick = syminfo.mintick
isFiveMin = timeframe.isminutes and timeframe.multiplier == 5
// Live-chart safety: every decision waits for the bar to CLOSE, exactly like
// the backtest. On the streaming realtime bar nothing updates until it
// confirms, so signals never appear and then vanish mid-bar (no repainting).
confirmed = barstate.isconfirmed
// ───────────────────────── State ─────────────────────────
// 0 = waiting for breakout, 1 = waiting for retest, 2 = in trade, 3 = done today
var int state = 0
var int armedDir = 0
var int armTime = na
var float orH = na
var float orL = na
var float orRange = na
var bool orReady = false
var bool dayEligible = false
var float retestExtreme = na
var float entryPrice = na
var float stopPrice = na
var float targetPrice = na
var float riskPts = na
var string outcome = "—"
var array orHistory = array.new_float()
// Drawing handles for the current day
var box orBox = na
var line levelLine = na
var line entryLine = na
var line stopLine = na
var line targetLine = na
// Rolling registry so old days' drawings get cleaned up instead of piling up.
var array boxReg = array.new()
var array lineReg = array.new()
var array labelReg = array.new()
// Signal flags at global scope so plotshape / alertcondition can read them.
bool sigBreakout = false
bool sigEntry = false
bool sigInvalidated = false
bool sigExpired = false
bool sigTargetHit = false
bool sigStopHit = false
// ───────────── Build the opening range, reset for a new day ─────────────
if orStart and confirmed
orH := high
orL := low
orReady := false
state := 0
armedDir := 0
dayEligible := false
retestExtreme := na
entryPrice := na
stopPrice := na
targetPrice := na
riskPts := na
outcome := "—"
levelLine := na
entryLine := na
stopLine := na
targetLine := na
else if inOR and confirmed
orH := math.max(orH, high)
orL := math.min(orL, low)
if orEnd and confirmed
orRange := orH - orL
orReady := true
// Compare today's range against the trailing average BEFORE adding it.
// Starts judging after 5 days of history (averaging what it has, up to the
// full lookback) — demanding all 20 up front left short-history charts,
// like 5-minute ones, permanently stuck in "filtered out".
int warmup = math.min(rangeLookback, 5)
float avgRange = array.size(orHistory) >= warmup ? array.avg(orHistory) : na
dayEligible := not useRangeFilter or (not na(avgRange)
and orRange >= avgRange * rangeMinMult
and orRange <= avgRange * rangeMaxMult)
array.push(orHistory, orRange)
if array.size(orHistory) > rangeLookback
array.shift(orHistory)
if not dayEligible
outcome := na(avgRange) and useRangeFilter ? "warming up — collecting history" : "day filtered out"
if showBox
orBox := box.new(bar_index - 1, orH, bar_index, orL,
border_color = dayEligible ? color.new(color.orange, 20) : color.new(color.gray, 65),
border_style = line.style_dashed, border_width = 1,
bgcolor = dayEligible ? color.new(color.orange, 90) : color.new(color.gray, 96))
array.push(boxReg, orBox)
if array.size(boxReg) > keepDays
box.delete(array.shift(boxReg))
// Stretch the box only inside the drawing window, then freeze it.
if showBox and inDraw and orReady and not na(orBox)
box.set_right(orBox, bar_index)
// ───────────────────── State machine ─────────────────────
if orReady and inTrade and dayEligible and confirmed
// ---- Waiting for a breakout CLOSE (wicks do not count) ----
if state == 0 and beforeCut
if close > orH
armedDir := 1
state := 1
armTime := time
retestExtreme := low
sigBreakout := true
outcome := "armed long — waiting for retest"
else if close < orL
armedDir := -1
state := 1
armTime := time
retestExtreme := high
sigBreakout := true
outcome := "armed short — waiting for retest"
if sigBreakout and showLevels
float lvl = armedDir == 1 ? orH : orL
levelLine := line.new(bar_index, lvl, bar_index, lvl,
color = color.orange, width = 2)
array.push(lineReg, levelLine)
// ---- Armed: waiting for price to come back and retest the level ----
else if state == 1
bool isLong = armedDir == 1
float lvl = isLong ? orH : orL
float invalLevel = isLong ? lvl - invalTicks * tick : lvl + invalTicks * tick
bool invalidated = isLong ? close < invalLevel : close > invalLevel
bool expired = (time - armTime) / 60000 > retestDeadlineM or not beforeCut
if invalidated
state := 3
sigInvalidated := true
outcome := "invalidated — closed back inside"
if not na(levelLine)
line.set_color(levelLine, color.new(color.gray, 40))
else if expired
state := 3
sigExpired := true
outcome := "no retest — expired"
if not na(levelLine)
line.set_color(levelLine, color.new(color.gray, 40))
else
// Track how far the pullback has run — this defines the stop.
retestExtreme := isLong ? math.min(retestExtreme, low) : math.max(retestExtreme, high)
float tol = touchTolTicks * tick
bool touched = isLong ? low <= lvl + tol : high >= lvl - tol
bool pierced = isLong ? low <= lvl - tick : high >= lvl + tick
if touched and pierced
float eP = lvl
float sP = isLong ? retestExtreme - stopBufTicks * tick
: retestExtreme + stopBufTicks * tick
float rk = isLong ? eP - sP : sP - eP
if rk > 0 and (maxRiskPts == 0 or rk <= maxRiskPts)
entryPrice := eP
stopPrice := sP
riskPts := rk
targetPrice := isLong ? eP + targetR * rk : eP - targetR * rk
state := 2
sigEntry := true
outcome := (isLong ? "LONG live" : "SHORT live")
if showLevels
entryLine := line.new(bar_index, entryPrice, bar_index, entryPrice,
color = color.blue, width = 2)
stopLine := line.new(bar_index, stopPrice, bar_index, stopPrice,
color = color.red, width = 1, style = line.style_dashed)
targetLine := line.new(bar_index, targetPrice, bar_index, targetPrice,
color = color.green, width = 1, style = line.style_dashed)
array.push(lineReg, entryLine)
array.push(lineReg, stopLine)
array.push(lineReg, targetLine)
if showLabels
label lb = label.new(bar_index, isLong ? low : high,
(isLong ? "LONG " : "SHORT ")
+ str.tostring(rk, format.mintick) + " pts ($"
+ str.tostring(rk * pointValue, "#.##") + ")",
yloc = isLong ? yloc.belowbar : yloc.abovebar,
style = isLong ? label.style_label_up : label.style_label_down,
size = size.small,
color = isLong ? color.new(color.green, 20) : color.new(color.red, 20),
textcolor = color.white)
array.push(labelReg, lb)
else
state := 3
outcome := rk <= 0 ? "skipped — no risk defined" : "skipped — risk too wide"
// ---- In the trade: stop or target first? ----
else if state == 2
bool isLong = armedDir == 1
bool hitStop = isLong ? low <= stopPrice : high >= stopPrice
bool hitTarget = isLong ? high >= targetPrice : low <= targetPrice
// If one bar spans both, assume the stop filled first (matches the backtest).
if hitStop
state := 3
sigStopHit := true
outcome := "stopped out (−1R)"
else if hitTarget
state := 3
sigTargetHit := true
outcome := "target hit (+" + str.tostring(targetR, "#.#") + "R)"
// Grow active lines only inside the drawing window (no infinite extend,
// and old days stay frozen at their 3-hour width).
if inDraw
if state == 1 and not na(levelLine)
line.set_x2(levelLine, bar_index)
if state == 2
if not na(entryLine)
line.set_x2(entryLine, bar_index)
if not na(stopLine)
line.set_x2(stopLine, bar_index)
if not na(targetLine)
line.set_x2(targetLine, bar_index)
// ---- Session over: anything still open is flattened ----
if tradeEnd and state == 2 and confirmed
state := 3
outcome := "flat — session end"
if showLabels
label lb2 = label.new(bar_index, close, "flat — session end", yloc = yloc.abovebar,
style = label.style_label_down, size = size.tiny,
color = color.new(color.gray, 35), textcolor = color.white)
array.push(labelReg, lb2)
// ---- Prune old drawings so the chart doesn't fill up ----
if array.size(lineReg) > keepDays * 4
line.delete(array.shift(lineReg))
if array.size(labelReg) > keepDays * 2
label.delete(array.shift(labelReg))
// ───────────────────────── Plots ─────────────────────────
plotshape(showMarkers and sigBreakout, "Breakout close", shape.triangleup,
location.belowbar, color.new(color.orange, 0), size = size.tiny, display = display.pane)
plotshape(showMarkers and sigEntry and armedDir == 1, "Long entry", shape.labelup,
location.belowbar, color.new(color.green, 0), text = "E", textcolor = color.white,
size = size.small, display = display.pane)
plotshape(showMarkers and sigEntry and armedDir == -1, "Short entry", shape.labeldown,
location.abovebar, color.new(color.red, 0), text = "E", textcolor = color.white,
size = size.small, display = display.pane)
plotshape(showMarkers and sigTargetHit, "Target hit", shape.xcross,
location.abovebar, color.new(color.green, 0), size = size.tiny, display = display.pane)
plotshape(showMarkers and sigStopHit, "Stop hit", shape.xcross,
location.belowbar, color.new(color.red, 0), size = size.tiny, display = display.pane)
plotshape(showMarkers and sigInvalidated, "Setup invalidated", shape.circle,
location.abovebar, color.new(color.gray, 25), size = size.tiny, display = display.pane)
plotshape(showMarkers and sigExpired, "No retest — expired", shape.square,
location.abovebar, color.new(color.gray, 25), size = size.tiny, display = display.pane)
// ───────────────────────── Status panel ─────────────────────────
var table panel = table.new(position.top_right, 2, 7,
border_width = 1, border_color = color.new(color.gray, 60),
frame_width = 1, frame_color = color.new(color.gray, 60))
if showPanel and barstate.islast
color hdrBg = color.new(color.gray, 85)
color cellBg = color.new(color.gray, 92)
table.cell(panel, 0, 0, "ORB Retest", text_size = size.small, text_color = color.gray,
bgcolor = hdrBg, text_halign = text.align_left)
table.cell(panel, 1, 0, isFiveMin ? "5m ✓" : "⚠ tested on 5m",
text_size = size.small, bgcolor = hdrBg,
text_color = isFiveMin ? color.green : color.orange, text_halign = text.align_right)
table.cell(panel, 0, 1, "Status", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 1, outcome, text_size = size.small, bgcolor = cellBg,
text_color = state == 2 ? color.blue : color.gray, text_halign = text.align_right)
table.cell(panel, 0, 2, "Range high", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 2, na(orH) ? "—" : str.tostring(orH, format.mintick),
text_size = size.small, bgcolor = cellBg, text_color = color.orange,
text_halign = text.align_right)
table.cell(panel, 0, 3, "Range low", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 3, na(orL) ? "—" : str.tostring(orL, format.mintick),
text_size = size.small, bgcolor = cellBg, text_color = color.orange,
text_halign = text.align_right)
table.cell(panel, 0, 4, "Range width", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 4, na(orRange) ? "—" : str.tostring(orRange, "#.##") + " pts",
text_size = size.small, bgcolor = cellBg, text_color = color.gray,
text_halign = text.align_right)
table.cell(panel, 0, 5, "Entry / Stop", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 5, na(entryPrice) ? "—"
: str.tostring(entryPrice, format.mintick) + " / " + str.tostring(stopPrice, format.mintick),
text_size = size.small, bgcolor = cellBg, text_color = color.gray,
text_halign = text.align_right)
table.cell(panel, 0, 6, "Risk", text_size = size.small, text_color = color.gray,
bgcolor = cellBg, text_halign = text.align_left)
table.cell(panel, 1, 6, na(riskPts) ? "—"
: str.tostring(riskPts, "#.##") + " pts $" + str.tostring(riskPts * pointValue, "#.##"),
text_size = size.small, bgcolor = cellBg, text_color = color.red,
text_halign = text.align_right)
// ───────────────────────── Symbol legend ─────────────────────────
var table legend = table.new(position.bottom_left, 4, 7,
border_width = 1, border_color = color.new(color.gray, 70),
frame_width = 1, frame_color = color.new(color.gray, 70))
if showLegend and barstate.islast
color lgBg = color.new(color.gray, 94)
color lgTxt = color.new(color.gray, 15)
table.cell(legend, 0, 0, "SYMBOL GUIDE", text_size = size.tiny, text_color = color.gray,
bgcolor = color.new(color.gray, 88), text_halign = text.align_left)
table.merge_cells(legend, 0, 0, 3, 0)
// column 0-1: setup phase column 2-3: trade phase
table.cell(legend, 0, 1, "▭", text_size = size.small, text_color = color.orange, bgcolor = lgBg)
table.cell(legend, 1, 1, "opening range 9:30–9:45", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 1, "▬", text_size = size.small, text_color = color.blue, bgcolor = lgBg)
table.cell(legend, 3, 1, "entry price", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 0, 2, "▭", text_size = size.small, text_color = color.gray, bgcolor = lgBg)
table.cell(legend, 1, 2, "day skipped (range filter)", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 2, "╌", text_size = size.small, text_color = color.red, bgcolor = lgBg)
table.cell(legend, 3, 2, "stop loss", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 0, 3, "▲", text_size = size.small, text_color = color.orange, bgcolor = lgBg)
table.cell(legend, 1, 3, "breakout close — wait for retest", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 3, "╌", text_size = size.small, text_color = color.green, bgcolor = lgBg)
table.cell(legend, 3, 3, "take profit (3R)", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 0, 4, "▬", text_size = size.small, text_color = color.orange, bgcolor = lgBg)
table.cell(legend, 1, 4, "retest level = your entry", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 4, "✕", text_size = size.small, text_color = color.green, bgcolor = lgBg)
table.cell(legend, 3, 4, "target hit (win)", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 0, 5, "E", text_size = size.small, text_color = color.green, bgcolor = lgBg)
table.cell(legend, 1, 5, "long entry filled", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 5, "✕", text_size = size.small, text_color = color.red, bgcolor = lgBg)
table.cell(legend, 3, 5, "stop hit (−1R)", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 0, 6, "E", text_size = size.small, text_color = color.red, bgcolor = lgBg)
table.cell(legend, 1, 6, "short entry filled", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
table.cell(legend, 2, 6, "● ■", text_size = size.small, text_color = color.gray, bgcolor = lgBg)
table.cell(legend, 3, 6, "invalidated / no retest — no trade", text_size = size.tiny, text_color = lgTxt, bgcolor = lgBg, text_halign = text.align_left)
// ───────────────────────── Alerts ─────────────────────────
alertcondition(sigBreakout, "ORB: breakout close", "Opening range broken on the close — watch for a retest")
alertcondition(sigEntry, "ORB: retest entry", "Retest reached — entry level touched")
alertcondition(sigTargetHit, "ORB: target hit", "Target reached")
alertcondition(sigStopHit, "ORB: stop hit", "Stop hit")
alertcondition(sigInvalidated, "ORB: setup invalid", "Price closed back inside the range — setup dead")
alertcondition(sigExpired, "ORB: no retest", "Retest window expired — no trade today")
Indicator
Reversal Signal: ZigZag Trend + RSI Divergence + HAWhat it does:
Trend — finds swing highs/lows (ZigZag-style) and calls the market bearish when both the highs and lows are stepping down (lower highs + lower lows).
RSI divergence — compares RSI at the two most recent swing lows; flags bullish divergence when price prints a lower low but RSI prints a higher low.
Custom Heikin Ashi — computed manually from OHLC (not PulseWire's built-in HA candle type), plotted as an overlay, and used to detect the first green candle after a run of red ones.
Buy signal — fires only when all three align: bearish trend + recent bullish divergence + first green HA candle.
Dynamic stop loss — a red line drawn just below the swing low that triggered the signal, with an adjustable buffer.
There's also a small dashboard in the top-right showing live trend/divergence/stop status, plus an alert condition you can wire up to PulseWire alerts.
Indicator
Indicator
7-Point Confluence PanelHow it works: a table in the top-right shows all 7 items in two columns (Long / Short), checkmark or dash for each, and a live score out of 7 at the bottom — green at 6-7 (Tier A), orange at 4-5 (Tier B), grey below that (Tier C, skip). What each check actually measures:
1. Bias — real, from your structure array (2 consecutive same-direction swings)
2. Zone confluence — proxy: counts how many bars in the lookback touched near the major zone; adjust touch_min/touch_lookback if it's over- or under-counting on your charts
3. OB retest — proxy: did the last closed bar wick into the zone and close back out
4. Dominant candle — proxy: last bar's range vs. a 20-bar average, times your dominant_mult input
5. HL/LH at zone — real: checks your last confirmed swing sits within ATR distance of the zone
6. Confirmation pause — proxy: recent bars contracted below a chosen ATR fraction
7. Structure clean — real: current bar hasn't broken back past the last confirmed swing
Indicator
2.0- Killzones NAS100/SP500 - Manuel De Jesus Leiva2.0- Killzones NAS100/SP500 - Manuel De Jesus Leiva
Espero que les sirva mi herramienta de trabajo.
Indicator
Wave and Trend Analysis [Sarthhak]This includes Elliot wave analysis with price action tools such as ema , rsi and macd for more confirmed entry and exit.
Indicator
Key Levels, Trading Sessions & Dynamic Long/Short SignalsThis all-in-one PulseWire indicator is designed to streamline your daily market analysis by automatically plotting critical higher-timeframe liquidity levels, tracking major trading sessions, and highlighting potential trade directional biases in real time.
✨ Key Features
1. Dynamic Key Levels (Daily & Weekly Liquidity)
Yesterday’s Daily High & Low: Automatic projection of yesterday's key liquidity boundaries.
Previous Day High & Low: Tracks the levels from two days ago for broader context.
Previous Week High & Low: Keeps major weekly extremes clear on your lower-timeframe charts.
Custom Projections: Lines extend cleanly without cluttering past historical price action.
2. Actionable Trade Direction (Long & Short Bias Signals)
Automatic Level Sweeps/Touches: Detects when price interacts with key liquidity zones.
Visual Directional Labels:
"Buscar Long" (Look for Longs): Appears below key support / Daily Low touches with precise visual spacing.
"Buscar Shorts" (Look for Shorts): Appears above key resistance / Daily High touches.
ATR-Based Spacing: Labels and arrows dynamically adjust using Average True Range (ATR) to avoid overlapping candles or arrows across any asset (Crypto, Forex, Indices, Stocks).
3. Session Shadings & On-Screen Legend
Session Background Highlights: Customizable session ranges for Asia, London, and New York (NYC).
Reference Table: An elegant, customizable on-screen legend displaying active session colors.
Day Separators: Optional vertical lines marking the start of each new trading day.
🔔 Work Smarter: Use Alerts to Avoid Screen Fatigue
You don't need to sit in front of your charts all day waiting for levels to get touched.
Recommended Workflow:
Set Up Alerts: Create custom PulseWire alerts on the indicator when price reaches key levels or when a signal triggers.
Step Away: Go about your day while the market moves.
Evaluate & Execute: When you receive an alert notification, it simply means price has reached a key decision zone. Open your chart, evaluate price action at that moment, and decide whether or not to take the trade.
⚙️ Fully Customizable
Adjust line colors, styles, and text offsets.
Enable or disable individual sessions, daily separators, and session tables according to your trading setup.
Indicator
10 AM Open - New York Close (Powell)10:00 AM Key Open To New York Close fore easy entries on 10 AM with Powells modell
Indicator
Fourier Extrapolation Forecast (DFT)This indicator forecasts future price by extrapolating the dominant cycles found in recent price action, using a Discrete Fourier Transform (DFT).
HOW IT WORKS
1. Takes the last N closes (DFT Length) in chronological order.
2. Removes the linear trend with a least-squares fit — a raw DFT extrapolation is strictly periodic and would wrap back to the oldest prices, so only the detrended residual is modeled.
3. Computes DFT coefficients for the low-frequency harmonics only (Harmonics Used). High-frequency components mostly fit noise and are discarded.
4. Extrapolates the residual with a truncated inverse DFT, adds the trend extrapolation back, and draws the result as a red line starting from the NEXT bar.
INPUTS
- DFT Length: size of the lookback window the cycles are extracted from (default 128).
- Forecast Length: number of future bars to project (default 14).
- Harmonics Used: how many low-frequency harmonics are kept in the reconstruction (default 8). Fewer = smoother forecast, more = closer fit to recent wiggles.
- Anchor Forecast to Last Close: shifts the whole projection so it starts exactly at the latest close, removing any gap on day one.
NOTES AND LIMITATIONS
- The forecast assumes the cyclical structure of the lookback window continues into the future. It is a cycle projection, not a prediction of news-driven moves.
- Results are sensitive to DFT Length and Harmonics Used — treat them as tuning knobs and judge the fit visually.
- All computation runs once on the last bar, so the script stays lightweight on historical data.
For educational purposes only. Not financial advice.
Indicator
HTF CHOC detector by Tao WoyHTF CHOC detector by Tao Woy
Can display a CHOC, BOS , SWING Point of HTF on lower TimeFrame easily
eg. open m1 TF but show H1 CHOC, BOS, Swing point of H1
Indicator
XAUUSD ICC SMC PRO 4H 15M 5MXAU/USD ICC + SMC Multi-Timeframe Indicator
The XAU/USD ICC + SMC Multi-Timeframe Indicator is designed to identify high-probability continuation setups by combining Indication, Correction and Continuation (ICC) with Supply & Demand, Liquidity Sweeps, CHoCH, BOS and multi-timeframe market structure.
The indicator follows a strict top-down process using 4H → 15M → 5M analysis.
4H – Indication and Supply/Demand
The 4-hour timeframe defines the main market direction and the institutional area of interest.
When price creates a confirmed Break of Structure (BOS), the indicator searches for the last opposite candle responsible for the displacement.
For a bullish structure, this area is marked as a 4H Demand Zone.
For a bearish structure, it is marked as a 4H Supply Zone.
The zone is automatically displayed as a rectangle and extended forward until price returns to it.
The 4H stage represents the INDICATION phase of the ICC model.
15M – Liquidity Sweep and CHoCH
Once price returns inside the 4H Supply or Demand zone, the indicator begins analyzing the 15-minute structure.
For a bullish setup, price must first take Sell-Side Liquidity below a previous 15M low and then close back above that level.
For a bearish setup, price must take Buy-Side Liquidity above a previous 15M high and close back below it.
A liquidity sweep alone is not considered an entry signal.
The indicator waits for a Change of Character (CHoCH) confirming that the short-term market structure is beginning to reverse.
The relationship between liquidity sweeps, displacement, CHoCH and BOS is similar to the structure shown in the example diagrams above.
15M – BOS Confirmation
After CHoCH, the system waits for another structural break in the same direction.
This second break is identified as the 15M BOS confirmation.
For a bullish setup:
Sell-Side Liquidity Sweep → Bullish CHoCH → Bullish BOS
For a bearish setup:
Buy-Side Liquidity Sweep → Bearish CHoCH → Bearish BOS
BOS is used primarily as a continuation confirmation, while CHoCH indicates a possible structural transition.
15M – Correction
After the BOS confirmation, the indicator waits for the market to retrace.
This retracement becomes the CORRECTION phase of the ICC model.
For a bullish setup, bearish 15-minute candles forming after the bullish BOS are monitored.
For a bearish setup, bullish candles forming after the bearish BOS are monitored.
The entire correction area is highlighted with an orange rectangle.
The indicator continuously tracks the highest and lowest points of the correction.
Correction Trendline
During the correction, the indicator automatically searches for swing points that allow it to build a correction trendline.
For a bullish setup, the correction normally creates a descending structure.
The indicator therefore draws a descending resistance trendline across the correction highs.
For a bearish setup, it draws an ascending support trendline across the correction lows.
The trendline is important because the indicator does not consider the correction finished simply because price touches an Order Block.
End of Correction
The correction ends only when price breaks the correction trendline in the direction of the original 4H setup.
Bullish sequence:
Correction → Descending Trendline → Bullish Trendline Break
Bearish sequence:
Correction → Ascending Trendline → Bearish Trendline Break
At this stage the indicator displays:
CORRECTION ENDED
TRENDLINE BREAK
CONTINUATION
This represents the transition from Correction → Continuation.
5M – Execution Zone
After the 15M continuation is confirmed, the indicator moves to the 5-minute execution logic.
For a bullish setup, it waits for a 5M bullish BOS and identifies the last bearish candle that created the displacement.
That candle becomes the new 5M Demand Zone.
For a bearish setup, the last bullish candle before the bearish displacement becomes the 5M Supply Zone.
Order Blocks combined with structural breaks are commonly visualized in this way, as shown in the example chart above.
The indicator then displays:
5M DEMAND – WAIT FOR RETEST
or
5M SUPPLY – WAIT FOR RETEST
Final BUY Signal
A BUY signal requires the complete sequence:
4H Bullish BOS
→ 4H Demand
→ Sell-Side Liquidity Sweep
→ 15M Bullish CHoCH
→ 15M Bullish BOS
→ 15M Correction
→ Correction Trendline Break
→ 5M Bullish BOS
→ 5M Demand
→ Demand Retest
→ Bullish Reaction
→ STRONG BUY
The indicator will not generate a BUY signal simply because price enters a Demand zone.
Final SELL Signal
The bearish process is the exact opposite:
4H Bearish BOS
→ 4H Supply
→ Buy-Side Liquidity Sweep
→ 15M Bearish CHoCH
→ 15M Bearish BOS
→ 15M Correction
→ Correction Trendline Break
→ 5M Bearish BOS
→ 5M Supply
→ Supply Retest
→ Bearish Reaction
→ STRONG SELL
Visual Color Guide
Green rectangle: 4H/5M Demand Zone
Red rectangle: 4H/5M Supply Zone
Yellow label: Liquidity Sweep
Aqua label: CHoCH
Blue label: BOS
Orange rectangle: Correction
Green/Red trendline: Correction structure
Large green label: STRONG BUY
Large red label: STRONG SELL
ICC Logic
The complete model can therefore be summarized as:
INDICATION
4H BOS + Supply/Demand
↓
CORRECTION PREPARATION
Liquidity Sweep + CHoCH + 15M BOS
↓
CORRECTION
15M retracement + correction trendline
↓
CONTINUATION
Trendline Break + 5M BOS + Demand/Supply retest
↓
EXECUTION
STRONG BUY or STRONG SELL
This structure is intentionally strict. Its purpose is to filter out ordinary Order Block touches and wait for liquidity manipulation, structural confirmation, correction and continuation before displaying the final trading signal.
Instant
Indicator
SMC Decision by SPPATLEThis Pine Script code implements a comprehensive Smart Money Concepts (SMC) trading indicator designed for PulseWire (Version 6). It combines institutional price-action structures (such as market structure breaks, change of character, and fair value gaps) with technical indicators and a real-time summary dashboard.
Here is a detailed breakdown of its core components and features:
1. Market Structure & SMC Components
Market Structure Breaks (BOS) & Change of Character (CHoCH): Tracks swing highs and lows to detect trend continuations (BOS) and trend reversals (CHoCH). It supports filtering breaks using either candle wicks or candle closing bodies (bodyBreak).
Fair Value Gaps (FVG): Automatically identifies and plots institutional imbalances (inefficiencies) where price moved rapidly, leaving an unfilled gap. Bullish and bearish gaps are tracked via dynamic arrays and cleared once mitigated.
Supply & Demand Zones: Scans up to the last 500 bars to plot dynamic high-volume supply and demand boundaries on the chart, complete with real-time status updates and distance calculations.
2. Technical Indicators & Volume Analysis
200-period Exponential Moving Average (EMA): Plots the baseline trend filter (ta.ema(close, 200)).
Volume Weighted Average Price (VWAP): Displays institutional benchmark pricing.
Relative Volume (RVOL): Calculates volume relative to a moving average lookback window, highlighting high-volume spikes visually on the chart (barcolor and dotted reference lines) when volume exceeds the set threshold.
3. Real-Time Dashboard & Recommendation Table
The indicator features an on-chart information table positioned at the top right that summarizes key market metrics in real time:
SMC Trend: Displays whether the current structure is BULLISH, BEARISH, or NEUTRAL.
Structure Rule: Shows the last detected market event (e.g., Bullish BOS or Bearish CHoCH).
S&D Status & Zone Distance: Reports whether price is inside or approaching a Supply/Demand zone along with percentage metrics.
200 EMA Filter: Shows price position relative to the 200 EMA with percentage deviation.
Current RVOL & Volume Power: Tracks current volume performance and relative buyer/seller power ratio.
Final Recommendation: Generates an automated signal (BUY, SELL, CAUTION, or HOLD) based on a combination of the trend filter, volume expansion, power momentum, and proximity to major zones.
Indicator
NQNMQS PDR/PWR/PMRPrevious Day Range w/ EQ, Previous Week Range, Previous Month Range.
With Price Levels
Indicator
2.0- Killzones EUR/GBP - Manuel De Jesus Leiva// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © tradeforopp
//@version=6
indicator("Killzones EUR/GBP - Manuel De Jesus Leiva", "Killzones EUR/GBP - Manuel De Jesus Leiva", true, max_labels_count = 500, max_lines_count = 500, max_boxes_count = 500)
// ---------------------------------------- Constant Functions --------------------------------------------------
get_line_type(_style) =>
switch _style
"Solid" => line.style_solid
"Dotted" => line.style_dotted
"Dashed" => line.style_dashed
get_size(x) =>
switch x
"Auto" => size.auto
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
get_table_pos(pos) =>
switch pos
"Bottom Center" => position.bottom_center
"Bottom Left" => position.bottom_left
"Bottom Right" => position.bottom_right
"Middle Center" => position.middle_center
"Middle Left" => position.middle_left
"Middle Right" => position.middle_right
"Top Center" => position.top_center
"Top Left" => position.top_left
"Top Right" => position.top_right
// ---------------------------------------- Constant Functions --------------------------------------------------
// ---------------------------------------- Inputs --------------------------------------------------
var g_SETTINGS = "Settings"
max_days = input.int(1000, "Session Drawing Limit", 1, tooltip = "Only this many drawings will be kept on the chart, for each selected drawing type (killzone boxes, pivot lines, open lines, etc.). Set to 200 for ~6 months of sessions.", group = g_SETTINGS)
tf_limit = input.timeframe("60", "Timeframe Limit", tooltip = "Drawings will not appear on timeframes greater than or equal to this", group = g_SETTINGS)
gmt_tz = input.string('America/New_York', "Timezone", options = , tooltip = "Note GMT is not adjusted to reflect Daylight Saving Time changes", group = g_SETTINGS)
lbl_size = get_size(input.string('Normal', "Label Size", options = , tooltip = "The size of all labels", group = g_SETTINGS))
txt_color = input.color(color.black, "Text Color", tooltip = "The color of all label and table text", group = g_SETTINGS)
use_cutoff = input.bool(false, "Drawing Cutoff Time", inline = "CO", tooltip = "When enabled, all pivots and open price lines will stop extending at this time", group = g_SETTINGS)
cutoff = input.session("1800-1801", "", inline = "CO", group = g_SETTINGS)
var tf_limit_is_equal_or_more_chart_tf = timeframe.in_seconds('') <= timeframe.in_seconds(tf_limit)
var g_KZ = "Killzones"
// General Killzone Settings
show_kz = input.bool(true, "Show Killzone Boxes", inline = "KZ", group = g_KZ)
show_kz_text = input.bool(false, "Display Text", inline = "KZ", group = g_KZ)
box_transparency = input.int(70, "Box Transparency", 0, 100, group = g_KZ)
text_transparency = input.int(50, "Text Transparency", 0, 100, group = g_KZ)
// ==================== KILLZONE 01 ====================
use_kz01 = input.bool(true, "00:00-01:00", inline = "KZ01", group = g_KZ)
kz01_txt = input.string("00-01", "", inline = "KZ01", group = g_KZ)
kz01 = input.session("0000-0100", "", inline = "KZ01", group = g_KZ)
kz01_color = input.color(color.blue, "", inline = "KZ01", group = g_KZ)
// ==================== KILLZONE 02 ====================
use_kz02 = input.bool(true, "01:00-02:00", inline = "KZ02", group = g_KZ)
kz02_txt = input.string("01-02", "", inline = "KZ02", group = g_KZ)
kz02 = input.session("0100-0200", "", inline = "KZ02", group = g_KZ)
kz02_color = input.color(color.blue, "", inline = "KZ02", group = g_KZ)
// ==================== KILLZONE 03 ====================
use_kz03 = input.bool(true, "02:00-03:00", inline = "KZ03", group = g_KZ)
kz03_txt = input.string("02-03", "", inline = "KZ03", group = g_KZ)
kz03 = input.session("0200-0300", "", inline = "KZ03", group = g_KZ)
kz03_color = input.color(color.blue, "", inline = "KZ03", group = g_KZ)
// ==================== KILLZONE 04 ====================
use_kz04 = input.bool(true, "03:00-04:00", inline = "KZ04", group = g_KZ)
kz04_txt = input.string("03-04", "", inline = "KZ04", group = g_KZ)
kz04 = input.session("0300-0400", "", inline = "KZ04", group = g_KZ)
kz04_color = input.color(color.blue, "", inline = "KZ04", group = g_KZ)
// ==================== KILLZONE 05 ====================
use_kz05 = input.bool(true, "04:00-05:00", inline = "KZ05", group = g_KZ)
kz05_txt = input.string("04-05", "", inline = "KZ05", group = g_KZ)
kz05 = input.session("0400-0500", "", inline = "KZ05", group = g_KZ)
kz05_color = input.color(color.blue, "", inline = "KZ05", group = g_KZ)
// ==================== KILLZONE 06 ====================
use_kz06 = input.bool(true, "05:00-06:00", inline = "KZ06", group = g_KZ)
kz06_txt = input.string("05-06", "", inline = "KZ06", group = g_KZ)
kz06 = input.session("0500-0600", "", inline = "KZ06", group = g_KZ)
kz06_color = input.color(color.blue, "", inline = "KZ06", group = g_KZ)
// ==================== KILLZONE 07 ====================
use_kz07 = input.bool(true, "06:00-07:00", inline = "KZ07", group = g_KZ)
kz07_txt = input.string("06-07", "", inline = "KZ07", group = g_KZ)
kz07 = input.session("0600-0700", "", inline = "KZ07", group = g_KZ)
kz07_color = input.color(color.blue, "", inline = "KZ07", group = g_KZ)
// ==================== KILLZONE 08 ====================
use_kz08 = input.bool(true, "07:00-08:00", inline = "KZ08", group = g_KZ)
kz08_txt = input.string("07-08", "", inline = "KZ08", group = g_KZ)
kz08 = input.session("0700-0800", "", inline = "KZ08", group = g_KZ)
kz08_color = input.color(color.blue, "", inline = "KZ08", group = g_KZ)
// ==================== KILLZONE 09 ====================
use_kz09 = input.bool(true, "08:00-09:00", inline = "KZ09", group = g_KZ)
kz09_txt = input.string("08-09", "", inline = "KZ09", group = g_KZ)
kz09 = input.session("0800-0900", "", inline = "KZ09", group = g_KZ)
kz09_color = input.color(color.blue, "", inline = "KZ09", group = g_KZ)
// ==================== KILLZONE 10 ====================
use_kz10 = input.bool(true, "09:00-10:00", inline = "KZ10", group = g_KZ)
kz10_txt = input.string("09-10", "", inline = "KZ10", group = g_KZ)
kz10 = input.session("0900-1000", "", inline = "KZ10", group = g_KZ)
kz10_color = input.color(color.blue, "", inline = "KZ10", group = g_KZ)
// ==================== KILLZONE 11 ====================
use_kz11 = input.bool(true, "10:00-11:00", inline = "KZ11", group = g_KZ)
kz11_txt = input.string("10-11", "", inline = "KZ11", group = g_KZ)
kz11 = input.session("1000-1100", "", inline = "KZ11", group = g_KZ)
kz11_color = input.color(color.blue, "", inline = "KZ11", group = g_KZ)
// ==================== KILLZONE 12 ====================
use_kz12 = input.bool(true, "11:00-12:00", inline = "KZ12", group = g_KZ)
kz12_txt = input.string("11-12", "", inline = "KZ12", group = g_KZ)
kz12 = input.session("1100-1200", "", inline = "KZ12", group = g_KZ)
kz12_color = input.color(color.blue, "", inline = "KZ12", group = g_KZ)
// ==================== KILLZONE 13 ====================
use_kz13 = input.bool(true, "12:00-13:00", inline = "KZ13", group = g_KZ)
kz13_txt = input.string("12-13", "", inline = "KZ13", group = g_KZ)
kz13 = input.session("1200-1300", "", inline = "KZ13", group = g_KZ)
kz13_color = input.color(color.blue, "", inline = "KZ13", group = g_KZ)
// ==================== KILLZONE 14 ====================
use_kz14 = input.bool(true, "13:00-14:00", inline = "KZ14", group = g_KZ)
kz14_txt = input.string("13-14", "", inline = "KZ14", group = g_KZ)
kz14 = input.session("1300-1400", "", inline = "KZ14", group = g_KZ)
kz14_color = input.color(color.blue, "", inline = "KZ14", group = g_KZ)
// ==================== KILLZONE 15 ====================
use_kz15 = input.bool(true, "14:00-15:00", inline = "KZ15", group = g_KZ)
kz15_txt = input.string("14-15", "", inline = "KZ15", group = g_KZ)
kz15 = input.session("1400-1500", "", inline = "KZ15", group = g_KZ)
kz15_color = input.color(color.blue, "", inline = "KZ15", group = g_KZ)
// ==================== KILLZONE 16 ====================
use_kz16 = input.bool(true, "15:00-16:00", inline = "KZ16", group = g_KZ)
kz16_txt = input.string("15-16", "", inline = "KZ16", group = g_KZ)
kz16 = input.session("1500-1600", "", inline = "KZ16", group = g_KZ)
kz16_color = input.color(color.blue, "", inline = "KZ16", group = g_KZ)
// ==================== KILLZONE 17 ====================
use_kz17 = input.bool(true, "16:00-17:00", inline = "KZ17", group = g_KZ)
kz17_txt = input.string("16-17", "", inline = "KZ17", group = g_KZ)
kz17 = input.session("1600-1700", "", inline = "KZ17", group = g_KZ)
kz17_color = input.color(color.blue, "", inline = "KZ17", group = g_KZ)
// ==================== KILLZONE 18 ====================
use_kz18 = input.bool(true, "17:00-18:00", inline = "KZ18", group = g_KZ)
kz18_txt = input.string("17-18", "", inline = "KZ18", group = g_KZ)
kz18 = input.session("1700-1800", "", inline = "KZ18", group = g_KZ)
kz18_color = input.color(color.blue, "", inline = "KZ18", group = g_KZ)
// ==================== KILLZONE 19 ====================
use_kz19 = input.bool(true, "18:00-19:00", inline = "KZ19", group = g_KZ)
kz19_txt = input.string("18-19", "", inline = "KZ19", group = g_KZ)
kz19 = input.session("1800-1900", "", inline = "KZ19", group = g_KZ)
kz19_color = input.color(color.blue, "", inline = "KZ19", group = g_KZ)
// ==================== KILLZONE 20 ====================
use_kz20 = input.bool(true, "19:00-20:00", inline = "KZ20", group = g_KZ)
kz20_txt = input.string("19-20", "", inline = "KZ20", group = g_KZ)
kz20 = input.session("1900-2000", "", inline = "KZ20", group = g_KZ)
kz20_color = input.color(color.blue, "", inline = "KZ20", group = g_KZ)
// ==================== KILLZONE 21 ====================
use_kz21 = input.bool(true, "20:00-21:00", inline = "KZ21", group = g_KZ)
kz21_txt = input.string("20-21", "", inline = "KZ21", group = g_KZ)
kz21 = input.session("2000-2100", "", inline = "KZ21", group = g_KZ)
kz21_color = input.color(color.blue, "", inline = "KZ21", group = g_KZ)
// ==================== KILLZONE 22 ====================
use_kz22 = input.bool(true, "21:00-22:00", inline = "KZ22", group = g_KZ)
kz22_txt = input.string("21-22", "", inline = "KZ22", group = g_KZ)
kz22 = input.session("2100-2200", "", inline = "KZ22", group = g_KZ)
kz22_color = input.color(color.blue, "", inline = "KZ22", group = g_KZ)
// ==================== KILLZONE 23 ====================
use_kz23 = input.bool(true, "22:00-23:00", inline = "KZ23", group = g_KZ)
kz23_txt = input.string("22-23", "", inline = "KZ23", group = g_KZ)
kz23 = input.session("2200-2300", "", inline = "KZ23", group = g_KZ)
kz23_color = input.color(color.blue, "", inline = "KZ23", group = g_KZ)
// ==================== KILLZONE 24 ====================
use_kz24 = input.bool(true, "23:00-00:00", inline = "KZ24", group = g_KZ)
kz24_txt = input.string("23-00", "", inline = "KZ24", group = g_KZ)
kz24 = input.session("2300-0000", "", inline = "KZ24", group = g_KZ)
kz24_color = input.color(color.blue, "", inline = "KZ24", group = g_KZ)
// ==================== KILLZONE 25 ====================
use_kz25 = input.bool(true, "17:00-21:00", inline = "KZ25", group = g_KZ)
kz25_txt = input.string("H4", "", inline = "KZ25", group = g_KZ)
kz25 = input.session("1700-2100", "", inline = "KZ25", group = g_KZ)
kz25_color = input.color(color.orange, "", inline = "KZ25", group = g_KZ)
// ==================== KILLZONE 26 ====================
use_kz26 = input.bool(true, "21:00-01:00", inline = "KZ26", group = g_KZ)
kz26_txt = input.string("H4", "", inline = "KZ26", group = g_KZ)
kz26 = input.session("2100-0100", "", inline = "KZ26", group = g_KZ)
kz26_color = input.color(color.aqua, "", inline = "KZ26", group = g_KZ)
// ==================== KILLZONE 27 ====================
use_kz27 = input.bool(true, "01:00-05:00", inline = "KZ27", group = g_KZ)
kz27_txt = input.string("H4", "", inline = "KZ27", group = g_KZ)
kz27 = input.session("0100-0500", "", inline = "KZ27", group = g_KZ)
kz27_color = input.color(color.green, "", inline = "KZ27", group = g_KZ)
// ==================== KILLZONE 28 ====================
use_kz28 = input.bool(true, "05:00-09:00", inline = "KZ28", group = g_KZ)
kz28_txt = input.string("H4", "", inline = "KZ28", group = g_KZ)
kz28 = input.session("0500-0900", "", inline = "KZ28", group = g_KZ)
kz28_color = input.color(color.yellow, "", inline = "KZ28", group = g_KZ)
// ==================== KILLZONE 29 ====================
use_kz29 = input.bool(true, "09:00-13:00", inline = "KZ29", group = g_KZ)
kz29_txt = input.string("H4", "", inline = "KZ29", group = g_KZ)
kz29 = input.session("0900-1300", "", inline = "KZ29", group = g_KZ)
kz29_color = input.color(color.red, "", inline = "KZ29", group = g_KZ)
// ==================== KILLZONE 30 ====================
use_kz30 = input.bool(true, "13:00-17:00", inline = "KZ30", group = g_KZ)
kz30_txt = input.string("H4", "", inline = "KZ30", group = g_KZ)
kz30 = input.session("1300-1700", "", inline = "KZ30", group = g_KZ)
kz30_color = input.color(color.purple, "", inline = "KZ30", group = g_KZ)
// ==================== KILLZONE 31 ====================
use_kz31 = input.bool(false, "05:00-17:00", inline = "KZ31", group = g_KZ)
kz31_txt = input.string("H12", "", inline = "KZ31", group = g_KZ)
kz31 = input.session("0500-1700", "", inline = "KZ31", group = g_KZ)
kz31_color = input.color(color.purple, "", inline = "KZ31", group = g_KZ)
// ==================== KILLZONE 32 ====================
use_kz32 = input.bool(false, "17:00-05:00", inline = "KZ32", group = g_KZ)
kz32_txt = input.string("H12", "", inline = "KZ32", group = g_KZ)
kz32 = input.session("1700-0500", "", inline = "KZ32", group = g_KZ)
kz32_color = input.color(color.purple, "", inline = "KZ32", group = g_KZ)
// ==================== KILLZONE 33 ====================
use_kz33 = input.bool(false, "17:00-01:00", inline = "KZ33", group = g_KZ)
kz33_txt = input.string("H8", "", inline = "KZ33", group = g_KZ)
kz33 = input.session("1700-0100", "", inline = "KZ33", group = g_KZ)
kz33_color = input.color(color.purple, "", inline = "KZ33", group = g_KZ)
// ==================== KILLZONE 34 ====================
use_kz34 = input.bool(false, "01:00-09:00", inline = "KZ34", group = g_KZ)
kz34_txt = input.string("H8", "", inline = "KZ34", group = g_KZ)
kz34 = input.session("0100-0900", "", inline = "KZ34", group = g_KZ)
kz34_color = input.color(color.purple, "", inline = "KZ34", group = g_KZ)
// ==================== KILLZONE 35 ====================
use_kz35 = input.bool(false, "09:00-17:00", inline = "KZ35", group = g_KZ)
kz35_txt = input.string("H8", "", inline = "KZ35", group = g_KZ)
kz35 = input.session("0900-1700", "", inline = "KZ35", group = g_KZ)
kz35_color = input.color(color.purple, "", inline = "KZ35", group = g_KZ)
// ==================== KILLZONE 36 ====================
use_kz36 = input.bool(false, "17:00-23:00", inline = "KZ36", group = g_KZ)
kz36_txt = input.string("H6", "", inline = "KZ36", group = g_KZ)
kz36 = input.session("1700-2300", "", inline = "KZ36", group = g_KZ)
kz36_color = input.color(color.purple, "", inline = "KZ36", group = g_KZ)
// ==================== KILLZONE 37 ====================
use_kz37 = input.bool(false, "23:00-05:00", inline = "KZ37", group = g_KZ)
kz37_txt = input.string("H6", "", inline = "KZ37", group = g_KZ)
kz37 = input.session("2300-0500", "", inline = "KZ37", group = g_KZ)
kz37_color = input.color(color.purple, "", inline = "KZ37", group = g_KZ)
// ==================== KILLZONE 38 ====================
use_kz38 = input.bool(false, "05:00-11:00", inline = "KZ38", group = g_KZ)
kz38_txt = input.string("H6", "", inline = "KZ38", group = g_KZ)
kz38 = input.session("0500-1100", "", inline = "KZ38", group = g_KZ)
kz38_color = input.color(color.purple, "", inline = "KZ38", group = g_KZ)
// ==================== KILLZONE 39 ====================
use_kz39 = input.bool(false, "11:00-17:00", inline = "KZ39", group = g_KZ)
kz39_txt = input.string("H6", "", inline = "KZ39", group = g_KZ)
kz39 = input.session("1100-1700", "", inline = "KZ39", group = g_KZ)
kz39_color = input.color(color.purple, "", inline = "KZ39", group = g_KZ)
var g_LABELS = "Killzone Pivots"
show_pivots = input.bool(false, "Show Pivots", inline = "PV", group = g_LABELS)
use_alerts = input.bool(false, "Alert Broken Pivots", inline = "PV", tooltip = "The desired killzones must be enabled at the time that an alert is created, along with the show pivots option, in order for alerts to work", group = g_LABELS)
show_midpoints = input.bool(false, "Show Pivot Midpoints", inline = "mp", group = g_LABELS)
stop_midpoints = input.bool(false, "Stop Once Mitigated", inline = "mp", group = g_LABELS)
show_labels = input.bool(false, "Show Pivot Labels", inline = "LB", tooltip = "Show labels denoting each killzone's high and low. Optionally choose to show the price of each level. Right side will show labels on the right-hand side of the chart until they are reached", group = g_LABELS)
label_price = input.bool(false, "Display Price", inline = "LB", group = g_LABELS)
label_right = input.bool(false, "Right Side", inline = "LB", group = g_LABELS)
ext_pivots = input.string("Until Mitigated", "Extend Pivots...", options = , group = g_LABELS)
ext_which = input.string("All", "...From Which Sessions", options = , group = g_LABELS)
ash_str = input.string("AS.H", "Killzone 1 Labels", inline = "L_AS", group = g_LABELS)
asl_str = input.string("AS.L", "", inline = "L_AS", group = g_LABELS)
loh_str = input.string("LO.H", "Killzone 2 Labels", inline = "L_LO", group = g_LABELS)
lol_str = input.string("LO.L", "", inline = "L_LO", group = g_LABELS)
nah_str = input.string("NYAM.H", "Killzone 3 Labels", inline = "L_NA", group = g_LABELS)
nal_str = input.string("NYAM.L", "", inline = "L_NA", group = g_LABELS)
nlh_str = input.string("NYL.H", "Killzone 4 Labels", inline = "L_NL", group = g_LABELS)
nll_str = input.string("NYL.L", "", inline = "L_NL", group = g_LABELS)
nph_str = input.string("NYPM.H", "Killzone 5 Labels", inline = "L_NP", group = g_LABELS)
npl_str = input.string("NYPM.L", "", inline = "L_NP", group = g_LABELS)
kzp_style = get_line_type(input.string(defval = 'Solid', title = "Pivot Style", options = , inline = "KZP", group = g_LABELS))
kzp_width = input.int(1, "", inline = "KZP", group = g_LABELS)
kzm_style = get_line_type(input.string(defval = 'Dotted', title = "Midpoint Style", options = , inline = "KZM", group = g_LABELS))
kzm_width = input.int(1, "", inline = "KZM", group = g_LABELS)
var g_RNG = "Killzone Range"
show_range = input.bool(false, "Show Killzone Range", tooltip = "Show the most recent ranges of each selected killzone, from high to low", group = g_RNG)
show_range_avg = input.bool(false, "Show Average", tooltip = "Show the average range of each selected killzone", group = g_RNG)
range_avg = input.int(5, "Average Length", 0, tooltip = "This many previous sessions will be used to calculate the average. If there isn't enough data on the current chart, it will use as many sessions as possible", group = g_RNG)
range_pos = get_table_pos(input.string('Top Right', "Table Position", options = , group = g_RNG))
range_size = get_size(input.string('Normal', "Table Size", options = , group = g_RNG))
var g_DWM = "Day - Week - Month"
sep_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_DWM)
alert_HL = input.bool(false, "Alert High/Low Break", tooltip = "Alert when any selected highs and lows are traded through. The desired timeframe's high/low option must be enabled at the time that an alert is created", group = g_DWM)
show_d_open = input.bool(false, "D Open", inline = "DO", group = g_DWM)
dhl = input.bool(false, "High/Low", inline = "DO", tooltip = "", group = g_DWM)
ds = input.bool(false, "Separators", inline = "DO", tooltip = "Mark where a new day begins", group = g_DWM)
d_color = input.color(color.blue, "", inline = "DO", group = g_DWM)
show_w_open = input.bool(false, "W Open", inline = "WO", group = g_DWM)
whl = input.bool(false, "High/Low", inline = "WO", tooltip = "", group = g_DWM)
ws = input.bool(false, "Separators", inline = "WO", tooltip = "Mark where a new week begins", group = g_DWM)
w_color = input.color(#089981, "", inline = "WO", group = g_DWM)
show_m_open = input.bool(false, "M Open", inline = "MO", group = g_DWM)
mhl = input.bool(false, "High/Low", inline = "MO", tooltip = "", group = g_DWM)
ms = input.bool(false, "Separators", inline = "MO", tooltip = "Mark where a new month begins", group = g_DWM)
m_color = input.color(color.red, "", inline = "MO", group = g_DWM)
htf_style = get_line_type(input.string(defval = 'Solid', title = "Style", options = , inline = "D0", group = g_DWM))
htf_width = input.int(1, "", inline = "D0", group = g_DWM)
dow_labels = input.bool(false, "Day of Week Labels", inline = "DOW", group = g_DWM)
dow_yloc = input.string('Bottom', "", options = , inline = "DOW", group = g_DWM)
dow_xloc = input.string('Midnight', "", options = , inline = "DOW", group = g_DWM)
dow_hide_wknd = input.bool(false, "Hide Weekend Labels", group = g_DWM)
var g_OPEN = "Opening Prices"
open_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_OPEN)
use_h1 = input.bool(false, "", inline = "H1", group = g_OPEN)
h1_text = input.string("17:00 H12/H8/H6/H4", "", inline = "H1", group = g_OPEN)
h1 = input.session("1700-1701", "", inline = "H1", group = g_OPEN)
h1_color = input.color(color.black, "", inline = "H1", group = g_OPEN)
use_h2 = input.bool(false, "", inline = "H2", group = g_OPEN)
h2_text = input.string("05:00 H12/H6/H4", "", inline = "H2", group = g_OPEN)
h2 = input.session("0500-0501", "", inline = "H2", group = g_OPEN)
h2_color = input.color(color.black, "", inline = "H2", group = g_OPEN)
use_h3 = input.bool(false, "", inline = "H3", group = g_OPEN)
h3_text = input.string("01:00 H8/H4", "", inline = "H3", group = g_OPEN)
h3 = input.session("0100-0101", "", inline = "H3", group = g_OPEN)
h3_color = input.color(color.black, "", inline = "H3", group = g_OPEN)
use_h4 = input.bool(false, "", inline = "H4", group = g_OPEN)
h4_text = input.string("09:00 H8/H4", "", inline = "H4", group = g_OPEN)
h4 = input.session("0900-0901", "", inline = "H4", group = g_OPEN)
h4_color = input.color(color.black, "", inline = "H4", group = g_OPEN)
use_h5 = input.bool(false, "", inline = "H5", group = g_OPEN)
h5_text = input.string("23:00 H6", "", inline = "H5", group = g_OPEN)
h5 = input.session("2300-2301", "", inline = "H5", group = g_OPEN)
h5_color = input.color(color.black, "", inline = "H5", group = g_OPEN)
use_h6 = input.bool(false, "", inline = "H6", group = g_OPEN)
h6_text = input.string("11:00 H6", "", inline = "H6", group = g_OPEN)
h6 = input.session("1100-1101", "", inline = "H6", group = g_OPEN)
h6_color = input.color(color.black, "", inline = "H6", group = g_OPEN)
use_h7 = input.bool(false, "", inline = "H7", group = g_OPEN)
h7_text = input.string("21:00 H4", "", inline = "H7", group = g_OPEN)
h7 = input.session("2100-2101", "", inline = "H7", group = g_OPEN)
h7_color = input.color(color.black, "", inline = "H7", group = g_OPEN)
use_h8 = input.bool(false, "", inline = "H8", group = g_OPEN)
h8_text = input.string("13:00 H4", "", inline = "H8", group = g_OPEN)
h8 = input.session("1300-1301", "", inline = "H8", group = g_OPEN)
h8_color = input.color(color.black, "", inline = "H8", group = g_OPEN)
hz_style = get_line_type(input.string(defval = 'Dotted', title = "Style", options = , inline = "H0", group = g_OPEN))
hz_width = input.int(1, "", inline = "H0", group = g_OPEN)
var g_VERTICAL = "Timestamps"
v_unlimited = input.bool(false, "Unlimited", tooltip = "Unlimited will show as many of the selected lines as possible. Otherwise, the session drawing limit will be used", group = g_VERTICAL)
use_v1 = input.bool(false, "", inline = "V1", group = g_VERTICAL)
v1 = input.session("0000-0001", "", inline = "V1", group = g_VERTICAL)
v1_color = input.color(color.black, "", inline = "V1", group = g_VERTICAL)
use_v2 = input.bool(false, "", inline = "V2", group = g_VERTICAL)
v2 = input.session("0800-0801", "", inline = "V2", group = g_VERTICAL)
v2_color = input.color(color.black, "", inline = "V2", group = g_VERTICAL)
use_v3 = input.bool(false, "", inline = "V3", group = g_VERTICAL)
v3 = input.session("1000-1001", "", inline = "V3", group = g_VERTICAL)
v3_color = input.color(color.black, "", inline = "V3", group = g_VERTICAL)
use_v4 = input.bool(false, "", inline = "V4", group = g_VERTICAL)
v4 = input.session("1200-1201", "", inline = "V4", group = g_VERTICAL)
v4_color = input.color(color.black, "", inline = "V4", group = g_VERTICAL)
vl_style = get_line_type(input.string(defval = 'Dotted', title = "Style", options = , inline = "V0", group = g_VERTICAL))
vl_width = input.int(1, "", inline = "V0", group = g_VERTICAL)
// ---------------------------------------- Inputs --------------------------------------------------
// ---------------------------------------- Variables & Constants --------------------------------------------------
type kz
string _title
array _box
array _hi_line
array _md_line
array _lo_line
array _hi_label
array _lo_label
array _hi_valid
array _md_valid
array _lo_valid
array _range_store
float _range_current
type hz
array LN
array LB
array CO
type dwm_hl
array hi_line
array lo_line
array hi_label
array lo_label
bool hit_high = false
bool hit_low = false
type dwm_info
string tf
float o = na
float h = na
float l = na
float ph = na
float pl = na
type lines_helper
hz _hz
string h
string h_text
color h_color
initLines() =>
array res = array.new()
if use_h1
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h1, h1_text, h1_color))
if use_h2
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h2, h2_text, h2_color))
if use_h3
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h3, h3_text, h3_color))
if use_h4
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h4, h4_text, h4_color))
if use_h5
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h5, h5_text, h5_color))
if use_h6
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h6, h6_text, h6_color))
if use_h7
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h7, h7_text, h7_color))
if use_h8
res.push(lines_helper.new(hz.new(array.new_line(), array.new_label(), array.new_bool()), h8, h8_text, h8_color))
res
var array lines = initLines()
type kz_helper
kz _kz
string session
color c
string box_txt
string hi_txt
string lo_txt
initKZ() =>
array res = array.new()
if use_kz01
res.push(kz_helper.new(
kz.new(kz01_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz01, kz01_color, kz01_txt, "KZ01.H", "KZ01.L"
))
if use_kz02
res.push(kz_helper.new(
kz.new(kz02_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz02, kz02_color, kz02_txt, "KZ02.H", "KZ02.L"
))
if use_kz03
res.push(kz_helper.new(
kz.new(kz03_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz03, kz03_color, kz03_txt, "KZ03.H", "KZ03.L"
))
if use_kz04
res.push(kz_helper.new(
kz.new(kz04_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz04, kz04_color, kz04_txt, "KZ04.H", "KZ04.L"
))
if use_kz05
res.push(kz_helper.new(
kz.new(kz05_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz05, kz05_color, kz05_txt, "KZ05.H", "KZ05.L"
))
if use_kz06
res.push(kz_helper.new(
kz.new(kz06_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz06, kz06_color, kz06_txt, "KZ06.H", "KZ06.L"
))
if use_kz07
res.push(kz_helper.new(
kz.new(kz07_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz07, kz07_color, kz07_txt, "KZ07.H", "KZ07.L"
))
if use_kz08
res.push(kz_helper.new(
kz.new(kz08_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz08, kz08_color, kz08_txt, "KZ08.H", "KZ08.L"
))
if use_kz09
res.push(kz_helper.new(
kz.new(kz09_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz09, kz09_color, kz09_txt, "KZ09.H", "KZ09.L"
))
if use_kz10
res.push(kz_helper.new(
kz.new(kz10_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz10, kz10_color, kz10_txt, "KZ10.H", "KZ10.L"
))
if use_kz11
res.push(kz_helper.new(
kz.new(kz11_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz11, kz11_color, kz11_txt, "KZ11.H", "KZ11.L"
))
if use_kz12
res.push(kz_helper.new(
kz.new(kz12_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz12, kz12_color, kz12_txt, "KZ12.H", "KZ12.L"
))
if use_kz13
res.push(kz_helper.new(
kz.new(kz13_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz13, kz13_color, kz13_txt, "KZ13.H", "KZ13.L"
))
if use_kz14
res.push(kz_helper.new(
kz.new(kz14_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz14, kz14_color, kz14_txt, "KZ14.H", "KZ14.L"
))
if use_kz15
res.push(kz_helper.new(
kz.new(kz15_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz15, kz15_color, kz15_txt, "KZ15.H", "KZ15.L"
))
if use_kz16
res.push(kz_helper.new(
kz.new(kz16_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz16, kz16_color, kz16_txt, "KZ16.H", "KZ16.L"
))
if use_kz17
res.push(kz_helper.new(
kz.new(kz17_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz17, kz17_color, kz17_txt, "KZ17.H", "KZ17.L"
))
if use_kz18
res.push(kz_helper.new(
kz.new(kz18_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz18, kz18_color, kz18_txt, "KZ18.H", "KZ18.L"
))
if use_kz19
res.push(kz_helper.new(
kz.new(kz19_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz19, kz19_color, kz19_txt, "KZ19.H", "KZ19.L"
))
if use_kz20
res.push(kz_helper.new(
kz.new(kz20_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz20, kz20_color, kz20_txt, "KZ20.H", "KZ20.L"
))
if use_kz21
res.push(kz_helper.new(
kz.new(kz21_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz21, kz21_color, kz21_txt, "KZ21.H", "KZ21.L"
))
if use_kz22
res.push(kz_helper.new(
kz.new(kz22_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz22, kz22_color, kz22_txt, "KZ22.H", "KZ22.L"
))
if use_kz23
res.push(kz_helper.new(
kz.new(kz23_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz23, kz23_color, kz23_txt, "KZ23.H", "KZ23.L"
))
if use_kz24
res.push(kz_helper.new(
kz.new(kz24_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz24, kz24_color, kz24_txt, "KZ24.H", "KZ24.L"
))
if use_kz25
res.push(kz_helper.new(
kz.new(kz25_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz25, kz25_color, kz25_txt, "KZ25.H", "KZ25.L"
))
if use_kz26
res.push(kz_helper.new(
kz.new(kz26_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz26, kz26_color, kz26_txt, "KZ26.H", "KZ26.L"
))
if use_kz27
res.push(kz_helper.new(
kz.new(kz27_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz27, kz27_color, kz27_txt, "KZ27.H", "KZ27.L"
))
if use_kz28
res.push(kz_helper.new(
kz.new(kz28_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz28, kz28_color, kz28_txt, "KZ28.H", "KZ28.L"
))
if use_kz29
res.push(kz_helper.new(
kz.new(kz29_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz29, kz29_color, kz29_txt, "KZ29.H", "KZ29.L"
))
if use_kz30
res.push(kz_helper.new(
kz.new(kz30_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz30, kz30_color, kz30_txt, "KZ30.H", "KZ30.L"
))
if use_kz31
res.push(kz_helper.new(
kz.new(kz31_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz31, kz31_color, kz31_txt, "KZ31.H", "KZ31.L"
))
if use_kz32
res.push(kz_helper.new(
kz.new(kz32_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz32, kz32_color, kz32_txt, "KZ32.H", "KZ32.L"
))
if use_kz33
res.push(kz_helper.new(
kz.new(kz33_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz33, kz33_color, kz33_txt, "KZ33.H", "KZ33.L"
))
if use_kz34
res.push(kz_helper.new(
kz.new(kz34_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz34, kz34_color, kz34_txt, "KZ34.H", "KZ34.L"
))
if use_kz35
res.push(kz_helper.new(
kz.new(kz35_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz35, kz35_color, kz35_txt, "KZ35.H", "KZ35.L"
))
if use_kz36
res.push(kz_helper.new(
kz.new(kz36_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz36, kz36_color, kz36_txt, "KZ36.H", "KZ36.L"
))
if use_kz37
res.push(kz_helper.new(
kz.new(kz37_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz37, kz37_color, kz37_txt, "KZ37.H", "KZ37.L"
))
if use_kz38
res.push(kz_helper.new(
kz.new(kz38_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz38, kz38_color, kz38_txt, "KZ38.H", "KZ38.L"
))
if use_kz39
res.push(kz_helper.new(
kz.new(kz39_txt, array.new_box(), array.new_line(), array.new_line(), array.new_line(), array.new_label(), array.new_label(), array.new_bool(), array.new_bool(), array.new_bool(), array.new_float()),
kz39, kz39_color, kz39_txt, "KZ39.H", "KZ39.L"
))
res
var array _kz = initKZ()
var d_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var w_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var m_hl = dwm_hl.new(array.new_line(), array.new_line(), array.new_label(), array.new_label())
var d_info = dwm_info.new("D")
var w_info = dwm_info.new("W")
var m_info = dwm_info.new("M")
t_co = not na(time("", cutoff, gmt_tz))
type ts_helper
string session
array lines
color c
initTS() =>
array res = array.new()
if use_v1
res.push(ts_helper.new(v1, array.new_line(), v1_color))
if use_v2
res.push(ts_helper.new(v2, array.new_line(), v2_color))
if use_v3
res.push(ts_helper.new(v3, array.new_line(), v3_color))
if use_v4
res.push(ts_helper.new(v4, array.new_line(), v4_color))
res
var array ts_data = initTS()
var d_sep_line = array.new_line()
var w_sep_line = array.new_line()
var m_sep_line = array.new_line()
var d_line = array.new_line()
var w_line = array.new_line()
var m_line = array.new_line()
var d_label = array.new_label()
var w_label = array.new_label()
var m_label = array.new_label()
var transparent = #ffffff00
var ext_current = ext_which == 'Most Recent'
var ext_past = ext_pivots == 'Past Mitigation'
update_dwm_info(dwm_info n) =>
if timeframe.change(n.tf)
n.ph := n.h
n.pl := n.l
n.o := open
n.h := high
n.l := low
else
n.h := math.max(high, n.h)
n.l := math.min(low, n.l)
if dhl or show_d_open
update_dwm_info(d_info)
if whl or show_w_open
update_dwm_info(w_info)
if mhl or show_m_open
update_dwm_info(m_info)
// ---------------------------------------- Variables & Constants --------------------------------------------------
// ---------------------------------------- Functions --------------------------------------------------
get_box_color(color c) =>
color.new(c, box_transparency)
get_text_color(color c) =>
color.new(c, text_transparency)
// ---------------------------------------- Functions --------------------------------------------------
// ---------------------------------------- Core Logic --------------------------------------------------
dwm_sep(string tf, bool use, array arr, color col) =>
if use
if timeframe.change(tf)
arr.unshift(line.new(bar_index, high * 1.0001, bar_index, low, style = htf_style, width = htf_width, extend = extend.both, color = col))
if not sep_unlimited and arr.size() > max_days
arr.pop().delete()
dwm_open(string tf, bool use, array lns, array lbls, dwm_info n, color col) =>
if use
if lns.size() > 0
lns.get(0).set_x2(time)
lbls.get(0).set_x(time)
if timeframe.change(tf)
lns.unshift(line.new(time, n.o, time, n.o, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
lbls.unshift(label.new(time, n.o, tf + " OPEN", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
if not sep_unlimited and lns.size() > max_days
lns.pop().delete()
lbls.pop().delete()
dwm_hl(string tf, bool use, dwm_hl hl, dwm_info n, color col) =>
if use
if hl.hi_line.size() > 0
hl.hi_line.get(0).set_x2(time)
hl.lo_line.get(0).set_x2(time)
hl.hi_label.get(0).set_x(time)
hl.lo_label.get(0).set_x(time)
if timeframe.change(tf)
hl.hi_line.unshift(line.new(time, n.ph, time, n.ph, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
hl.lo_line.unshift(line.new(time, n.pl, time, n.pl, xloc = xloc.bar_time, style = htf_style, width = htf_width, color = col))
hl.hi_label.unshift(label.new(time, n.ph, "P" + tf + "H", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
hl.lo_label.unshift(label.new(time, n.pl, "P" + tf + "L", xloc = xloc.bar_time, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
hl.hit_high := false
hl.hit_low := false
if not sep_unlimited and hl.hi_line.size() > max_days
hl.hi_line.pop().delete()
hl.lo_line.pop().delete()
hl.hi_label.pop().delete()
hl.lo_label.pop().delete()
if hl.hi_line.size() > 0 and alert_HL
if not hl.hit_high and high > hl.hi_line.get(0).get_y1()
hl.hit_high := true
alert(str.format("Hit P{0}H", tf))
if not hl.hit_low and low < hl.lo_line.get(0).get_y1()
hl.hit_low := true
alert(str.format("Hit P{0}L", tf))
dwm() =>
if tf_limit_is_equal_or_more_chart_tf
// DWM - Separators
dwm_sep("D", ds, d_sep_line, d_color)
dwm_sep("W", ws, w_sep_line, w_color)
dwm_sep("M", ms, m_sep_line, m_color)
// DWM - Open Lines
dwm_open("D", show_d_open, d_line, d_label, d_info, d_color)
dwm_open("W", show_w_open, w_line, w_label, w_info, w_color)
dwm_open("M", show_m_open, m_line, m_label, m_info, m_color)
// DWM - Highs and Lows
dwm_hl("D", dhl, d_hl, d_info, d_color)
dwm_hl("W", whl, w_hl, w_info, w_color)
dwm_hl("M", mhl, m_hl, m_info, m_color)
method vline(ts_helper this) =>
bool t = not na(time("", this.session, gmt_tz))
bool t_prev = not na(time("", this.session, gmt_tz, bars_back = 1))
array arr = this.lines
color col = this.c
if t and not t_prev
arr.unshift(line.new(bar_index, high * 1.0001, bar_index, low, style = vl_style, width = vl_width, extend = extend.both, color = col))
if not v_unlimited
if arr.size() > max_days
arr.pop().delete()
vlines() =>
if tf_limit_is_equal_or_more_chart_tf
for in ts_data
vline(value)
method hz_line(lines_helper this) =>
bool t = not na(time("", this.h, gmt_tz))
bool t_prev = not na(time("", this.h, gmt_tz, bars_back = 1))
hz hz = this._hz
string txt = this.h_text
color col = this.h_color
if t and not t_prev
hz.LN.unshift(line.new(bar_index, open, bar_index, open, style = hz_style, width = hz_width, color = col))
hz.LB.unshift(label.new(bar_index, open, txt, style = label.style_label_left, color = transparent, textcolor = txt_color, size = lbl_size))
array.unshift(hz.CO, false)
if not open_unlimited and hz.LN.size() > max_days
hz.LN.pop().delete()
hz.LB.pop().delete()
hz.CO.pop()
if not t and hz.CO.size() > 0
if not hz.CO.get(0)
hz.LN.get(0).set_x2(bar_index)
hz.LB.get(0).set_x(bar_index)
if (use_cutoff ? t_co : false)
hz.CO.set(0, true)
hz_lines() =>
if tf_limit_is_equal_or_more_chart_tf
for in lines
hz_line(value)
del_kz(kz k) =>
if k._box.size() > max_days
k._box.pop().delete()
if k._hi_line.size() > max_days
k._hi_line.pop().delete()
k._lo_line.pop().delete()
k._hi_valid.pop()
k._lo_valid.pop()
if show_midpoints
k._md_line.pop().delete()
k._md_valid.pop()
if k._hi_label.size() > max_days
k._hi_label.pop().delete()
k._lo_label.pop().delete()
update_price_string(label L, float P) =>
S = L.get_text()
pre = str.substring(S, 0, str.pos(S, " "))
str.trim(pre)
L.set_text(str.format("{0} ({1})", pre, P))
adjust_in_kz(kz kz, bool t) =>
if t
kzBox0 = kz._box.get(0)
kzBox0.set_right(time)
newTop = math.max(kzBox0.get_top(), high)
kzBox0.set_top(newTop)
newBottom = math.min(kzBox0.get_bottom(), low)
kzBox0.set_bottom(newBottom)
kz._range_current := newTop - newBottom
if show_pivots and kz._hi_line.size() > 0
kzHiLine0 = kz._hi_line.get(0)
kzHiLine0.set_x2(time)
if high > kzHiLine0.get_y1()
kzHiLine0.set_xy1(time, high)
kzHiLine0.set_xy2(time, high)
kzLoLine0 = kz._lo_line.get(0)
kzLoLine0.set_x2(time)
if low < kzLoLine0.get_y1()
kzLoLine0.set_xy1(time, low)
kzLoLine0.set_xy2(time, low)
if show_midpoints
kzMidLine0 = kz._md_line.get(0)
kzMidLine0.set_x2(time)
kzMidLine0.set_xy1(time, math.avg(kzHiLine0.get_y2(), kzLoLine0.get_y2()))
kzMidLine0.set_xy2(time, math.avg(kzHiLine0.get_y2(), kzLoLine0.get_y2()))
if show_labels and kz._hi_label.size() > 0
if label_right
kz._hi_label.get(0).set_x(time)
kz._lo_label.get(0).set_x(time)
if high > kz._hi_label.get(0).get_y()
kz._hi_label.get(0).set_xy(time, high)
if label_price
update_price_string(kz._hi_label.get(0), high)
if low < kz._lo_label.get(0).get_y()
kz._lo_label.get(0).set_xy(time, low)
if label_price
update_price_string(kz._lo_label.get(0), low)
adjust_out_kz(kz kz, bool t, bool t_prev) =>
boxCount = kz._box.size()
if not t and boxCount > 0
if t_prev
array.unshift(kz._range_store, kz._range_current)
if kz._range_store.size() > range_avg
kz._range_store.pop()
if show_pivots and boxCount > 0
for i = 0 to boxCount - 1 by 1
if not ext_current or i == 0
kzHiValid = kz._hi_valid.get(i)
if ext_past or kzHiValid
kz._hi_line.get(i).set_x2(time)
if show_labels and label_right
kz._hi_label.get(i).set_x(time)
if kzHiValid and high > kz._hi_line.get(i).get_y1()
if use_alerts and i == 0
alert('Broke ' + kz._title + ' High', alert.freq_once_per_bar)
kz._hi_valid.set(i, false)
if show_labels and label_right
kz._hi_label.get(i).set_style(label.style_label_down)
else if use_cutoff ? t_co : false
kz._hi_valid.set(i, false)
kzLoValid = kz._lo_valid.get(i)
if ext_past or kzLoValid
kz._lo_line.get(i).set_x2(time)
if show_labels and label_right
kz._lo_label.get(i).set_x(time)
if kzLoValid and low < kz._lo_line.get(i).get_y1()
if use_alerts and i == 0
alert("Broke " + kz._title + " Low", alert.freq_once_per_bar)
kz._lo_valid.set(i, false)
if show_labels and label_right
kz._lo_label.get(i).set_style(label.style_label_up)
else if use_cutoff ? t_co : false
kz._lo_valid.set(i, false)
if show_midpoints and not t
if stop_midpoints ? kz._md_valid.get(i) : true
kz._md_line.get(i).set_x2(time)
if kz._md_valid.get(i) and low <= kz._md_line.get(i).get_y1() and high >= kz._md_line.get(i).get_y1()
kz._md_valid.set(i, false)
else
break
method manage_kz(kz_helper this) =>
kz kz = this._kz
c = this.c
string box_txt = this.box_txt
string hi_txt = this.hi_txt
string lo_txt = this.lo_txt
if tf_limit_is_equal_or_more_chart_tf
t = not na(time("", this.session, gmt_tz))
t_prev = not na(time("", this.session, gmt_tz, bars_back = 1))
if t and not t_prev
_c = get_box_color(c)
_t = get_text_color(c)
kz._box.unshift(box.new(time, high, time, low, xloc = xloc.bar_time, border_color = show_kz ? _c : na, bgcolor = show_kz ? _c : na, text = show_kz and show_kz_text ? box_txt : na, text_color = _t))
if show_pivots
kz._hi_line.unshift(line.new(time, high, time, high, xloc = xloc.bar_time, style = kzp_style, color = c, width = kzp_width))
kz._lo_line.unshift(line.new(time, low, time, low, xloc = xloc.bar_time, style = kzp_style, color = c, width = kzp_width))
if show_midpoints
kz._md_line.unshift(line.new(time, math.avg(high, low), time, math.avg(high, low), xloc = xloc.bar_time, style = kzm_style, color = c, width = kzm_width))
array.unshift(kz._md_valid, true)
array.unshift(kz._hi_valid, true)
array.unshift(kz._lo_valid, true)
if show_labels
_hi_txt = label_price ? str.format('{0} ({1})', hi_txt, high) : hi_txt
_lo_txt = label_price ? str.format('{0} ({1})', lo_txt, low) : lo_txt
if label_right
kz._hi_label.unshift(label.new(time, high, _hi_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_left, size = lbl_size))
kz._lo_label.unshift(label.new(time, low, _lo_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_left, size = lbl_size))
else
kz._hi_label.unshift(label.new(time, high, _hi_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_down, size = lbl_size))
kz._lo_label.unshift(label.new(time, low, _lo_txt, xloc = xloc.bar_time, color = transparent, textcolor = txt_color, style = label.style_label_up, size = lbl_size))
del_kz(kz)
adjust_in_kz(kz, t)
adjust_out_kz(kz, t, t_prev)
for in _kz
manage_kz(value)
dwm()
vlines()
hz_lines()
new_dow_time = dow_xloc == 'Midday' ? time - timeframe.in_seconds("D") / 2 * 1000 : time
new_day = dayofweek(new_dow_time, gmt_tz) != dayofweek(new_dow_time, gmt_tz)
var dow_top = dow_yloc == 'Top'
var saturday = "SATURDAY"
var sunday = "SUNDAY"
var monday = "MONDAY"
var tuesday = "TUESDAY"
var wednesday = "WEDNESDAY"
var thursday = "THURSDAY"
var friday = "FRIDAY"
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 1 and new_day and not dow_hide_wknd, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = sunday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 2 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = monday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 3 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = tuesday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 4 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = wednesday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 5 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = thursday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 6 and new_day, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = friday)
plotchar(dow_labels and timeframe.isintraday and dayofweek(new_dow_time, gmt_tz) == 7 and new_day and not dow_hide_wknd, location = dow_top ? location.top : location.bottom, char = '', textcolor = txt_color, text = saturday)
get_min_days_stored() =>
store = array.new_int()
for in _kz
int tmpStoreSize = value._kz._range_store.size()
if tmpStoreSize > 0
store.push(tmpStoreSize)
store.min()
method set_table(table tbl, kz kz, int row, string txt, bool t, color col) =>
table.cell(tbl, 0, row, txt, text_size = range_size, bgcolor = get_box_color(col), text_color = txt_color)
table.cell(tbl, 1, row, str.tostring(kz._range_current), text_size = range_size, bgcolor = t ? get_box_color(col) : na, text_color = txt_color)
if show_range_avg
table.cell(tbl, 2, row, str.tostring(kz._range_store.avg()), text_size = range_size, text_color = txt_color)
if show_range and barstate.islast
var tbl = table.new(range_pos, 10, 10, chart.bg_color, chart.fg_color, 2, chart.fg_color, 1)
table.cell(tbl, 0, 0, "Killzone", text_size = range_size, text_color = txt_color)
table.cell(tbl, 1, 0, "Range", text_size = range_size, text_color = txt_color)
if show_range_avg
table.cell(tbl, 2, 0, "Avg (" + str.tostring(get_min_days_stored()) + ")", text_size = range_size, text_color = txt_color)
for in _kz
set_table(tbl, value._kz, index + 1, value.box_txt, not na(time("", value.session, gmt_tz)), value.c)
// ---------------------------------------- Core Logic --------------------------------------------------
Indicator
CHAM TREND SYSTEM v3.0 PRECISION MA CROSSCHAM TREND SYSTEM v3.0 — PRECISION MA CROSS
CHAM TREND SYSTEM is an advanced multi-confluence PulseWire indicator designed to identify high-quality BUY and SELL opportunities by combining trend, market structure, moving-average crossovers, volume, liquidity, supply and demand, support and resistance.
KEY FEATURES
• **MA Cross** — configurable Fast and Slow MA for momentum and trend-change confirmation.
• **SMMA 50** — identifies the immediate market trend.
• **EMA 200** — filters the overall market direction.
• **Precision BUY/SELL Signals** — requires multiple confirmations before generating a signal.
• **Market Structure** — detects HH, HL, LH and LL.
• **Supply & Demand Zones** — identifies potential institutional reaction areas.
• **Liquidity Sweeps** — detects potential stop-hunts above highs and below lows.
• **Volume Confirmation** — filters weak breakouts and low-volume signals.
• **Support & Resistance** — automatically tracks important price levels.
• **RSI Momentum Filter** — confirms directional momentum.
• **ATR Stop & Targets** — provides dynamic SL and TP reference levels.
• **Signal Cooldown** — reduces repeated signals during the same move.
• **Alerts** — receive notifications for MA crosses, liquidity events and confirmed CHAM BUY/SELL signals.
CHAM METHOD
**TREND → MA CROSS → STRUCTURE → ZONE → LIQUIDITY → VOLUME → CONFIRMATION → ENTRY**
CHAM TREND SYSTEM does not predict the future or guarantee profits. Markets are uncertain, and every signal should be combined with proper risk management and independent analysis.
Indicator
Indicator
PRO EMA 9/20 MTF XAUUSD📊 PRO EMA 9/20 MTF XAUUSD Indicator — Description
Ye indicator XAUUSD (Gold) ke liye professional-style trend-following setup ko target karta hai. Iska main purpose 9 EMA aur 20 EMA crossover ko multiple confirmations ke saath filter karke relatively high-quality BUY/SELL setups identify karna hai.
🔹 Main Features
1. 9 EMA + 20 EMA
9 EMA = short-term momentum
20 EMA = short-term trend
9 EMA 20 EMA ke upar cross → BUY setup
Indicator
Mike Strategy orb opening HTF candles FVG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Indicator
Indicator
AquaBlu 7.0 Replay-Calibrated ICT Selector [NQ1! 1m -> MNQ]update on my 4.2 aquablu indicator. I ran my ai through 114 trades and it got 112 winners. enjoy everyone. were gonna make it
Indicator
RTH Gap [TakingProphets]OVERVIEW
RTH Gap marks the Opening Range Gap: the gap between the prior regular-session close and the next regular-session open.
It measures from the prior RTH close at 4:14 PM New York time to the next RTH open at 9:30 AM New York time, draws that range as a box, and overlays quadrant levels at 0, 25, 50, 75, and 100 percent.
This indicator does not provide trading signals, entries, or forecasts. It is a visualization aid for studying the Opening Range Gap within an ICT-style analytical framework.
The Opening Range Gap (ORG) is the space between where the regular session closed and where it reopened the next day. Within ICT-style education, this gap and its internal quadrants, especially the 50 percent midpoint, are studied for how price reacts when it trades back into them. This tool marks the gap and its quadrants automatically so they can be reviewed objectively rather than drawn by hand.
PURPOSE AND SCOPE
-----------------------------------------------------------------------------------------------
The tool serves as a research and study aid to document and analyze the Opening Range Gap and its internal levels.
It is commonly used to:
Automate the marking of the daily RTH gap and its quadrants.
Study how price reacts at the 50 percent midpoint and the other quadrant levels.
Keep several prior gaps on the chart for multi-day review.
Journal how often a gap is filled, respected, or rejected.
Teach the Opening Range Gap concept in a mentorship or training context.
LOGIC STRUCTURE
-----------------------------------------------------------------------------------------------
RTH Gap detects the gap on the 1-minute series and displays it consistently on any chart timeframe.
Detection
The prior RTH close is captured at 4:14 PM New York time.
The next RTH open is captured at 9:30 AM New York time.
The gap between those two prices becomes the range for that session.
Detection runs on the 1-minute series and its values are latched, so the gap displays correctly whether the chart is on a low or high timeframe.
Quadrants
The gap is drawn as a box, with horizontal levels at 0, 25, 50, 75, and 100 percent of the range.
Each level can be toggled, colored, and styled independently, and optionally labeled with its percentage and formation date.
Selection and Retention
The number of gaps shown is user controlled.
Gaps can be selected either by how recently they formed or by proximity of their midpoint to current price.
An IPDA lookback setting controls how far back gaps are retained before being pruned.
COMPONENTS AND VISUALS
-----------------------------------------------------------------------------------------------
Gap Box — The range between the prior RTH close and the next RTH open.
Quadrant Levels — Horizontal lines at 0, 25, 50, 75, and 100 percent of the gap.
Quadrant Labels — Optional labels showing each level's percentage and, if enabled, the gap's formation date.
INPUT CATEGORIES
-----------------------------------------------------------------------------------------------
General — Enable toggle, IPDA lookback length, date-prefix and quadrant-label toggles, and the selection mode (Most recent or Proximity).
Opening Range Gaps — Master visibility and how many gaps to display.
Opening Range Gap Style — Box color, fill and border options, gradient toggle, label color and size, and independent visibility, color, style, and width for each of the five quadrant levels.
USAGE GUIDELINES
-----------------------------------------------------------------------------------------------
RTH Gap is suited for the review and documentation of Opening Range Gap behavior.
Recommended educational workflows:
Mark the daily RTH gap and review how price interacts with its 50 percent midpoint.
Keep two or three prior gaps on the chart to study multi-day reactions.
Compare gaps that fill quickly against those that hold as support or resistance.
Switch between Most recent and Proximity modes depending on the study.
Teach the Opening Range Gap concept in mentorship or training sessions.
The tool is oriented toward regular-session index futures, where the RTH gap is most applicable.
OPERATIONAL NOTES AND LIMITATIONS
-----------------------------------------------------------------------------------------------
Detection is based on the 4:14 PM and 9:30 AM New York session times and is oriented toward regular-session instruments.
Gap values are latched from the 1-minute series so they display on any chart timeframe.
The selection mode and display count control which gaps appear, not how many are detected.
The IPDA lookback setting controls how far back gaps are retained.
The box, quadrant lines, and labels are visual study aids only.
This tool does not include setups, entries, targets, or alerts.
ORIGINALITY AND ATTRIBUTION
-----------------------------------------------------------------------------------------------
The detection and rendering engine is written from scratch in Pine v6, using a latched 1-minute session-time detector so the gap displays on any timeframe, a quadrant gradient system with per-level styling, two selection modes, and a lookback-based retention system.
Core concepts such as the Opening Range Gap and its quadrant levels are publicly taught within ICT-style market education. This implementation was designed and engineered by TakingProphets.
TERMS AND DISCLAIMER
-----------------------------------------------------------------------------------------------
This indicator is for educational and informational use only. It does not provide financial advice or predictive output. Historical patterns do not guarantee future results. All users remain responsible for their own decisions. Use of this script implies agreement with PulseWire's Terms of Use.
Indicator
SMC Institutional Ultimate [White Theme]SMC Institutional Ultimate
SMC Institutional Ultimate is an advanced Smart Money Concepts (SMC) charting suite specifically optimized for high visual clarity on light and white background chart setups. It bridges dynamic market structure shifts, institutional order blocks, major swing signals, and auto-calculated Fibonacci retracement levels into a clean, clutter-free layout.
Key Features
1. Dynamic Market Structure (BOS & CHoCH)
Automatically identifies key market structure transitions. Highlights trend reversals as Change of Character (CHoCH) and structural trend continuations as Break of Structure (BOS) using subtle, non-overlapping dashed levels.
2. High Probability Order Blocks (OB)
Detects high-volume institutional accumulation and distribution order blocks using engulfing order flow logic. Order block boxes project seamlessly into current price action for precise mitigation tracking.
3. Major Swing BUY & SELL Badges
Identifies major market pivots and marks high-probability reaction levels with clean, confirmed BUY and SELL badges placed directly at key swing highs and lows.
4. Auto Fibonacci Optimal Trade Entry (OTE)
Dynamically plots key Fibonacci retracement levels across recent swing ranges. Displays the 0.50 Equilibrium level, 0.618 Golden Pocket, and 0.786 Deep Discount zone directly on the active chart bars.
5. White Theme Optimization
Features high-contrast, professional color palettes specifically selected for white chart backgrounds to ensure optimal readability and visual elegance.
Settings Configuration
- Market Structure: Adjust sensitivity lookbacks and line colors for BOS and CHoCH.
- Order Blocks: Customize order block lookbacks and border/fill opacities.
- Major Swing Signals: Fine-tune pivot sensitivity for BUY and SELL badges.
- Fibonacci Levels: Toggle auto-fib levels and adjust color preferences.
Disclaimer
This script is built strictly for analytical and educational charting purposes. It does not provide financial advice or guaranteed trading results. Practice prudent risk management at all times.
Indicator























