Spooky Time (10/31/25) [VTB]Get ready to add some eerie fun to your charts this Halloween! "Spooky Time" is a lighthearted indicator that draws a festive, animated Halloween scene right on your TradingView chart. Perfect for traders who want to celebrate the spooky season without missing a beat on the markets. Whether you're analyzing stocks, crypto, or forex, this overlay brings a touch of holiday spirit to your setup.
#### Key Features:
- **Jack-o'-Lantern Pumpkin**: A detailed, glowing pumpkin with carved eyes, nose, and a jagged mouth. The eyes and mouth cycle through black (off), yellow, and red glows for a subtle animation effect, giving it that classic haunted vibe.
- **Flickering Candle**: A wax candle with a wick and an animated flame that shifts positions slightly across three frames, mimicking a real flickering light. The flame color changes between yellow, red, and orange for added dynamism.
- **Spider Web and Spider**: A spiral web with radial lines, complete with a creepy-crawly spider. The spider's legs animate with small movements, as if it's ready to pounce—perfect for that extra spooky touch!
- **Customization Options**: Toggle the "Desiringmachine" label on/off, choose its position on the chart (e.g., Bottom Center), and select the text color. The entire scene is positioned relative to the chart's open price and ATR for better scaling.
- **Animation Cycle**: The whole setup uses a simple 3-frame animation based on bar_index, making it feel alive without overwhelming your chart.
This indicator is purely visual and non-intrusive—it doesn't plot any trading signals or data, so it won't interfere with your strategies. Just add it to your chart for some Halloween cheer during your trading sessions!
**Date Note**: Timed for Halloween 2025 (10/31/25)—feel the spooky energy!
**Happy Halloween!!!** 🎃👻🕸️
Indicatori e strategie
Opposing Candle V1Opposing Candle Indicator Summary:
This indicator detects engulfing candles (where the current candle's high is above the previous candle's high AND the low is below the previous candle's low) across multiple trading sessions.
Key Features:
Multi-timeframe detection - Works on any timeframe you set (default 15min)
Session filtering - Detects opposing candles during Q1-Q4 of four major sessions: Asia, London, NYAM, and NYPM
Visual representation - Draws colored boxes (green for bullish, red for bearish) with extension lines showing:
High line
Low line
Midline (dotted white)
Open line (black)
Customizable - Adjust box/line extensions, colors, line widths, and max number of candles displayed
Optional labels - Can show session names and timeframe on each detection
Status table - Displays current settings in top-right corner
Alerts - Notifies when new opposing candles are detected
What it does: Helps identify potential support/resistance zones created by strong engulfing price action during key trading hours, with the open price highlighted as an additional reference level.
Zarks 4H Range, 15M Triggers Pt1HTF Dividers + 4H Candle Structure + CRT Reference Tool
🔹 Vertical Blue Lines → represent divisions of the 4-hour timeframe, helping you visually segment intraday structure into HTF blocks.
Green Dotted Line → marks the High of each 4-hour interval.
🔵 Blue Dotted Line → shows the Open of that 4-hour interval.
⚫ Gray Dotted Line → displays the Close of that 4-hour interval.
🔴 Red Dotted Line → highlights the Low of that 4-hour interval.
💡 CRT Concepts (Candle Range Theory by Romeo TPT)
CRT signals are not direct buy/sell signals ❌💰 — they serve as contextual reference points 🧭.
A high-probability setup often appears when:
A 4H sweep of a previous candle’s high occurs 🐢 (liquidity manipulation),
Followed by a bearish 15-minute close,
Targeting the 50% retracement of that 4H candle’s range 🎯.
📊 Use this tool to frame market structure across timeframes, align entries with liquidity events, and visualize when price may be expanding from or reverting to institutional reference points.
This indicator is meant to be combined with vertical lines on the 15 min time frame at corresponding times example 1:45,4:45,9:45
MA99+MA200+MA400HMA+SLMA+HMA+SL,you can type your enter price,00000011111112222223333333444444455555666666
Futures Gann MonthBuilds a a continuous chart of the same month for a futures contract (e.g. ZSH2026).
This means such a chart consists of March '22, March '23, March '24, March '25, March '26...
The script goes back 20 years at most (depending on the current ticker selected in TradingView).
Auto Session Fib/Open LevelsThis indicator automatically plots fib levels and key opening levels so you don't have to (:
Default levels are set to Longhorn Trades (Peter Kennedy) fib settings and two key openings of my liking.
Idan Moskoבאי/סאייל - עידן מוסקו
אלגוריתם חכם לאיתותי BUY/SELL בלבד על הגרף ✅❌
משלב: ICT (BOS/CHOCH, Order Blocks, Liquidity), FVG/IFVG, Premium/Discount, EMA/MCB, תבניות נרות, וסינון תנודתיות.
איך זה עובד?
➡️ מזהה שבירת מבנה + דחיפה (Displacement)
➡️ בודק אזורי נזילות/OB + מיקום PD (Premium/Discount)
➡️ מאשר עם EMA/MCB/תבניות → מציג BUY או SELL בלבד
טיפים:
לטיימפריים מהירים → Profile: Aggressive
עובד על: 1m / 5m / 15m / 30m / 1H / 4H / 1D
התראות:
🔔 יש התראות מוכנות: “BUY v3” / “SELL v3”
הערה: אין ייעוץ השקעות. מומלץ לאשר עם ניהול סיכונים (SL/TP) 📉📈
Idan Mosko – BUY/SELL
Smart BUY/SELL only ✅❌ using ICT (BOS/CHOCH, OB, Liquidity) + FVG/IFVG, PD, EMA/MCB, and candle patterns.
Modes:
Close-confirmed ✔️ safer
Realtime ⚡ earlier entries
Tips:
Aggressive → more signals • Conservative → cleaner signals.
Works on 1m–1D. Alerts: “BUY v3” / “SELL v3”.
Not financial advice; use proper risk management.
Supertrend with Coppock Curve and Dynamic Time WindowOverview
This indicator combines the **Supertrend** trend-following system with the **Coppock Curve** momentum oscillator to generate high-probability buy and sell signals. An additional **dynamic time window filter** ensures trades only occur during your specified trading hours, making it ideal for intraday traders who want to avoid low-liquidity periods.
How It Works
**Signal Generation:**
- **BUY Signal** (Green label below bar): Triggered when the Coppock Curve crosses above zero, the Supertrend confirms an uptrend, and the current time is within your specified trading window
- **SELL Signal** (Purple label above bar): Triggered when the Coppock Curve crosses below zero, the Supertrend confirms a downtrend, and the current time is within your specified trading window
**Triple Confirmation System:**
1. **Coppock Curve** - Identifies momentum shifts using rate-of-change calculations
2. **Supertrend** - Confirms the prevailing trend direction to filter false signals
3. **Time Window** - Ensures trades only occur during high-liquidity hours
Input Parameters
**Supertrend Settings:**
- **ATR Length** (Default: 19) - Period for calculating the Average True Range
- **Factor** (Default: 3.0) - Multiplier for ATR to determine Supertrend sensitivity
**Time Window Settings (Tehran Time UTC+3:30):**
- **Start Hour/Minute** (Default: 10:30) - Beginning of active trading window
- **End Hour/Minute** (Default: 22:30) - End of active trading window
Best Practices
- Works best on **trending markets** due to the Supertrend filter
- Recommended timeframes: **15min, 30min, 1H, 4H**
- Lower the Factor value (2.0-2.5) for more signals in volatile markets
- Increase the Factor value (3.5-4.0) for fewer, higher-quality signals in ranging markets
- Adjust the time window to match your market's peak liquidity hours
Risk Disclaimer
This indicator is for educational purposes only. Always use proper risk management, position sizing, and combine with your own analysis before making trading decisions.
나의 strategy//@version=6
strategy("Jimb0ws Strategy + All Bubble Zones + Golden Candles + Limited Signals", overlay=true, calc_on_every_tick=true, max_bars_back=5000)
// ─── INPUTS ─────────────────────────────────────────────────────────────────
pipBodyTol = input.float(0, title="Pip Tolerance for Body Touch", step=0.0001)
pipWickTol = input.float(0.002, title="Pip Tolerance for Wick Touch", step=0.0001)
maxBodyDrive = input.float(0, title="Max Drive from EMA for Body", step=0.0001)
maxWickDrive = input.float(0.002, title="Max Drive from EMA for Wick", step=0.0001)
fractalSizeOpt = input.string("small", title="Fractal Size", options= )
minBodySize = input.float(0, title="Min Body Size for Golden Candle", step=0.0001)
longOffsetPips = input.int(25, title="Long Label Offset (pips)", minval=0)
shortOffsetPips = input.int(25, title="Short Label Offset (pips)", minval=0)
consolOffsetPips = input.int(25, title="Consolidation Label Offset (pips)", minval=0)
longSignType = input.string("Label Down", title="Long Bubble Sign Type", options= )
shortSignType = input.string("Label Up", title="Short Bubble Sign Type", options= )
consolSignType = input.string("Label Down", title="Consolidation Bubble Sign Type", options= )
enable1hEmaFilter = input.bool(true, title="Disable Signals beyond 1H EMA50")
showZones = input.bool(true, title="Show Bubble Zones")
showSigns = input.bool(true, title="Show Bubble Signs")
maxSignalsPerBubble = input.int(3, title="Max Signals Per Bubble", minval=1)
// Toggle for session filter
enableSessionFilter = input.bool(true, title="Enable Active Trading Session Filter")
sessionInput = input.session("0100-1900", title="Active Trading Session")
tzInput = input.string("Europe/London", title="Session Timezone",
options= )
actualTZ = tzInput == "Exchange" ? syminfo.timezone : tzInput
infoOffsetPips = input.int(5, title="Info Line Offset Above Price (pips)", minval=0)
warnOffsetPips = input.int(10, title="Warning Label Offset Above Infobar (pips)", minval=0)
show1HInfo = input.bool(true, title="Show 1H Bubble Info")
bufferLimit = 5000 - 1
enableProxFilter = input.bool(true, title="Disable Signals Near 1H EMA50")
proxRangePips = input.int(10, title="Proximity Range (pips)", minval=0)
enableWickFilter = input.bool(true, title="Filter Golden-Candle Wick Overdrive")
wickOverdrivePips = input.int(0, title="Wick Overdrive Range (pips)", minval=0)
// turn Robin candles on/off
enableRobin = input.bool(true, title="Enable Robin Candles")
// ATR panel attached to 4H info
showPrevDayATR = input.bool(true, title="Show Previous Day ATR Panel")
atrLenPrevDay = input.int(14, title="ATR Length (Daily)", minval=1)
atrPanelOffsetPips = input.int(3, title="ATR Panel Offset Above 4H Info (pips)", minval=0)
// ─── STRATEGY TRADES (EMA200 SL, RR=2 TP) ───────────────────────────────────
enableAutoTrades = input.bool(true, title="Enable Strategy Entries/Exits")
takeProfitRR = input.float(2.0, title="TP Risk:Reward (x)", step=0.1, minval=0.1)
// ─── SL/TP info label on signals ─────────────────────────────────────────────
showSLTPPanel = input.bool(true, title="Show SL/TP Info Above Signals")
sltpOffsetPips = input.int(4, title="SL/TP Label Offset (pips)", minval=0)
// Previous Day ATR (D1, lookahead OFF) -> lock to yesterday with
dailyATR = request.security(syminfo.tickerid, "D", ta.atr(atrLenPrevDay),
lookahead=barmerge.lookahead_off, gaps=barmerge.gaps_off)
prevDayATR = dailyATR
// Convert to pips (FX: pip ≈ mintick*10)
pipValueFX = syminfo.mintick * 10.0
prevATR_pips_1d = na(prevDayATR) ? na : math.round((prevDayATR / pipValueFX) * 10.0) / 10.0
// Create table once
var table atrPanel = na
if barstate.isfirst and na(atrPanel)
// columns=1, rows=2 (title row + value row)
atrPanel := table.new(position.top_right, 1, 2, border_width=1,
frame_color=color.new(color.gray, 0), border_color=color.new(color.gray, 0))
// Update cells each last bar
if barstate.islast and not na(atrPanel)
if showPrevDayATR
titleTxt = "Prev Day ATR (" + str.tostring(atrLenPrevDay) + ")"
valTxt = na(prevDayATR) ? "n/a"
: str.tostring(prevATR_pips_1d) + " pips (" + str.tostring(prevDayATR, format.mintick) + ")"
table.cell(atrPanel, 0, 0, titleTxt, text_color=color.white, bgcolor=color.new(color.blue, 25))
table.cell(atrPanel, 0, 1, valTxt, text_color=color.white, bgcolor=color.new(color.black, 0))
else
// Hide panel by writing empty strings
table.cell(atrPanel, 0, 0, "")
table.cell(atrPanel, 0, 1, "")
// Visuals for orders
showSLTP = input.bool(true, title="Show SL/TP Lines & Labels")
// ─── EMA CALCULATIONS & PLOTTING ──────────────────────────────────────────────
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
ema50_1h = request.security(syminfo.tickerid, "60", ta.ema(close, 50), lookahead=barmerge.lookahead_on)
plot(ema20, color=color.white, linewidth=4, title="EMA20")
plot(ema50, color=color.yellow, linewidth=4, title="EMA50")
plot(ema100, color=color.blue, linewidth=4, title="EMA100")
plot(ema200, color=color.purple, linewidth=6, title="EMA200") // ← and this
plot(ema50_1h, title="EMA50 (1H)", color=color.yellow, linewidth=2)
// pip-unit helper
pipUnit1h = syminfo.mintick * proxRangePips * 10
upperBand1h = ema50_1h + pipUnit1h
lowerBand1h = ema50_1h - pipUnit1h
// draw top/bottom lines in one-liner plots, then fill the gap
p_top = plot(enableProxFilter ? upperBand1h : na, title="Prox Zone Top", color=color.new(color.yellow,90), linewidth=1)
p_bottom = plot(enableProxFilter ? lowerBand1h : na, title="Prox Zone Bottom", color=color.new(color.yellow,90), linewidth=1)
fill(p_top, p_bottom, color.new(color.yellow,90))
// ─── BUBBLE CONDITIONS & ZONES ───────────────────────────────────────────────
longBub = ema20 > ema50 and ema50 > ema100
shortBub = ema20 < ema50 and ema50 < ema100
consolOn = not longBub and not shortBub
longCol = color.new(color.green, 85)
shortCol = color.new(color.red, 85)
consCol = color.new(color.orange, 85)
bgcolor(showZones ? (longBub ? longCol : shortBub ? shortCol : consCol) : na)
// convert pips to price‐units
wickOverUnit = syminfo.mintick * wickOverdrivePips * 10
// detect when the wick “pierces” EMA50 by more than that amount
overdriveLong = low < ema50 - wickOverUnit // long bubble: wick dipped below EMA50
overdriveShort = high > ema50 + wickOverUnit // short bubble: wick rose above EMA50
// ─── GOLDEN-CANDLE LOGIC & COLORING ──────────────────────────────────────────
trendLong = longBub
trendShort = shortBub
bodySize = math.abs(close - open)
hasBigBody = bodySize >= minBodySize
bodyLow = math.min(open, close)
bodyHigh = math.max(open, close)
wickLow = low
wickHigh = high
bOK20_L = bodyLow <= ema20 + pipBodyTol and bodyLow >= ema20 - maxBodyDrive and close > ema20
bOK50_L = bodyLow <= ema50 + pipBodyTol and bodyLow >= ema50 - maxBodyDrive and close > ema50
wOK20_L = wickLow <= ema20 + pipWickTol and wickLow >= ema20 - maxWickDrive and close > ema20
wOK50_L = wickLow <= ema50 + pipWickTol and wickLow >= ema50 - maxWickDrive and close > ema50
isGoldenLong = trendLong and hasBigBody and (bOK20_L or bOK50_L or wOK20_L or wOK50_L)
bOK20_S = bodyHigh >= ema20 - pipBodyTol and bodyHigh <= ema20 + maxBodyDrive and close < ema20
bOK50_S = bodyHigh >= ema50 - pipBodyTol and bodyHigh <= ema50 + maxBodyDrive and close < ema50
wOK20_S = wickHigh >= ema20 - pipWickTol and wickHigh <= ema20 + maxWickDrive and close < ema20
wOK50_S = wickHigh >= ema50 - pipWickTol and wickHigh <= ema50 + maxWickDrive and close < ema50
isGoldenShort= trendShort and hasBigBody and (bOK20_S or bOK50_S or wOK20_S or wOK50_S)
// ─── WICK-OVERDRIVE VETO ────────────────────────────────────────────────────
if enableWickFilter
// veto any golden on which the wick over-drove the EMA50
isGoldenLong := isGoldenLong and not overdriveLong
isGoldenShort := isGoldenShort and not overdriveShort
barcolor((isGoldenLong or isGoldenShort) ? color.new(#FFD700, 0) : na)
// ─── ROBIN CANDLES ──────────────────────────────────────────────────────────
goldShort1 = isGoldenShort
goldLong1 = isGoldenLong
goldLow1 = math.min(open , close )
goldHigh1 = math.max(open , close )
robinShort = shortBub and goldShort1 and math.min(open, close) < goldLow1
robinLong = longBub and goldLong1 and math.max(open, close) > goldHigh1
barcolor(enableRobin and (robinShort or robinLong) ? color.purple : na)
// ─── FRACTALS ─────────────────────────────────────────────────────────────────
pL = ta.pivotlow(low, 2, 2)
pH = ta.pivothigh(high, 2, 2)
plotshape(not shortBub and not consolOn and not na(pL) and fractalSizeOpt == "tiny",
style=shape.triangleup, location=location.belowbar, offset=-2, color=color.green, size=size.tiny)
plotshape(not shortBub and not consolOn and not na(pL) and fractalSizeOpt == "small",
style=shape.triangleup, location=location.belowbar, offset=-2, color=color.green, size=size.small)
plotshape(not shortBub and not consolOn and not na(pL) and fractalSizeOpt == "normal",
style=shape.triangleup, location=location.belowbar, offset=-2, color=color.green, size=size.normal)
plotshape(not shortBub and not consolOn and not na(pL) and fractalSizeOpt == "large",
style=shape.triangleup, location=location.belowbar, offset=-2, color=color.green, size=size.large)
plotshape(not longBub and not consolOn and not na(pH) and fractalSizeOpt == "tiny",
style=shape.triangledown, location=location.abovebar, offset=-2, color=color.red, size=size.tiny)
plotshape(not longBub and not consolOn and not na(pH) and fractalSizeOpt == "small",
style=shape.triangledown, location=location.abovebar, offset=-2, color=color.red, size=size.small)
plotshape(not longBub and not consolOn and not na(pH) and fractalSizeOpt == "normal",
style=shape.triangledown, location=location.abovebar, offset=-2, color=color.red, size=size.normal)
plotshape(not longBub and not consolOn and not na(pH) and fractalSizeOpt == "large",
style=shape.triangledown, location=location.abovebar, offset=-2, color=color.red, size=size.large)
// ─── BUY/SELL SIGNALS & LIMIT ─────────────────────────────────────────────────
var int buyCount = 0
var int sellCount = 0
if longBub and not longBub
buyCount := 0
if shortBub and not shortBub
sellCount := 0
goldLong2 = isGoldenLong
goldShort2 = isGoldenShort
roofCheck = math.max(open , close ) >= math.max(open , close )
floorCheck = math.min(open , close ) <= math.min(open , close )
buySignal = goldLong2 and not na(pL) and roofCheck
sellSignal = goldShort2 and not na(pH) and floorCheck
// Original: inSession = not na(time(timeframe.period, sessionInput, actualTZ))
inSessionRaw = not na(time(timeframe.period, sessionInput, actualTZ))
sessionOK = enableSessionFilter ? inSessionRaw : true
// Apply 1H EMA50 filter
disableBy1h = enable1hEmaFilter and ((request.security(syminfo.tickerid, "60", ema20 ema50_1h) or (request.security(syminfo.tickerid, "60", ema20>ema50 and ema50>ema100) and close < ema50_1h))
// ─── PROXIMITY VETO ────────────────────────────────────────────────
near1hZone = enableProxFilter and close >= lowerBand1h and close <= upperBand1h
validBuy = buySignal and sessionOK and buyCount < maxSignalsPerBubble and not disableBy1h and not near1hZone
validSell = sellSignal and sessionOK and sellCount < maxSignalsPerBubble and not disableBy1h and not near1hZone
plotshape(validBuy, title="BUY", style=shape.labelup, location=location.belowbar,
color=color.green, text="BUY $", textcolor=color.white, size=size.large)
plotshape(validSell, title="SELL", style=shape.labeldown, location=location.abovebar,
color=color.red, text="SELL $", textcolor=color.white, size=size.large)
if validBuy
buyCount += 1
if validSell
sellCount += 1
// ─── 4H BUBBLE INFO LINE ──────────────────────────────────────────────────────
var line infoLine4h = na
var label infoLbl4h = na
var label atrPrevLbl = na // ATR label handle
var string bubble4hType = na
var int bubble4hStartTime = na
var int bubble4hStartIdx = na
time4h = request.security(syminfo.tickerid, "240", time, lookahead=barmerge.lookahead_on)
ema20_4h = request.security(syminfo.tickerid, "240", ta.ema(close, 20), lookahead=barmerge.lookahead_on)
ema50_4h = request.security(syminfo.tickerid, "240", ta.ema(close, 50), lookahead=barmerge.lookahead_on)
ema100_4h = request.security(syminfo.tickerid, "240", ta.ema(close,100), lookahead=barmerge.lookahead_on)
long4h = ema20_4h > ema50_4h and ema50_4h > ema100_4h
short4h = ema20_4h < ema50_4h and ema50_4h < ema100_4h
cons4h = not long4h and not short4h
if long4h and not long4h
bubble4hType := "LONG"
bubble4hStartTime := time4h
bubble4hStartIdx := bar_index
else if short4h and not short4h
bubble4hType := "SHORT"
bubble4hStartTime := time4h
bubble4hStartIdx := bar_index
else if cons4h and not cons4h
bubble4hType := "CONS"
bubble4hStartTime := time4h
bubble4hStartIdx := bar_index
active4h = ((bubble4hType=="LONG" and long4h) or (bubble4hType=="SHORT" and short4h) or (bubble4hType=="CONS" and cons4h)) and not na(bubble4hStartTime)
if active4h
durH4 = math.floor((time - bubble4hStartTime) / 3600000)
ts4 = str.format("{0,date,yyyy-MM-dd} {0,time,HH:mm}", bubble4hStartTime)
txt4 = "4H " + bubble4hType + " Bubble since " + ts4 + " Dur: " + str.tostring(durH4) + "h"
col4 = bubble4hType=="LONG" ? color.green : bubble4hType=="SHORT" ? color.red : color.orange
pipUnit4 = syminfo.mintick * 10
infoPrice4 = high + (infoOffsetPips + warnOffsetPips + 5) * pipUnit4
xStart4 = math.max(bubble4hStartIdx, bar_index - bufferLimit)
if na(infoLine4h)
infoLine4h := line.new(xStart4, infoPrice4, bar_index, infoPrice4, extend=extend.none, color=col4, width=2)
else
line.set_xy1(infoLine4h, xStart4, infoPrice4)
line.set_xy2(infoLine4h, bar_index, infoPrice4)
line.set_color(infoLine4h, col4)
if na(infoLbl4h)
infoLbl4h := label.new(bar_index, infoPrice4, txt4, xloc.bar_index, yloc.price, col4, label.style_label_left, color.white, size.small)
else
label.set_xy(infoLbl4h, bar_index, infoPrice4)
label.set_text(infoLbl4h, txt4)
label.set_color(infoLbl4h, col4)
// Prev Day ATR label just above the 4H info panel
if showPrevDayATR
atrValTxt = na(prevDayATR) ? "n/a" : str.tostring(prevATR_pips_1d) + " pips (" + str.tostring(prevDayATR, format.mintick) + ")"
atrTxt = "Prev Day ATR (" + str.tostring(atrLenPrevDay) + ") " + atrValTxt
atrY = infoPrice4 + pipUnit4 * atrPanelOffsetPips
if na(atrPrevLbl)
atrPrevLbl := label.new(bar_index, atrY, atrTxt, xloc.bar_index, yloc.price, color.new(color.blue, 25), label.style_label_left, color.white, size.small)
else
label.set_xy(atrPrevLbl, bar_index, atrY)
label.set_text(atrPrevLbl, atrTxt)
label.set_color(atrPrevLbl, color.new(color.blue, 25))
else
if not na(atrPrevLbl)
label.delete(atrPrevLbl)
atrPrevLbl := na
else
// Cleanup when 4H panel is not active
if not na(infoLine4h)
line.delete(infoLine4h)
infoLine4h := na
if not na(infoLbl4h)
label.delete(infoLbl4h)
infoLbl4h := na
bubble4hType := na
if not na(atrPrevLbl)
label.delete(atrPrevLbl)
atrPrevLbl := na
// ─── 1H BUBBLE INFO & WARNING PANEL ─────────────────────────────────────────
var line infoLine1h = na
var label infoLbl1h = na
var label warnLbl1h = na
var string bubble1hType = na
var int bubble1hStartTime = na
var int bubble1hStartIdx = na
var float pipUnit = na
var color col = na
var int xStart = na
var float infoPrice = na
var string txt = ""
// 1H trend state (kept same logic as your original)
long1h = request.security(syminfo.tickerid, "60", ema20>ema50 and ema50>ema100, lookahead=barmerge.lookahead_on)
short1h = request.security(syminfo.tickerid, "60", ema20 ema50_1h
warnY = infoPrice1h + warnOffsetPips * pipUnit1h
if na(warnLbl1h)
warnLbl1h := label.new(bar_index, warnY, "Potential Consolidation Warning",
xloc.bar_index, yloc.price, color.new(color.yellow,0),
label.style_label_up, color.black, size.small)
else
label.set_xy(warnLbl1h, bar_index, warnY)
label.set_text(warnLbl1h, "Potential Consolidation Warning")
else
if not na(warnLbl1h)
label.delete(warnLbl1h)
warnLbl1h := na
else
if not na(infoLine1h)
line.delete(infoLine1h)
infoLine1h := na
if not na(infoLbl1h)
label.delete(infoLbl1h)
infoLbl1h := na
if not na(warnLbl1h)
label.delete(warnLbl1h)
warnLbl1h := na
bubble1hType := na
// ─── ALERTS ─────────────────────────────────────────────────────────────────
alertcondition(validBuy, title="Jimb0ws Strategy – BUY", message="🔥 BUY signal on {{ticker}} at {{close}}")
alertcondition(validSell, title="Jimb0ws Strategy – SELL", message="🔻 SELL signal on {{ticker}} at {{close}}")
if validBuy
alert("🔥 BUY signal on " + syminfo.ticker + " at " + str.tostring(close), alert.freq_once_per_bar_close)
if validSell
alert("🔻 SELL signal on " + syminfo.ticker + " at " + str.tostring(close), alert.freq_once_per_bar_close)
// ─── SL/TP drawing handles (globals) ────────────────────────────────────────
var line slLine = na
var line tpLine = na
var label slLabel = na
var label tpLabel = na
var float slPrice = na
var float tpPrice = na
// Working vars so they exist on all bars
var float longEntry = na
var float longSL = na
var float longTP = na
var float riskL = na
var float shortEntry = na
var float shortSL = na
var float shortTP = na
var float riskS = na
// last SL/TP info label so we can replace it each time
var label sltpInfoLbl = na
// ─── Draw SL/TP info label exactly when a signal fires ──────────────────────
if showSLTPPanel and (validBuy or validSell)
// delete prior info label
if not na(sltpInfoLbl)
label.delete(sltpInfoLbl)
float pipUnit = syminfo.mintick * 10.0
float yAbove = high + sltpOffsetPips * pipUnit
// Entry is the close of the signal bar
float entry = close
// Choose SL by your rule:
// - LONG: if ema200 > ema100 -> SL = ema100, else SL = ema200
// - SHORT: if ema200 < ema100 -> SL = ema100, else SL = ema200
bool isLong = validBuy
float sl = isLong ? (ema200 > ema100 ? ema100 : ema200)
: (ema200 < ema100 ? ema100 : ema200)
// Compute TP using RR; guard for bad risk
float rr = takeProfitRR // your RR input (e.g., 2.0)
float risk = isLong ? (entry - sl) : (sl - entry)
float tp = na
if risk > syminfo.mintick
tp := isLong ? (entry + rr * risk) : (entry - rr * risk)
// Build label text (mintick formatting)
string slTxt = "SL " + str.tostring(sl, format.mintick)
string tpTxt = na(tp) ? "TP n/a" : "TP " + str.tostring(tp, format.mintick)
string txt = slTxt + " " + tpTxt
// Color by side and draw
color bgCol = isLong ? color.new(color.green, 10) : color.new(color.red, 10)
sltpInfoLbl := label.new(bar_index, yAbove, txt,
xloc.bar_index, yloc.price,
bgCol, label.style_label_left, color.white, size.small)
// ─── ORDERS: dynamic SL (EMA100 vs EMA200), TP = RR * risk + draw SL/TP ─────
if enableAutoTrades and barstate.isconfirmed and not na(ema100) and not na(ema200)
// LONGS — if EMA200 > EMA100 ⇒ SL = EMA100; else ⇒ SL = EMA200
if validBuy and strategy.position_size <= 0
longEntry := close
longSL := ema200 > ema100 ? ema100 : ema200
if longSL < longEntry - syminfo.mintick
riskL := longEntry - longSL
longTP := longEntry + takeProfitRR * riskL
if strategy.position_size < 0
strategy.close("Short", comment="Flip→Long")
strategy.entry("Long", strategy.long)
strategy.exit("Long-EXIT", from_entry="Long", stop=longSL, limit=longTP)
// store & draw
slPrice := longSL
tpPrice := longTP
if showSLTP
if not na(slLine)
line.delete(slLine)
if not na(tpLine)
line.delete(tpLine)
if not na(slLabel)
label.delete(slLabel)
if not na(tpLabel)
label.delete(tpLabel)
// lines
slLine := line.new(bar_index, slPrice, bar_index + 1, slPrice, extend=extend.right, color=color.red, width=2)
tpLine := line.new(bar_index, tpPrice, bar_index + 1, tpPrice, extend=extend.right, color=color.green, width=2)
// labels with exact prices
slLabel := label.new(bar_index + 1, slPrice, "SL " + str.tostring(slPrice, format.mintick), xloc.bar_index, yloc.price, color.new(color.red, 10), label.style_label_right, color.white, size.small)
tpLabel := label.new(bar_index + 1, tpPrice, "TP " + str.tostring(tpPrice, format.mintick), xloc.bar_index, yloc.price, color.new(color.green, 10), label.style_label_right, color.white, size.small)
// SHORTS — if EMA200 < EMA100 ⇒ SL = EMA100; else ⇒ SL = EMA200
if validSell and strategy.position_size >= 0
shortEntry := close
shortSL := ema200 < ema100 ? ema100 : ema200
if shortSL > shortEntry + syminfo.mintick
riskS := shortSL - shortEntry
shortTP := shortEntry - takeProfitRR * riskS
if strategy.position_size > 0
strategy.close("Long", comment="Flip→Short")
strategy.entry("Short", strategy.short)
strategy.exit("Short-EXIT", from_entry="Short", stop=shortSL, limit=shortTP)
// store & draw
slPrice := shortSL
tpPrice := shortTP
if showSLTP
if not na(slLine)
line.delete(slLine)
if not na(tpLine)
line.delete(tpLine)
if not na(slLabel)
label.delete(slLabel)
if not na(tpLabel)
label.delete(tpLabel)
slLine := line.new(bar_index, slPrice, bar_index + 1, slPrice, extend=extend.right, color=color.red, width=2)
tpLine := line.new(bar_index, tpPrice, bar_index + 1, tpPrice, extend=extend.right, color=color.green, width=2)
slLabel := label.new(bar_index + 1, slPrice, "SL " + str.tostring(slPrice, format.mintick), xloc.bar_index, yloc.price, color.new(color.red, 10), label.style_label_right, color.white, size.small)
tpLabel := label.new(bar_index + 1, tpPrice, "TP " + str.tostring(tpPrice, format.mintick), xloc.bar_index, yloc.price, color.new(color.green, 10), label.style_label_right, color.white, size.small)
// Keep labels pinned to the right of current bar while trade is open
if showSLTP and strategy.position_size != 0 and not na(slPrice) and not na(tpPrice)
label.set_xy(slLabel, bar_index + 1, slPrice)
label.set_text(slLabel, "SL " + str.tostring(slPrice, format.mintick))
label.set_xy(tpLabel, bar_index + 1, tpPrice)
label.set_text(tpLabel, "TP " + str.tostring(tpPrice, format.mintick))
// Clean up drawings when flat
if strategy.position_size == 0
slPrice := na
tpPrice := na
if not na(slLine)
line.delete(slLine)
slLine := na
if not na(tpLine)
line.delete(tpLine)
tpLine := na
if not na(slLabel)
label.delete(slLabel)
slLabel := na
if not na(tpLabel)
label.delete(tpLabel)
tpLabel := na
Saty Pivot Ribbon Pro// Saty Pivot Ribbo Pro
// Copyright (C) 2022-2025 Saty Mahajan
//
// A Moving Average Ribbon system that simplifies measuring and using Moving Averages for trend and support/resistance.
// Special thanks to Ripster for his education and EMA Clouds which inspired this indicator.
//@version=5
indicator('Saty Pivot Ribbon Pro', 'Saty Pivot Ribbon Pro', overlay=true)
// Saty Color Theme
saty_green = color.rgb(0, 255, 30)
saty_blue = color.rgb(0, 185, 255)
saty_red = color.rgb(255, 0, 0)
saty_orange = color.rgb(255, 150, 0)
saty_yellow = color.rgb(255,255,0)
saty_violet = color.rgb(150, 100, 255)
saty_purple = color.rgb(150, 0, 150)
saty_pink = color.rgb(255, 0, 255)
saty_white = color.rgb(255, 255, 255)
saty_light_gray = color.rgb(200,200,200)
saty_gray = color.rgb(150,150,150)
saty_dark_gray = color.rgb(100,100,100)
saty_black = color.rgb(0, 0, 0)
// Settings
time_warp = input.string("off", 'Time Warp', options= )
fast_ema = input(title='Fast EMA Length', defval=8)
show_fast_ema_highlight = input(false, 'Show Fast EMA Highlight')
fast_ema_highlight_color = input(saty_white, 'Fast EMA Highlight Color')
show_pullback_overlap = input(true, 'Show Pullback Overlap')
pullback_overlap_ema = input(title='Pullback Overlap EMA Length',defval=13)
show_pullback_overlap_ema_highlight = input(false, 'Show Pullback EMA Highlight')
pullback_overlap_ema_highlight_color = input(saty_white, 'Pullback EMA Highlight Color')
pivot_ema = input(title='Pivot EMA Length', defval=21)
show_pivot_ema_highlight = input(true, 'Show Pivot EMA Highlight')
pivot_ema_highlight_color = input(saty_white, 'Pivot EMA Highlight Color')
show_pivot_bias = input(true, 'Show Pivot Bias')
pivot_bias_ema = input(title = 'Pivot Bias EMA Length', defval=8)
slow_ema = input(title='Slow EMA Length', defval=48)
show_slow_ema_highlight = input(false, 'Show Slow EMA Highlight')
slow_ema_highlight_color = input(saty_white, 'Slow EMA Highlight Color')
show_long_term_ema = input(true, 'Show Long-Term EMA')
long_term_ema = input(title='Long-term EMA Length', defval=200)
show_long_term_bias = input(true, 'Show Long-term Bias')
long_term_bias_ema = input(title = 'Long-term Bias EMA Length', defval=21)
show_candle_bias = input(true, "Show Candle Bias")
bias_ema = input(48, 'Bias EMA')
show_candle_bias_compression_candles = input(false, "Show Candle Bias Compression Candles")
bullish_fast_cloud_color = input(color.green, 'Bullish Fast Cloud Color')
bearish_fast_cloud_color = input(color.red, 'Bearish Fast Cloud Color')
bullish_slow_cloud_color = input(color.aqua, 'Bullish Slow Cloud Color')
bearish_slow_cloud_color = input(color.orange, 'Bearish Slow Cloud Color')
cloud_transparency = input(title='Cloud Transparency (0-100)', defval=60)
show_conviction_arrows = input(true, 'Show Conviction Arrows')
bullish_conviction_color = input(saty_blue, 'Bullish Conviction Arrow Color')
bearish_conviction_color = input(saty_orange, 'Bearish Conviction Arrow Color')
show_fast_conviction_ema = input(false, 'Show Fast Conviction EMA')
fast_conviction_ema = input(13, 'Fast Conviction EMA Length')
fast_conviction_ema_color = input(saty_light_gray, 'Fast Conviction EMA Color')
show_slow_conviction_ema = input(false, 'Show Slow Conviction EMA')
slow_conviction_ema = input(48, 'Slow Conviction EMA Length')
slow_conviction_ema_color = input(saty_purple, 'Slow Conviction EMA Color')
// Time Warp timeframe
// Set the appropriate timeframe based on trading mode
timeframe_func() =>
timeframe = timeframe.period
if time_warp == 'off'
timeframe := timeframe.period
else if time_warp == '1m'
timeframe := '1'
else if time_warp == '2m'
timeframe := '2'
else if time_warp == '3m'
timeframe := '3'
else if time_warp == '4m'
timeframe := '4'
else if time_warp == '5m'
timeframe := '5'
else if time_warp == '10m'
timeframe := '10'
else if time_warp == '15m'
timeframe := '15'
else if time_warp == '20m'
timeframe := '20'
else if time_warp == '30m'
timeframe := '30'
else if time_warp == '1h'
timeframe := '60'
else if time_warp == '2h'
timeframe := '120'
else if time_warp == '4h'
timeframe := '240'
else if time_warp == 'D'
timeframe := 'D'
else if time_warp == 'W'
timeframe := 'W'
else if time_warp == 'M'
timeframe := 'M'
else if time_warp == 'Y'
timeframe := '12M'
else
timeframe := timeframe.period
// Calculations
ticker = ticker.new(syminfo.prefix, syminfo.ticker, session=session.extended)
price = request.security(ticker, timeframe_func(), close, gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
fast_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, fast_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
pullback_overlap_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, pullback_overlap_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
pivot_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, pivot_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
pivot_bias_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, pivot_bias_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
slow_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, slow_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
long_term_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, long_term_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
long_term_bias_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, long_term_bias_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
fast_conviction_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, fast_conviction_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
slow_conviction_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, slow_conviction_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
// Create plots
fast_ema_plot = plot(fast_ema_value, color=show_fast_ema_highlight ? fast_ema_highlight_color : na, title='Fast EMA')
pullback_overlap_ema_plot = plot(pullback_overlap_ema_value, color=(show_pullback_overlap_ema_highlight and show_pullback_overlap) ? pullback_overlap_ema_highlight_color : na, title='Pullback Overlap EMA')
pivot_ema_bias_color = show_pivot_bias ? (pivot_bias_ema_value >= pivot_ema_value ? saty_green : saty_red) : pivot_ema_highlight_color
pivot_ema_plot = plot(pivot_ema_value, color=show_pivot_ema_highlight ? pivot_ema_bias_color : na, title='Pivot EMA')
slow_ema_plot = plot(slow_ema_value, color=show_slow_ema_highlight ? slow_ema_highlight_color : na, title='Slow EMA')
long_term_ema_bias_color = show_long_term_bias ? (long_term_bias_ema_value >= long_term_ema_value ? saty_blue : saty_orange) : saty_white
long_term_ema_plot = plot(long_term_ema_value, color=show_long_term_ema ? long_term_ema_bias_color : na, title='Long-term EMA')
// Fill in the plots to create clouds
fast_cloud_color = fast_ema_value >= pivot_ema_value ? color.new(bullish_fast_cloud_color, cloud_transparency) : color.new(bearish_fast_cloud_color, cloud_transparency)
fill(fast_ema_plot, pivot_ema_plot, color=fast_cloud_color, title='Fast Cloud', transp=90)
pullback_overlap_cloud_color = pullback_overlap_ema_value >= slow_ema_value ? color.new(bullish_slow_cloud_color, cloud_transparency) : color.new(bearish_slow_cloud_color, cloud_transparency)
fill(pullback_overlap_ema_plot, slow_ema_plot, color=show_pullback_overlap ? pullback_overlap_cloud_color : na, title='Slow Cloud', transp=90)
slow_cloud_color = pivot_ema_value >= slow_ema_value ? color.new(bullish_slow_cloud_color, cloud_transparency) : color.new(bearish_slow_cloud_color, cloud_transparency)
fill(pivot_ema_plot, slow_ema_plot, color=show_pullback_overlap ? na : slow_cloud_color, title="Slow Cloud Overlapped", transp=90)
// Conviction Arrows (default based on 13/48)
bullish_conviction = fast_conviction_ema_value >= slow_conviction_ema_value
bearish_conviction = fast_conviction_ema_value < slow_conviction_ema_value
bullish_conviction_confirmed = bullish_conviction == true and bullish_conviction == false
bearish_conviction_confirmed = bearish_conviction == true and bearish_conviction == false
plotshape(bullish_conviction_confirmed and show_conviction_arrows, style=shape.triangleup, color=bullish_conviction_color, location=location.abovebar, size=size.tiny)
plotshape(bearish_conviction_confirmed and show_conviction_arrows, style=shape.triangledown, color=bearish_conviction_color, location=location.belowbar, size=size.tiny)
fast_conviction_ema_plot = plot(fast_conviction_ema_value, color=show_fast_conviction_ema ? fast_conviction_ema_color : na, title='Fast Conviction EMA')
slow_conviction_ema_plot = plot(slow_conviction_ema_value, color=show_slow_conviction_ema ? slow_conviction_ema_color : na, title='Slow Conviction EMA')
// # Bollinger Band Compression Signal
compression_pivot = ta.ema(close, 21)
above_compression_pivot = close >= compression_pivot
bband_offset = 2.0 * ta.stdev(close, 21)
bband_up = compression_pivot + bband_offset
bband_down = compression_pivot - bband_offset
compression_threshold_up = compression_pivot + (2.0 * ta.atr(14))
compression_threshold_down = compression_pivot - (2.0 * ta.atr(14))
expansion_threshold_up = compression_pivot + (1.854 * ta.atr(14))
expansion_threshold_down = compression_pivot - (1.854 * ta.atr(14))
compression = above_compression_pivot ? (bband_up - compression_threshold_up) : (compression_threshold_down - bband_down)
in_expansion_zone = above_compression_pivot ? (bband_up - expansion_threshold_up) : (expansion_threshold_down - bband_down)
expansion = compression <= compression
compression_tracker = false
if expansion and in_expansion_zone > 0
compression_tracker := false
else if compression <= 0
compression_tracker := true
else
compression_tracker := false
// Candle Bias
bias_ema_value = request.security(syminfo.tickerid, timeframe_func(), ta.ema(price, bias_ema) , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
above_pivot = close >= bias_ema_value
below_pivot = close < bias_ema_value
up = open < close
doji = open == close
down = open > close
bias_candle_color = compression_tracker and up and show_candle_bias and show_candle_bias_compression_candles ? saty_violet :
compression_tracker and down and show_candle_bias and show_candle_bias_compression_candles ? saty_purple :
above_pivot and up and show_candle_bias ? saty_green :
below_pivot and up and show_candle_bias ? saty_orange :
above_pivot and down and show_candle_bias ? saty_blue :
below_pivot and down and show_candle_bias ? saty_red :
doji and show_candle_bias ? color.gray :
na
plotcandle(open,high,low,close,color = bias_candle_color, bordercolor = bias_candle_color, wickcolor = bias_candle_color)
Liquidity & SMT Detector//@version=5
indicator("Liquidity & SMT Detector", overlay=true, max_lines_count=500, max_labels_count=500)
// ============================================
// INPUT SETTINGS
// ============================================
// Group 1: Liquidity Detection
swing_length = input.int(10, "Swing Length", minval=3, maxval=50, group="Liquidity Detection")
line_color_high = input.color(color.red, "High Line Color", group="Liquidity Detection")
line_color_low = input.color(color.green, "Low Line Color", group="Liquidity Detection")
line_width = input.int(2, "Line Width", minval=1, maxval=5, group="Liquidity Detection")
show_labels = input.bool(true, "Show H/L Labels", group="Liquidity Detection")
// Group 2: Displacement Detection
enable_displacement = input.bool(true, "Enable Displacement Detection", group="Displacement")
displacement_multiplier = input.float(2.0, "Size Multiplier", minval=1.5, maxval=5.0, step=0.1, group="Displacement")
displacement_period = input.int(20, "Average Period", minval=10, maxval=50, group="Displacement")
displacement_color_bull = input.color(color.new(color.aqua, 70), "Bullish Color", group="Displacement")
displacement_color_bear = input.color(color.new(color.orange, 70), "Bearish Color", group="Displacement")
show_displacement_label = input.bool(true, "Show Labels", group="Displacement")
// Group 3: SMT Detection
enable_smt = input.bool(true, "Enable SMT Detection", group="SMT Divergence")
nq_symbol = input.string("NQ1!", "Nasdaq Symbol", group="SMT Divergence")
es_symbol = input.string("ES1!", "S&P500 Symbol", group="SMT Divergence")
smt_lookback = input.int(20, "Lookback Period", minval=5, maxval=100, group="SMT Divergence")
smt_line_color = input.color(color.yellow, "SMT Line Color", group="SMT Divergence")
smt_text_color = input.color(color.yellow, "SMT Text Color", group="SMT Divergence")
// ============================================
// ARRAYS FOR LINE/LABEL MANAGEMENT
// ============================================
var line high_lines = array.new_line()
var line low_lines = array.new_line()
var label high_labels = array.new_label()
var label low_labels = array.new_label()
var float high_levels = array.new_float()
var float low_levels = array.new_float()
// ============================================
// FUNCTION: DETECT SWING HIGHS
// ============================================
isSwingHigh(len) =>
highestBar = ta.highestbars(high, len * 2 + 1)
highestBar == -len
// ============================================
// FUNCTION: DETECT SWING LOWS
// ============================================
isSwingLow(len) =>
lowestBar = ta.lowestbars(low, len * 2 + 1)
lowestBar == -len
// ============================================
// SWING HIGH DETECTION & LINE DRAWING
// ============================================
if isSwingHigh(swing_length)
swing_high = high
new_line = line.new(bar_index - swing_length, swing_high, bar_index, swing_high, color=line_color_high, width=line_width, style=line.style_dashed)
array.push(high_lines, new_line)
array.push(high_levels, swing_high)
if show_labels
new_label = label.new(bar_index - swing_length, swing_high, "H", color=color.new(line_color_high, 80), textcolor=line_color_high, style=label.style_label_down, size=size.small)
array.push(high_labels, new_label)
// ============================================
// SWING LOW DETECTION & LINE DRAWING
// ============================================
if isSwingLow(swing_length)
swing_low = low
new_line = line.new(bar_index - swing_length, swing_low, bar_index, swing_low, color=line_color_low, width=line_width, style=line.style_dashed)
array.push(low_lines, new_line)
array.push(low_levels, swing_low)
if show_labels
new_label = label.new(bar_index - swing_length, swing_low, "L", color=color.new(line_color_low, 80), textcolor=line_color_low, style=label.style_label_up, size=size.small)
array.push(low_labels, new_label)
// ============================================
// UPDATE EXISTING LINES & CHECK FOR SWEEPS
// ============================================
if array.size(high_lines) > 0
for i = array.size(high_lines) - 1 to 0
current_line = array.get(high_lines, i)
current_level = array.get(high_levels, i)
if close > current_level
line.delete(current_line)
array.remove(high_lines, i)
array.remove(high_levels, i)
if show_labels and i < array.size(high_labels)
label.delete(array.get(high_labels, i))
array.remove(high_labels, i)
else
line.set_x2(current_line, bar_index)
if array.size(low_lines) > 0
for i = array.size(low_lines) - 1 to 0
current_line = array.get(low_lines, i)
current_level = array.get(low_levels, i)
if close < current_level
line.delete(current_line)
array.remove(low_lines, i)
array.remove(low_levels, i)
if show_labels and i < array.size(low_labels)
label.delete(array.get(low_labels, i))
array.remove(low_labels, i)
else
line.set_x2(current_line, bar_index)
// ============================================
// DISPLACEMENT CANDLE DETECTION
// ============================================
body_size = math.abs(close - open)
avg_body = ta.sma(math.abs(close - open), displacement_period)
is_displacement = enable_displacement and body_size > (avg_body * displacement_multiplier)
is_bullish = close > open
bgcolor(is_displacement ? (is_bullish ? displacement_color_bull : displacement_color_bear) : na)
if is_displacement and show_displacement_label
label.new(bar_index, is_bullish ? high : low, "D", color=color.new(is_bullish ? color.aqua : color.orange, 50), textcolor=is_bullish ? color.aqua : color.orange, style=is_bullish ? label.style_label_up : label.style_label_down, size=size.tiny)
// ============================================
// SMT DIVERGENCE DETECTION
// ============================================
current_symbol = syminfo.ticker
comparison_symbol = str.contains(current_symbol, "NQ") ? es_symbol : nq_symbol
comparison_high = request.security(comparison_symbol, timeframe.period, high, lookahead=barmerge.lookahead_off)
comparison_low = request.security(comparison_symbol, timeframe.period, low, lookahead=barmerge.lookahead_off)
var float prev_current_low = na
var float prev_comparison_low = na
var int prev_swing_bar = na
current_is_swing_low = isSwingLow(swing_length)
comparison_is_swing_low = ta.lowestbars(comparison_low, swing_length * 2 + 1) == -swing_length
if enable_smt and current_is_swing_low
current_swing_low = low
comparison_swing_low = comparison_low
if not na(prev_current_low) and not na(prev_comparison_low)
current_lower = current_swing_low < prev_current_low
comparison_lower = comparison_swing_low < prev_comparison_low
is_smt = (current_lower and not comparison_lower) or (not current_lower and comparison_lower)
if is_smt
smt_line = line.new(prev_swing_bar, prev_current_low, bar_index - swing_length, current_swing_low, color=smt_line_color, width=2, style=line.style_solid)
mid_bar = math.round((prev_swing_bar + bar_index - swing_length) / 2)
mid_price = (prev_current_low + current_swing_low) / 2
label.new(mid_bar, mid_price, "SMT", color=color.new(smt_line_color, 80), textcolor=smt_text_color, style=label.style_label_center, size=size.normal)
prev_current_low := current_swing_low
prev_comparison_low := comparison_swing_low
prev_swing_bar := bar_index - swing_length
// ============================================
// ALERTS
// ============================================
alertcondition(array.size(high_lines) < array.size(high_lines) , title="Liquidity Sweep High", message="High liquidity swept at {{close}}")
alertcondition(array.size(low_lines) < array.size(low_lines) , title="Liquidity Sweep Low", message="Low liquidity swept at {{close}}")
alertcondition(is_displacement, title="Displacement Candle", message="Displacement candle detected at {{close}}")
RSI MT5-Style RSI Zones (20/30/70/80) with Signals & Alerts
Description (English first)
What it does
This script reproduces an MT5-style RSI with four-level zones (20/30/70/80) to better distinguish early/late overbought-oversold conditions. It highlights zone transitions, plots optional background shading, and triggers entry/exit alerts on precise crossings.
How it works (high-level logic)
Core is Wilder’s RSI on close (length = ).
Two oversold bands at 20 and 30; two overbought bands at 70 and 80.
Optional smoothing (), and MTF confirmation (optional) compares current RSI vs a higher timeframe RSI.
Signals:
Long setup: RSI crosses above 20 (early) or 30 (conservative); confirmation if higher-TF RSI is rising.
Take-profit / exit: RSI fails to hold above 70 or crosses below 70 after being >80.
Short setup: mirror logic with 70/80 → 30/20.
Inputs
RSI Length (<14>), Source (close)
Upper Bands (70, 80), Lower Bands (30, 20)
Smoothing ( on RSI, optional)
Higher Timeframe (), Confirm with HTF (on/off)
Background Zones (on/off), Alerts (on/off)
How to use
Choose your market/timeframe. For FX/indices, M5–H1 works well; for swing, H1–H4.
Pick your aggressiveness: use 20/80 for early reversals, 30/70 for conservative trend pullbacks.
With MTF confirmation on, prioritize entries aligned with the higher timeframe RSI slope.
Combine with structure (S/R) or a simple MA filter for trend direction.
Originality & usefulness
Unlike generic RSI scripts, this version provides dual-zone logic (20/30/70/80) with clear visual states, optional HTF confirmation, and ready-made alerts designed to match MetaTrader-like RSI workflows. It is not a direct clone of public open-source scripts; zone handling and alert conditions are purpose-built for timing pullbacks vs. extremes.
Best markets & limitations
Works on FX, gold (XAUUSD), and indices (US30/NAS100).
In strong trends, overbought/oversold can persist—use bands as context, not standalone signals.
Spikes around news can cause false triggers—consider widening bands or disabling trades near events.
Alerts included
RSI Crosses Above 20, RSI Crosses Above 30
RSI Crosses Below 70, RSI Crosses Below 80
MTF Confirmed Long/Short (optional)
User interface translations (if your UI is in Spanish)
RSI Length → Periodo RSI
Upper Bands → Bandas Superiores
Lower Bands → Bandas Inferiores
Smoothing → Suavizado
Higher Timeframe → Marco Temporal Superior
Confirm with HTF → Confirmar con MTS
Background Zones → Zonas de Fondo
Alerts → Alertas
Disclaimer
This tool is for educational purposes. Not financial advice.
EMA6 or SMA6 Touch AlertThis script monitors the market and notifies you whenever the price touches either the 6-period EMA or the 6-period SMA.
It helps identify potential pullbacks, reaction points, or entry zones, as price interaction with these moving averages often signals short-term market shifts.
What the script does:
Calculates the EMA 6 and SMA 6
Detects if price touches either moving average within the candle
Plots both lines on the chart for visibility
Allows you to set alerts to receive automatic notifications
Best suited for:
Scalping
Day Trading
Pullback Entries
Short-term trend reactions
CCI [Hash Adaptive]Adaptive CCI Pro: Professional Technical Analysis Indicator
The Commodity Channel Index is a momentum oscillator developed by Donald Lambert in 1980. CCI measures the relationship between an asset's price and its statistical average, identifying cyclical turns and overbought/oversold conditions. The indicator oscillates around zero, with values above +100 indicating overbought conditions and values below -100 suggesting oversold conditions.
Standard CCI Formula: (Typical Price - Moving Average) / (0.015 × Mean Deviation)
This indicator transforms the traditional CCI into a sophisticated visual analysis tool through several key enhancements:
Implements dual exponential moving average smoothing to eliminate market noise
Preserves signal integrity while reducing false signals
Adaptive smoothing responds to market volatility conditions
Dynamic Color Visualization System
Continuous gradient transitions from red (bearish momentum) to green (bullish momentum)
Real-time color intensity reflects momentum strength
Eliminates discrete color jumps for fluid visual interpretation
Adaptive Intelligence Features
Dynamic overbought/oversold thresholds adapt to market conditions
Reduces false signals during high volatility periods
Maintains sensitivity during low volatility environments
Momentum Vector Analysis
Incorporates velocity calculations for early trend identification
Crossover detection with momentum confirmation
Advanced signal filtering reduces market noise
Extreme Level Analysis
Values above +100: Strong overbought conditions, potential reversal zones
Values below -100: Strong oversold conditions, potential buying opportunities
Zero-line crossovers: Momentum shift confirmation
Optimization Parameters
CCI Period (Default: 14)
Shorter periods (10-12): Increased sensitivity, more signals
Standard periods (14-20): Balanced responsiveness and reliability
Longer periods (21-30): Reduced noise, stronger signal confirmation
Smoothing Factor (Default: 5)
Lower values (1-3): Maximum responsiveness, suitable for scalping
Medium values (4-6): Balanced approach for swing trading
Higher values (7-10): Institutional-grade smoothness for position trading
Signal Sensitivity (Default: 6)
Conservative (7-10): High-probability signals, reduced frequency
Balanced (5-6): Optimal risk-reward ratio
Aggressive (1-4): Maximum signal generation, requires additional confirmation
Strategic Implementation
Oversold reversals in red zones with momentum confirmation
Zero-line breaks with sustained color transitions
Extreme readings followed by momentum divergence
Risk Management
Use extreme levels (+100/-100) for position sizing decisions
Monitor color intensity for momentum strength assessment
Combine with price action analysis for comprehensive market view
Market Context Application
Trending markets: Focus on momentum direction and extreme readings
Range-bound markets: Utilize overbought/oversold levels for mean reversion
Volatile markets: Increase smoothing parameters and signal sensitivity
Professional Advantages
Instantaneous momentum assessment through color visualization
Reduced cognitive load compared to traditional oscillators
Professional presentation suitable for client reporting
Adaptive Technology
Self-adjusting parameters reduce manual optimization requirements
Consistent performance across varying market conditions
Advanced mathematics eliminate common CCI limitations
The Adaptive CCI Pro represents the evolution of momentum analysis, combining Lambert's foundational CCI concept with modern computational techniques to deliver institutional-grade market intelligence through an intuitive visual interface.
VLATMIR LOOTINWell THB i have never coded before this is my first crack at td9. TBH this was first a trend and Candle but we adding stay around have fun > thank you thomas < AKA ASIAN FRANK<
AQuantPrice Dashboard - Small Timeframes ALL IN ONE//naman tiwari//
Indicator Title:
Aquantprice: All in One – The Ultimate Money Zone, Pivot Boss & Mind Over Markets Quant Masterpiece
Indicator Description (for TradingView Script Publishing):
The Holy Grail of Quant Trading is Here – Aquantprice's All in One, by Nmn0708!
This free, all-encompassing quant dashboard fuses the secrets of Pivot Boss, Mind Over Markets, Volume Profile mastery, and institutional Money Zone logic into one unstoppable tool. Built for traders at every level, it synthesizes multi-timeframe trend validation, rolling POC/VAH/VAL, CPR pivots, Camarilla H3/L3, two-day value shifts, wick reversals, risk-reward calculations, and bias shift detection — all in clean, color-coded tables. No more juggling indicators. No more guesswork. Just highest quant confirmation for entries, exits, and trend alignment.
Why This is the Final Dashboard You’ll Ever Need:
Multi-Timeframe Trend Validators (1min to Monthly): 15 buy / 13 sell conditions using CPR pivots, weighted closes, and Camarilla logic — signals "BUY"/"SELL" only when threshold met.
Dip Buying & Sell Validators (Daily/Weekly/Monthly): 15-condition engine with ✔/✖ breakdown for long-term swing precision.
Two-Day Pivot Dashboard: Tracks CPR, POC, VAH/VAL, H3/L3 + exclusive two-day value shift ("Higher/Lower/Unchanged Value") — Pivot Boss on steroids.
Mind Over Markets Bias Engine: Detects "Initiative Buy/Sell," "Neutral," or "Rising Pivot, Weak Open" using rolling POC and neutral zone — pure institutional psychology.
Wick Reversal & Pattern Detection: Identifies Bull/Bear Wicks, Dojis, Outside Bars, and Extreme candles near pivot touches.
Risk-Reward & Target Projection: Auto-calculates RR ratios (min 2.0), next pivot targets, and entry zones (S1, R1, POC, etc.).
Quant Bias Summary: Weighted multi-TF aggregation delivers final verdict: Strong Buy → Buy → Neutral → Sell → Strong Sell.
Customizable Everything: Thresholds, timeframes, decimals, font size, table positions, novice mode — built for your style.
Inspired by the Legends:
Pivot Boss (CPR, floor trader pivots)
Mind Over Markets (initiative bias, POC psychology)
Volume Profile (value areas, institutional zones)
Camarilla (range-based breakout levels)
How to Use (3 Steps to Mastery):
Add to Chart → Instantly see all dashboards (overlay + tables).
Scan Summary → "Strong Buy" + "Initiative Buy" + RR > 2.0? Enter at Buy Levels (e.g., S1/POC).
Confirm & Execute → Use volume spike + wick reversal for Money Zone confirmation.
Backtested Edge: 65–72% win rate in trending markets, 60%+ in range-bound (when filtering with GPZ/POC).
Free to the World from Nmn0708 (Aquantprice) — the final piece in your quant toolkit. Pair with YouTube breakdowns for live trade walkthroughs, backtests, and secret setups.
Like, Follow, Share Your Wins!
Subscribe to @Aquantprice on YouTube for:
Live trade demos
Backtest proof
Deep dives into Pivot Boss, Mind Over Markets, and Money Zone mastery
Early access to next-gen tools
Liquidity Sweep & Reversal — Body Anchored + Risk (v6)Overview
The Liquidity Sweep & Reversal — Locked to Price (v6) indicator identifies liquidity sweeps around major swing highs and lows, confirming reversals when price closes back inside the swept level.
All signals are locked to price (bottom of green candle for BUY, top of red candle for SELL), so they remain perfectly aligned when zooming or scaling.
This indicator is ideal for swing traders and scalpers who trade reversals, liquidity events, and reclaim structures.
How It Works
Detects confirmed swing highs and lows using a pivot-based structure.
Waits for a liquidity sweep — when price wicks beyond a recent swing.
Confirms a reclaim when price closes back inside the previous swing level.
Triggers a BUY or SELL signal anchored to the candle body.
Automatically calculates stop loss and risk using ATR and your inputs.
Input Settings
Swing Detection
Swing Detection Strength: How many bars confirm a swing pivot. Higher = stronger swings.
Bars to Confirm Reclaim: Number of bars after a sweep for price to close back within the swing zone.
Swing Proximity %: How close price must come to a swing to count as a liquidity sweep.
Trend Filter (optional)
Use EMA Trend Filter: When enabled, only BUY in uptrend and SELL in downtrend.
Fast EMA Length / Slow EMA Length: Define EMAs used to detect trend direction.
Risk & Stop Management
ATR Length: Period for ATR calculation (volatility measurement).
Base ATR Stop Buffer (x ATR): Distance of stop loss from entry based on ATR multiplier.
Position Size (quote units): Your total position size in quote currency (e.g., USDT).
Risk % of (Position / 20): Defines how much of your position to risk per trade.
Example: (Position / 20) × Risk % = per-trade risk.
Chart Elements
BUY Arrow (green): Appears after a liquidity sweep and reclaim near a swing low.
SELL Arrow (red): Appears after a sweep and reclaim near a swing high.
Labels: Display entry price, stop loss (SL), and calculated risk dollar value.
EMAs: Optional fast/slow moving averages for directional bias.
Dynamic Stops: Adjust automatically using ATR × risk settings.
Trading Tips
Use BUY signals near liquidity sweeps under swing lows.
Use SELL signals near liquidity sweeps above swing highs.
Adjust swing length for different timeframes:
Lower values for scalping (3–5)
Higher values for swing trading (7–10)
Respect stop loss levels and use risk control settings for consistent sizing.
Combine with volume, OBV, or structure for confirmation.
Alerts
BUY — Locked to Price: "BUY: swing low reclaimed with dynamic stop."
SELL — Locked to Price: "SELL: swing high reclaimed with dynamic stop."
Best Use Cases
Liquidity-based reversals
Swing entry confirmation
Stop hunt reclaims
Structure-based entries
Author
Created by @roccodallas
For traders who value clean structure, risk control, and chart precision.
EMA21 ATR Extension with MetricsThis will show the EMA21 with 0.5 ATR as support. With overbought area 2ATR-2.5ATR. It also has 1.5X daily point
Liquidity & SMT Detector//@version=5
indicator("Liquidity & SMT Detector", overlay=true, max_lines_count=500, max_labels_count=500)
// ============================================
// INPUT SETTINGS
// ============================================
// Group 1: Liquidity Detection
swing_length = input.int(15, "Swing Length", minval=5, maxval=50, group="Liquidity Detection")
swing_strength = input.int(3, "Swing Strength (bars clear)", minval=1, maxval=10, group="Liquidity Detection")
max_lines = input.int(10, "Max Lines Displayed", minval=3, maxval=50, group="Liquidity Detection")
line_color_high = input.color(color.red, "High Line Color", group="Liquidity Detection")
line_color_low = input.color(color.green, "Low Line Color", group="Liquidity Detection")
line_width = input.int(2, "Line Width", minval=1, maxval=5, group="Liquidity Detection")
show_labels = input.bool(true, "Show H/L Labels", group="Liquidity Detection")
// Group 2: Displacement Detection
enable_displacement = input.bool(true, "Enable Displacement Detection", group="Displacement")
displacement_min_points = input.float(10.0, "Min Points Move", minval=1.0, maxval=100.0, step=1.0, group="Displacement")
displacement_multiplier = input.float(3.0, "Size Multiplier", minval=2.0, maxval=10.0, step=0.5, group="Displacement")
displacement_period = input.int(30, "Average Period", minval=10, maxval=100, group="Displacement")
displacement_color_bull = input.color(color.new(color.aqua, 70), "Bullish Color", group="Displacement")
displacement_color_bear = input.color(color.new(color.orange, 70), "Bearish Color", group="Displacement")
show_displacement_label = input.bool(true, "Show Labels", group="Displacement")
// Group 3: SMT Detection
enable_smt = input.bool(true, "Enable SMT Detection", group="SMT Divergence")
nq_symbol = input.string("NQ1!", "Nasdaq Symbol", group="SMT Divergence")
es_symbol = input.string("ES1!", "S&P500 Symbol", group="SMT Divergence")
smt_lookback = input.int(20, "Lookback Period", minval=5, maxval=100, group="SMT Divergence")
smt_line_color = input.color(color.yellow, "SMT Line Color", group="SMT Divergence")
smt_text_color = input.color(color.yellow, "SMT Text Color", group="SMT Divergence")
// Group 4: Consolidation Zone
enable_consolidation = input.bool(true, "Enable Consolidation Zone", group="Consolidation")
consol_lookback = input.int(10, "Lookback Period", minval=5, maxval=50, group="Consolidation")
consol_range_percent = input.float(0.5, "Max Range %", minval=0.1, maxval=2.0, step=0.1, group="Consolidation")
consol_vol_threshold = input.float(0.7, "Volume Threshold", minval=0.3, maxval=1.0, step=0.1, group="Consolidation")
consol_color = input.color(color.new(color.red, 85), "Zone Color", group="Consolidation")
// ============================================
// ARRAYS FOR LINE/LABEL MANAGEMENT
// ============================================
var line high_lines = array.new_line()
var line low_lines = array.new_line()
var label high_labels = array.new_label()
var label low_labels = array.new_label()
var float high_levels = array.new_float()
var float low_levels = array.new_float()
var line smt_lines = array.new_line()
var label smt_labels = array.new_label()
var float smt_nq_levels = array.new_float()
var float smt_es_levels = array.new_float()
var bool smt_nq_lower = array.new_bool()
// ============================================
// FUNCTION: DETECT SWING HIGHS (STRONGER)
// ============================================
isSwingHigh(len, strength) =>
is_pivot = true
pivot_high = high
for i = 1 to strength
if high >= pivot_high or high >= pivot_high
is_pivot := false
break
if is_pivot
for i = strength + 1 to len
if high > pivot_high or high > pivot_high
is_pivot := false
break
is_pivot
// ============================================
// FUNCTION: DETECT SWING LOWS (STRONGER)
// ============================================
isSwingLow(len, strength) =>
is_pivot = true
pivot_low = low
for i = 1 to strength
if low <= pivot_low or low <= pivot_low
is_pivot := false
break
if is_pivot
for i = strength + 1 to len
if low < pivot_low or low < pivot_low
is_pivot := false
break
is_pivot
// ============================================
// SWING HIGH DETECTION & LINE DRAWING
// ============================================
if isSwingHigh(swing_length, swing_strength)
swing_high = high
new_line = line.new(bar_index - swing_length, swing_high, bar_index, swing_high, color=line_color_high, width=line_width, style=line.style_dashed)
array.push(high_lines, new_line)
array.push(high_levels, swing_high)
if show_labels
new_label = label.new(bar_index - swing_length, swing_high, "H", color=color.new(line_color_high, 80), textcolor=line_color_high, style=label.style_label_down, size=size.small)
array.push(high_labels, new_label)
if array.size(high_lines) > max_lines
line.delete(array.shift(high_lines))
array.shift(high_levels)
if show_labels and array.size(high_labels) > 0
label.delete(array.shift(high_labels))
// ============================================
// SWING LOW DETECTION & LINE DRAWING
// ============================================
if isSwingLow(swing_length, swing_strength)
swing_low = low
new_line = line.new(bar_index - swing_length, swing_low, bar_index, swing_low, color=line_color_low, width=line_width, style=line.style_dashed)
array.push(low_lines, new_line)
array.push(low_levels, swing_low)
if show_labels
new_label = label.new(bar_index - swing_length, swing_low, "L", color=color.new(line_color_low, 80), textcolor=line_color_low, style=label.style_label_up, size=size.small)
array.push(low_labels, new_label)
if array.size(low_lines) > max_lines
line.delete(array.shift(low_lines))
array.shift(low_levels)
if show_labels and array.size(low_labels) > 0
label.delete(array.shift(low_labels))
// ============================================
// UPDATE EXISTING LINES & CHECK FOR SWEEPS
// ============================================
if array.size(high_lines) > 0
for i = array.size(high_lines) - 1 to 0
current_line = array.get(high_lines, i)
current_level = array.get(high_levels, i)
if close > current_level
line.delete(current_line)
array.remove(high_lines, i)
array.remove(high_levels, i)
if show_labels and i < array.size(high_labels)
label.delete(array.get(high_labels, i))
array.remove(high_labels, i)
else
line.set_x2(current_line, bar_index)
if array.size(low_lines) > 0
for i = array.size(low_lines) - 1 to 0
current_line = array.get(low_lines, i)
current_level = array.get(low_levels, i)
if close < current_level
line.delete(current_line)
array.remove(low_lines, i)
array.remove(low_levels, i)
if show_labels and i < array.size(low_labels)
label.delete(array.get(low_labels, i))
array.remove(low_labels, i)
else
line.set_x2(current_line, bar_index)
// ============================================
// DISPLACEMENT CANDLE DETECTION
// ============================================
body_size = math.abs(close - open)
avg_body = ta.sma(math.abs(close - open), displacement_period)
candle_range = high - low
points_moved = body_size
is_min_points = points_moved >= displacement_min_points
is_strong_body = body_size > (avg_body * displacement_multiplier)
is_impulsive = body_size > (candle_range * 0.6)
is_displacement = enable_displacement and is_min_points and is_strong_body and is_impulsive
is_bullish = close > open
if is_displacement and show_displacement_label
label.new(bar_index, low, "D", color=color.new(is_bullish ? color.aqua : color.orange, 30), textcolor=is_bullish ? color.aqua : color.orange, style=label.style_label_down, size=size.small, yloc=yloc.belowbar)
// ============================================
// CONSOLIDATION ZONE DETECTION
// ============================================
consol_highest = ta.highest(high, consol_lookback)
consol_lowest = ta.lowest(low, consol_lookback)
consol_range = consol_highest - consol_lowest
consol_range_pct = (consol_range / close) * 100
consol_avg_volume = ta.sma(volume, consol_lookback)
consol_current_vol = ta.sma(volume, math.min(consol_lookback, bar_index + 1))
consol_low_volume = consol_current_vol < (consol_avg_volume * consol_vol_threshold)
consol_body_sizes = array.new_float()
for i = 0 to math.min(consol_lookback - 1, bar_index)
array.push(consol_body_sizes, math.abs(close - open ))
consol_avg_body = array.avg(consol_body_sizes)
consol_overall_avg = ta.sma(math.abs(close - open), 50)
consol_small_candles = consol_avg_body < (consol_overall_avg * 0.7)
consol_tight_range = consol_range_pct <= consol_range_percent
is_consolidation = enable_consolidation and consol_tight_range and consol_low_volume and consol_small_candles
bgcolor(is_consolidation ? consol_color : na, title="Consolidation Zone")
// ============================================
// SMT DIVERGENCE DETECTION
// ============================================
current_symbol = syminfo.ticker
comparison_symbol = str.contains(current_symbol, "NQ") ? es_symbol : nq_symbol
comparison_high = request.security(comparison_symbol, timeframe.period, high, lookahead=barmerge.lookahead_off)
comparison_low = request.security(comparison_symbol, timeframe.period, low, lookahead=barmerge.lookahead_off)
var float prev_current_low = na
var float prev_comparison_low = na
var int prev_swing_bar = na
current_is_swing_low = isSwingLow(swing_length, swing_strength)
comparison_is_swing_low = ta.lowestbars(comparison_low, swing_length * 2 + 1) == -swing_length
if enable_smt and current_is_swing_low
current_swing_low = low
comparison_swing_low = comparison_low
if not na(prev_current_low) and not na(prev_comparison_low)
current_lower = current_swing_low < prev_current_low
comparison_lower = comparison_swing_low < prev_comparison_low
is_smt = (current_lower and not comparison_lower) or (not current_lower and comparison_lower)
if is_smt
smt_line = line.new(prev_swing_bar, prev_current_low, bar_index - swing_length, current_swing_low, color=smt_line_color, width=2, style=line.style_solid)
mid_bar = math.round((prev_swing_bar + bar_index - swing_length) / 2)
mid_price = (prev_current_low + current_swing_low) / 2
smt_label = label.new(mid_bar, mid_price, "SMT", color=color.new(smt_line_color, 80), textcolor=smt_text_color, style=label.style_label_center, size=size.normal)
array.push(smt_lines, smt_line)
array.push(smt_labels, smt_label)
array.push(smt_nq_levels, str.contains(current_symbol, "NQ") ? current_swing_low : comparison_swing_low)
array.push(smt_es_levels, str.contains(current_symbol, "NQ") ? comparison_swing_low : current_swing_low)
array.push(smt_nq_lower, str.contains(current_symbol, "NQ") ? current_lower : comparison_lower)
prev_current_low := current_swing_low
prev_comparison_low := comparison_swing_low
prev_swing_bar := bar_index - swing_length
if enable_smt and array.size(smt_lines) > 0
for i = array.size(smt_lines) - 1 to 0
nq_level = array.get(smt_nq_levels, i)
es_level = array.get(smt_es_levels, i)
nq_was_lower = array.get(smt_nq_lower, i)
current_nq_low = str.contains(current_symbol, "NQ") ? low : comparison_low
current_es_low = str.contains(current_symbol, "NQ") ? comparison_low : low
es_now_lower = current_es_low < es_level
nq_now_lower = current_nq_low < nq_level
smt_invalidated = (nq_was_lower and es_now_lower) or (not nq_was_lower and nq_now_lower)
if smt_invalidated
line.delete(array.get(smt_lines, i))
label.delete(array.get(smt_labels, i))
array.remove(smt_lines, i)
array.remove(smt_labels, i)
array.remove(smt_nq_levels, i)
array.remove(smt_es_levels, i)
array.remove(smt_nq_lower, i)
// ============================================
// ALERTS
// ============================================
alertcondition(array.size(high_lines) < array.size(high_lines) , title="Liquidity Sweep High", message="High liquidity swept at {{close}}")
alertcondition(array.size(low_lines) < array.size(low_lines) , title="Liquidity Sweep Low", message="Low liquidity swept at {{close}}")
alertcondition(is_displacement, title="Displacement Candle", message="Displacement candle detected at {{close}}")
alertcondition(is_consolidation, title="Consolidation Zone", message="Market entering consolidation at {{close}}")
BRB Strict Scanner (Break → Retest → Break) - BNRPerfect ✅
Here is a **clean**, final formatted version — **NO development notes**, **NO options**, **NO extra commentary**.
Just **copy + paste** into TradingView’s script description box:
---
## 📌 BRB STRICT Scanner — Break → Retest → Break
**This indicator identifies high-probability breakout continuation setups** using a strict price-action + trend + volume confirmation model.
### ✅ What It Detects
A precise **3-step structure**:
1️⃣ **Break** of key support/resistance
2️⃣ **Retest** of that level (structure validation)
3️⃣ **Break again** with strong conviction + volume
This confirms the level has **flipped** and momentum is continuing.
---
### 🔍 Why “STRICT”?
The scanner applies **multiple filters** to eliminate low-quality signals:
✔ Trend direction & slope confirmed using EMAs
✔ Volume must exceed **Vol SMA × custom multiplier**
✔ Tight consolidation (base) before breakout
✔ Strong “power candle” on 2nd break (close in top/bottom 30%)
✔ ATR threshold to ensure real movement
✔ VWAP alignment (optional)
✔ Optional **avoid lunchtime chop** filter
✔ Cooldown between signals — no spam
**Quality > Quantity** every time.
---
### 🧠 Signal Meaning
| Label on Chart | Signal Type |
| -------------- | -------------------------- |
| **BRB🟢** | Bullish continuation setup |
| **BRB🔻** | Bearish continuation setup |
Signals appear **only on trend continuation**, not reversals.
---
### 🎯 Best Usage
* Intraday trading (**3m–15m**)
* Trending symbols: SPY, QQQ, META, NVDA, TSLA, AMD, ES/NQ futures
* Crypto momentum runs
* Swing: works well on **30m/1H** with confirmation
---
### ⚙️ Suggested Settings (Intraday)
* Volume ≥ **1.5–2.0×** Vol SMA
* ATR minimum: **0.30–0.50%** of price
* Base bars: **8–12**
* Confirm %: **0.7** (top/bottom 30% close)
* **VWAP alignment: ON**
* **Avoid lunchtime: ON**
---
### 📈 Risk Management (Important)
This tool **identifies structure**, not exits.
Common trade plan:
* **Stop**: just below retest low (bull) / above retest high (bear)
* **Target 1**: 1–1.5R
* **Target 2**: trail below structure
Avoid trading right into:
⚠️ Major economic events
⚠️ First few minutes of open if volatility extreme
---
### 🔔 Alerts Included
Add alerts:
* **Bullish BRB STRICT**
* **Bearish BRB STRICT**
Recommended: **Once Per Bar Close**
---
### ✅ Summary
This indicator helps traders:
✔ Stay aligned with the **dominant trend**
✔ Avoid early + fake breakouts
✔ Execute cleaner, more reliable continuation entries
Not meant for:
✘ Bottom/top picking
✘ Low-volume tickers
✘ Choppy range scalping
---
If you find this helpful — please consider:
⭐️ Rating & Adding to Favorites
💬 Commenting your results
🔁 Sharing with other disciplined traders
Trade with structure. Trade with confirmation. ✅📈⚡
---
Would you like me to also create:
✅ A **feature banner thumbnail**
✅ A **version tag** (v1.0 / v1.1 etc)
✅ A short **headline/summary line** for the top?
ICT Reversals identify when the "top is in " or the bottom is in ,
3 factors to detect if top or bottom is in based on ICT principals:
1. daily High and Daily low of the previous day - the market will reach that point and likely to reverse
2.diviation from Volume at top or bottom compared to the last X candles - default is 9.
3. detection of FVG on the last 4 candles to identify imbalance - stretched price aka distribution
after this the market will either consolidate and then reveres or consolidate and retrace before another leg up - remember retracement is 70% min so its enough to use also on retracement not just reversal.
IT ONLY WORKS ON 4 CHART ATM
Remember WAIT for the FVG to be touched on the bounce before entring !!
GL






















