Indicator

CVD Divergence Pro# CVD Divergence Pro
**Cumulative Volume Delta with ATR-ZigZag pivot detection and multi-pivot divergence mapping.**
---
## What it does
This indicator plots Cumulative Volume Delta (CVD) as a line or candles, then automatically detects and draws **divergences between price structure and order flow** — on both the indicator pane and the price chart.
Two divergence types are detected:
- **Bearish** — price makes a *lower high* while CVD makes a *higher high*. Buyers pushed harder, but price could not follow. Consistent with a larger seller absorbing that buying with resting limit sells.
- **Bullish** — price makes a *higher low* while CVD makes a *lower low*. Sellers pushed harder, but price would not break. Consistent with a larger buyer absorbing that selling with resting limit buys.
Each confirmed divergence draws a connecting line between the two pivots on the CVD pane **and** the corresponding line between the two price pivots on the chart itself, so the structural claim is visible in both series at once.
## How to use
**1. Set the reversal threshold first.** Enable *Show ZigZag skeleton* and adjust *Reversal threshold* until the dashed skeleton matches the swings you would mark by hand. Everything downstream depends on this, so tune it before touching any filter.
**2. Read a signal from its tooltip.** Hover any label. It reports the price and CVD values at both pivots, the strength in multiples of average bar delta, bars apart, swing amplitude in ATR, and how many pivots were skipped to form the pair. Strength is the number to weigh — a 5× divergence and a 2× divergence are not the same claim.
**3. If a divergence you can see by eye is not flagged**, enable *Mark confirmed pivots*. This separates the two failure modes:
- No dot at your swing → the ZigZag never registered it as a pivot. Lower the Reversal threshold.
- Dots present but no line → a quality filter rejected the pair. Widen *Max bars*, or lower *Min price swing* / *Min CVD divergence*.
**4. Alerts.** Six conditions are exposed: confirmed bearish, confirmed bullish, early bearish, early bullish, and combined bearish/bullish. Use the confirmed conditions for anything mechanical; the early conditions are anticipatory and will produce signals that do not develop.
**5. Check the information box.** It reports the reset mode, the lower timeframe used for intrabar data, average intrabars per chart bar, history coverage, current ATR and reversal distance in points, and the current CVD significance threshold. If average intrabars falls below 5 the box turns red — delta values are unreliable at that resolution.
---
## Limitations — please read
- **Delta here is inferred, not true bid/ask data.** Like PulseWire's built-in CVD, this classifies intrabar volume as buying or selling using intrabar price direction. It is an approximation of aggressor side, not actual trade-side data from an exchange feed. Instruments and timeframes where that approximation breaks down will produce misleading CVD.
- **Intrabar history is capped.** PulseWire limits how many lower-timeframe bars can be requested, so on long histories only the most recent portion has intrabar data. The information box reports actual coverage — check it before drawing conclusions from older signals.
- **Requires real volume.** Symbols without volume from the data provider will error. Forex spot and some indices are affected.
- **A divergence is context, not a trade signal.** It describes a disagreement between price and inferred order flow at two points in time. It says nothing about when, or whether, that disagreement resolves. Divergences persist and fail regularly.
- **Early warnings are unconfirmed by construction.** They fire before the swing completes and will sometimes not develop into anything.
- **Changing the reset mode changes every signal**, because CVD values are only comparable within a reset period.
No performance claims are made or implied. This is an analysis tool, not a strategy, and it has not been presented with backtest results because divergence context is not mechanically tradeable on its own.
---
## Credits and licence
Released under the **Mozilla Public License 2.0**.
- The Cumulative Volume Delta calculation core, the intrabar volume classification logic, and the reset-mode framework are from PulseWire's open-source **Cumulative Volume Delta** indicator — © PulseWire, MPL-2.0. This script is a derivative work of it.
- Uses the **PineCoders** `Time` and `lower_tf` libraries, and the **PulseWire** `ta` library.
- Original contributions in this version: the ATR ZigZag pivot engine replacing fixed-lookback pivots, multi-pivot divergence comparison, order-flow-normalised strength scoring, the quality-filter and signal-hygiene layers, reset-generation invalidation, dual-pane divergence line rendering, and the early-warning logic.
---
Indicator

Gold Apex MTF What it is
A two-layer indicator built for XAUUSD. Layer one reads a higher timeframe to decide which direction you're allowed to trade. Layer two watches your actual chart (5m/15m) and only fires an entry signal when several independent, unrelated confirmations line up in that direction at the same time. This is the "HTF for direction, LTF for timing" structure used on institutional desks — it exists specifically to stop you from taking a technically-valid signal that's actually against the dominant trend, and to stop single-indicator noise (one crossover, one candle pattern) from triggering a trade on its own.
It does not predict price. It filters. Its entire value is in what it refuses to signal.
Layer 1 — The Trend Engine (Higher Timeframe)
Runs on a separate timeframe from your chart (default 4H) via request.security, so it doesn't repaint your entries — it just reports a bias.
Four conditions must all agree before it declares a trend:
EMA stack — EMA34 > EMA89 > EMA200 for bullish (reversed for bearish). This is trend structure, not just direction.
ADX ≥ threshold (default 20) — confirms the market is actually trending, not chopping. This is the single biggest false-signal killer in the whole system.
Supertrend direction — a second, independently-calculated trend confirmation (ATR-based) that has to agree with the EMA stack.
Daily EMA200 gate — price must be on the correct side of the Daily 200 EMA. This is the "don't fight the macro trend" filter institutional desks use.
If all four agree → Bullish or Bearish bias. If they disagree → Neutral, and Layer 2 goes silent. No trend, no trade — this is intentional.
Layer 2 — The Entry Engine (Lower Timeframe — run this on 5m or 15m)
Only evaluates once Layer 1 has a bias. Scores four confluence factors, each of which only fires on the bar the event happens (not continuously):
Factor What it detects
Liquidity sweep Price wicks past a recent swing high/low (a stop-hunt) and closes back inside range — classic smart-money trap detection
VWAP reclaim Price crosses back over/under session VWAP, the intraday fair-value reference
RSI momentum cross RSI(14) crosses the 50 midline in the trade direction
MACD histogram flip MACD histogram flips from negative to positive (or vice versa)
You set a minimum confluence score (default 3 of 4). A signal only fires when the HTF bias agrees and at least that many of the four LTF factors align on the same bar. A cooldown (default 6 bars) stops it from re-firing repeatedly on the same setup.
When a signal fires, it plots a BUY/SELL label with a suggested stop-loss (beyond the nearest swing point, buffered by ATR) and take-profit (risk × 2.5 by default).
What's on the chart
Background tint — green/red/gray wash showing current HTF bias at a glance
EMA21/EMA55 cloud — fast LTF trend context, colored by which is on top
Yellow line — session VWAP
Top-right table — live HTF bias, ADX reading, Daily gate status, and both confluence scores (so you can see why it hasn't signaled yet)
BUY/SELL labels — printed with confluence score and computed SL/TP
Two alertconditions you can wire to PulseWire alerts for push/email/webhook
How to use it — step by step
Open XAUUSD, drop to your entry timeframe (5m or 15m — this is your chart timeframe, separate from the trend timeframe input).
Check the table first. Only act when it reads BULLISH or BEARISH with ADX comfortably above your threshold. If it says NEUTRAL, there's no valid trade regardless of what the LTF chart looks like — walk away or wait.
Wait for a BUY/SELL label, not just individual RSI/MACD/VWAP events — those alone mean nothing here, the label only appears once your minimum confluence score is met.
Use the printed SL/TP as your starting risk frame. Adjust to your own risk tolerance, but don't skip the stop — this indicator has no opinion on position size or account risk.
Treat a signal that doesn't hit your confluence threshold as noise. If price is sweeping liquidity but RSI/MACD/VWAP aren't confirming, that's exactly the situation the score is designed to filter out.
Re-check the table after major news (NFP, CPI, FOMC) — ADX and the EMA stack can flip fast in gold around these events, and the HTF bias can change within a few bars.
Recommended settings by style
Setting Scalping (5m entries) Intraday (15m entries — default) Swing (1H entries)
Trend Timeframe 60 (1H) 240 (4H) D (Daily)
HTF ADX Threshold 22–25 (stricter, scalping needs cleaner trends) 20 18–20
Minimum Confluence 3 of 4 3 of 4 2 of 4 (fewer LTF events on higher TFs)
Swing/Liquidity Lookback 6–8 (tighter, faster swings) 10 14–20
ATR Stop Multiplier 1.2–1.5 1.5 2.0–2.5 (wider noise on higher TF)
Reward:Risk 1.5–2.0 (faster targets) 2.5 2.5–3.5
Cooldown Bars 4–5 6 8–10
Daily EMA200 Gate On (keep it) On On
The bolded column is what's currently loaded on your chart — it's the balanced default and the right starting point. Don't change more than one or two settings at once; move the ADX threshold or confluence minimum first since those have the biggest effect on signal frequency vs. quality.
Tuning notes
More signals, lower quality: lower Minimum Confluence to 2, lower HTF ADX Trend Threshold to ~15.
Fewer signals, higher quality: raise Minimum Confluence to 4 (all factors must agree — will be rare but very clean), raise ADX threshold to 25+.
Choppy gold sessions (Asian session especially): the ADX gate should keep you flat here by design. If you're still getting signals during dead sessions, raise the ADX threshold.
News spikes: liquidity sweeps will fire constantly during high-impact news candles. Consider disabling trading (not the indicator) 15–30 minutes around major releases regardless of what it prints.
Honest limits
This is a confluence filter, not a profitability guarantee — no indicator is. Backtest it across different gold regimes (trending 2024–25 vs. choppier stretches) and forward-test on demo before sizing real risk. Gold's volatility profile changes quickly around macro events, and default settings tuned for one regime won't be optimal in another — revisit the table above periodically rather than treating it as fixed. Indicator

YURI Breadth Regime EngineAn index is capitalisation weighted. A handful of large members can hold the whole thing up while most of the list quietly breaks down underneath, and the price chart will not show you that, because the price chart is the weighted number. The count is a different number. This reads the count and tells you when the two have stopped agreeing.
THE TWO THINGS IT MEASURES
The level is how much of the list is participating right now. The default series is the percentage of S&P 500 members trading above their own 200 day moving average. Four bands: washout below 20, weak below 40, neutral below 60, strong above it. Below 20 has historically been forced selling rather than opinion, because most of the list is under its own annual average at the same time. Those readings cluster near the end of declines rather than the start. That is an observation about where they have occurred, not an instruction to buy them.
The participation read is a different question: is the index outrunning its own members. That is a question about speed rather than position, so each series measures how far it has moved over the same window and that move gets ranked against its own history. Percent for the index, because a 50 point move meant something different at 2000 than it does at 7000. Points for breadth, which is already bounded at 0 and 100. The gap between the two ranks is what gets read, and ranking is what makes a price and a percentage comparable at all.
Index in the top of its own distribution of moves while breadth is in the bottom of hers is thinning. Fewer names are carrying it. Breadth moving up harder than the index is broadening, and it is what the back end of a washout looks like.
Ranking positions instead of moves is the obvious way to build this and it does not work, which is worth saying because the failure is instructive. An index drifts upward, so its position rank pins at the top of its range for months at a time. That builds a permanent bias into the gap, and it quietly collapses the whole read into "breadth is low", which is something the level already tells you. A move measured over a fixed window is centred on its own history by construction, so it has neither problem.
WHY BOTH, AND NOT JUST THE LEVEL
The level tells you where participation is. It does not tell you which way it is going relative to price, so a level read is equally happy at 55 on the way up and 55 on the way down. The participation read tells you the direction of the disagreement but has no sense of absolute position, so it will call thinning at 75 and at 35 without distinguishing between them, and those are very different markets. Neither one is sufficient. Read together, the level says how much of the list is in, and the rank gap says whether that number is keeping up.
THE PART THAT ACTUALLY MATTERS
A new participation state has to hold for several bars before it replaces the current one.
Drop that and this becomes a threshold that flips every time the rank gap wobbles across the line, and within a month you have learned to ignore it. The hold period is the difference between a regime read and a flicker. It is exposed in the inputs. One bar makes it reactive and noisy, ten makes it stubborn and late, and there is no correct answer, only the one that matches how often you are willing to change your mind.
READING IT
The line is the breadth percentage, coloured by band. Red zone is washout, teal zone is strong.
Orange triangle near the top of the pane: participation just turned thinning.
Teal triangle near the bottom: participation just turned broadening.
The table carries the live reading, the current band, how many bars breadth has been sitting under the washout line, and the participation state with the raw rank gap in brackets. That bracketed number is worth watching on its own, because it moves before the label does. A gap climbing through the high twenties tells you the state is about to be named while the hold period is still counting.
SETTINGS THAT MATTER
The breadth series and the index have to be the same index or the comparison is noise. The default pairing is INDEX:S5TH against SP:SPX. If you switch to a Nasdaq or Russell breadth series, switch the index with it.
The move window sets what counts as "has moved". Shorter makes the participation read sensitive to swings inside a trend, longer makes it a read on the trend itself. The ranking window sets how much history each move is judged against, and nothing reads at all until both windows have filled.
The thinning and broadening gaps are separate inputs because there is no reason the two sides have to share a number. Left equal at 30 they fire about as often as each other, so if you want one side more sensitive, move that one and leave the other alone.
WHAT IT WILL NOT DO
It does not generate entries or exits, and it is not a forecast. It describes the state of participation as of the current bar, and what you do with that is your method, not mine.
The breadth series prints once a day and has no intraday history. On an intraday chart the daily value is pulled instead, so the line steps rather than curves and the current day's value keeps moving until the close. It settles when the day does. Daily or higher is where this is meant to run.
If the external series is unavailable on your plan or your symbol, the pane turns orange and the table reads NA rather than plotting a flat line that could be mistaken for a real value.
Breadth is a coincident measure of participation, not a leading one. Washouts are identifiable in hindsight far more cleanly than they are while you are standing in one, and a thinning read can persist for months in a market that keeps going up. This is context for a decision, not the decision.
Indicator

ZH Filter 007A market-timing overlay with four modules working together to tell you what state the market's in and when a run may be exhausting.
**Weekly MACD regime background.** The core engine. It computes a standard MACD — line = EMA(6) − EMA(20), signal = EMA(9) of that line — but pulls it from the **weekly** timeframe (all lengths and the timeframe are inputs; defaults 6/20/9/W). The background then resolves by priority: **green** when the weekly MACD line is above its signal (confirmed risk-on); **teal** when it's not yet bullish but the daily 10 SMA is above the 20 *and* the weekly MACD line is rising week-over-week (early warning that strength is building ahead of the weekly cross); **red** otherwise (if enabled). Green always wins the moment the weekly confirms, so teal drops off then. The teal "rising" test uses a dedicated prior-*week* MACD value so it doesn't read as flat within a week. Two alerts fire on the weekly line crossing its signal up or down.
**Moving averages.** Daily 10, 20, 50, 100, 200 SMAs, each with its own toggle and color (10 red, 20 black, 50 blue, 100 orange, 200 purple; 200 thicker). The 10 and 20 also feed the teal early-shade and the Trend Stopper's MA gate.
**Trend Stopper / Kill Candle.** Flags a single climax/distribution down-candle that tends to end an uptrend, marked with a red "STOP" triangle above the bar. Fires only when all eight conditions align at once: a down day; late in an extended run (40+ sessions since the last −3% decline); range ≥ 2.2× the 40-bar average; volume ≥ 1.2× average; body ≥ 80% of range; close in the bottom 12% of range; prior close above the 50 SMA; and the 10 above the 20. Two optional overlays — a stats label on each STOP bar, and a diagnostic mode that labels near-miss down days with a PASS/FAIL breakdown of all eight conditions — for tuning. A stopper alert is wired.
**Metrics table (top-right).** Live QQQ daily % change and a breadth read (BRD) computed as (ATHI.US − ATLO.US)/ATLO.US × 100 — new-highs-minus-new-lows pulse. Each colors green/red by sign, with size and colors configurable.
In practice: the background is your go/no-go gate (teal warns early, green confirms, red keeps you out), the MAs frame trend and pullbacks, the Trend Stopper flags when to step aside or trim, and the table gives a quick tape-and-breadth read — all aimed at timing when to engage versus stand aside. Indicator

Strategy

Indicator

Indicator

Indicator

aaaaaaaaaaa// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ SMC PRO — Smart Money Concepts (Supply & Demand + Volume Profile) ║
// ║ Pine Script v6 | Professional Indicator ║
// ║ ║
// ║ Phase 1: Automatic Supply & Demand Zones ║
// ║ Phase 2: Market Structure + Breakout Detection ║
// ║ Phase 3: Retest Confirmation + Long/Short Signals ║
// ║ Phase 4: Risk/Reward, SL, TP, and Alerts ║
// ║ Phase 5: Fixed Range Volume Profile (POC, VAH, VAL, HVN, LVN) ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
//@version=6
indicator("SMC Pro — Supply & Demand + Volume Profile",
overlay = true,
max_boxes_count = 500,
max_lines_count = 500,
max_labels_count = 500,
max_bars_back = 5000)
// ─────────────────────────────────────────────────────────────────────────────
// INPUTS
// ─────────────────────────────────────────────────────────────────────────────
// Zone Detection
string GRP_ZONE = "Zone Detection"
i_pivotLen = input.int(5, "Pivot Length", minval=2, maxval=50, group=GRP_ZONE)
i_zoneAtrMult = input.float(0.5,"Zone Width (ATR ×)", minval=0.1, maxval=3.0, step=0.1, group=GRP_ZONE)
i_minTouches = input.int(2, "Min Touches for Signal", minval=1, maxval=10, group=GRP_ZONE)
i_maxZones = input.int(20, "Max Active Zones", minval=5, maxval=50, group=GRP_ZONE)
i_maxZoneAge = input.int(500, "Max Zone Age (bars)", minval=50, maxval=2000, group=GRP_ZONE)
// Breakout & Volume
string GRP_BO = "Breakout Detection"
i_volMult = input.float(1.5,"Volume Multiplier", minval=1.0, maxval=5.0, step=0.1, group=GRP_BO)
i_atrPeriod = input.int(14, "ATR Period", minval=5, maxval=50, group=GRP_BO)
i_volSmooth = input.int(20, "Volume SMA Length", minval=5, maxval=100, group=GRP_BO)
// Signals
string GRP_SIG = "Signal Filters"
i_minRR = input.float(2.0,"Minimum Risk:Reward", minval=1.0, maxval=10.0, step=0.5, group=GRP_SIG)
i_slBuffer = input.float(0.5,"SL Buffer (ATR ×)", minval=0.1, maxval=2.0, step=0.1, group=GRP_SIG)
i_maxRetestDist = input.int(100,"Max Retest Distance (bars)", minval=10, maxval=500, group=GRP_SIG)
i_noOppZoneDist = input.float(2.0,"No Opposite Zone Within (ATR ×)", minval=0.5, maxval=5.0, step=0.5, group=GRP_SIG)
// Volume Profile
string GRP_VP = "Volume Profile"
i_showVP = input.bool(true,"Show Volume Profile", group=GRP_VP)
i_vpLookback = input.int(200, "VP Lookback Bars", minval=50, maxval=500, group=GRP_VP)
i_vpRows = input.int(50, "VP Row Count", minval=20, maxval=100, group=GRP_VP)
i_vpWidth = input.int(20, "VP Width (bars)", minval=5, maxval=80, group=GRP_VP)
i_vaPercent = input.float(70.0,"Value Area %", minval=50.0,maxval=90.0, group=GRP_VP)
// Display
string GRP_DISP = "Display"
i_showZones = input.bool(true, "Show Zones", group=GRP_DISP)
i_showLabels = input.bool(true, "Show Labels", group=GRP_DISP)
i_showSLTP = input.bool(true, "Show SL/TP Lines", group=GRP_DISP)
i_showStructure = input.bool(true,"Show Market Structure", group=GRP_DISP)
// Colors
string GRP_CLR = "Colors"
i_demandColor = input.color(color.new(#26a69a, 75), "Demand Zone", group=GRP_CLR)
i_supplyColor = input.color(color.new(#ef5350, 75), "Supply Zone", group=GRP_CLR)
i_brokenColor = input.color(color.new(#787b86, 90), "Broken Zone", group=GRP_CLR)
i_pocColor = input.color(color.new(#ff9800, 0), "POC Line", group=GRP_CLR)
i_vahColor = input.color(color.new(#2196f3, 0), "VAH Line", group=GRP_CLR)
i_valColor = input.color(color.new(#2196f3, 0), "VAL Line", group=GRP_CLR)
i_buyVolColor = input.color(color.new(#26a69a, 40), "Buy Volume", group=GRP_CLR)
i_sellVolColor = input.color(color.new(#ef5350, 40), "Sell Volume", group=GRP_CLR)
i_longColor = input.color(color.new(#00c853, 0), "Long Signal", group=GRP_CLR)
i_shortColor = input.color(color.new(#ff1744, 0), "Short Signal", group=GRP_CLR)
// ─────────────────────────────────────────────────────────────────────────────
// TYPE DEFINITIONS
// ─────────────────────────────────────────────────────────────────────────────
type Zone
float top = na
float bottom = na
bool isSupply = false
int birthBar = 0
int touches = 0
float totalVol = 0.0
bool broken = false
int brokenBar = 0
int breakDir = 0 // +1 = broken upward, -1 = broken downward
bool retested = false
float strength = 0.0
box bx = na
type Signal
bool isLong = false
float entry = na
float sl = na
float tp = na
float rr = na
int sigBar = 0
// ─────────────────────────────────────────────────────────────────────────────
// GLOBAL VARIABLES
// ─────────────────────────────────────────────────────────────────────────────
var array zones = array.new()
// Market Structure
var float msSwingHi1 = na // most recent swing high
var float msSwingHi2 = na // previous swing high
var float msSwingLo1 = na // most recent swing low
var float msSwingLo2 = na // previous swing low
var int msBias = 0 // +1 bullish, -1 bearish, 0 neutral
// Signal flags (for alerts — must be global scope)
var bool sigLong = false
var bool sigShort = false
var bool sigBullBO = false
var bool sigBearBO = false
var bool sigRetest = false
var bool sigNewDemand = false
var bool sigNewSupply = false
// Volume Profile drawing storage
var array vpBoxes = array.new()
var array vpLines = array.new()
var array vpLabels = array.new()
// Computed values
float atrVal = ta.atr(i_atrPeriod)
float avgVol = ta.sma(volume, i_volSmooth)
float bodySize = math.abs(close - open)
// Reset per-bar signal flags
sigLong := false
sigShort := false
sigBullBO := false
sigBearBO := false
sigRetest := false
sigNewDemand := false
sigNewSupply := false
// ─────────────────────────────────────────────────────────────────────────────
// HELPER FUNCTIONS
// ─────────────────────────────────────────────────────────────────────────────
// Check if two zones overlap
zonesOverlap(float top1, float bot1, float top2, float bot2) =>
top1 >= bot2 and top2 >= bot1
// Calculate zone strength score (normalized 0–100)
calcStrength(int touches, float vol, float avgV, int age) =>
float touchScore = math.min(touches / 5.0, 1.0) * 40.0
float volScore = math.min(vol / (avgV * 10.0), 1.0) * 35.0
float ageScore = math.min(age / 200.0, 1.0) * 25.0
touchScore + volScore + ageScore
// Check if a nearby opposite zone exists
hasOppositeZoneNearby(bool checkAbove, float refPrice, float maxDist) =>
bool found = false
if zones.size() > 0
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if z.broken
continue
if checkAbove and z.isSupply and z.bottom - refPrice < maxDist and z.bottom > refPrice
found := true
break
if not checkAbove and not z.isSupply and refPrice - z.top < maxDist and z.top < refPrice
found := true
break
found
// Format price to string
fmtPrice(float price) =>
str.tostring(price, format.mintick)
// ─────────────────────────────────────────────────────────────────────────────
// PHASE 1: AUTOMATIC SUPPLY & DEMAND ZONES
// ─────────────────────────────────────────────────────────────────────────────
// ── 1a. Pivot Detection ──
float pivotHi = ta.pivothigh(high, i_pivotLen, i_pivotLen)
float pivotLo = ta.pivotlow(low, i_pivotLen, i_pivotLen)
// ── 1b. Create Supply Zone from Pivot High ──
if not na(pivotHi) and i_showZones
int pBar = bar_index - i_pivotLen
float zTop = high
float zBot = zTop - nz(atrVal) * i_zoneAtrMult
bool merged = false
// Merge with existing supply zone if overlapping
if zones.size() > 0
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if z.isSupply and not z.broken and zonesOverlap(zTop, zBot, z.top, z.bottom)
z.top := math.max(z.top, zTop)
z.bottom := math.min(z.bottom, zBot)
z.touches += 1
z.totalVol += nz(volume )
z.strength := calcStrength(z.touches, z.totalVol, nz(avgVol, 1), bar_index - z.birthBar)
if not na(z.bx)
z.bx.set_top(z.top)
z.bx.set_bottom(z.bottom)
merged := true
break
if not merged
Zone newZ = Zone.new()
newZ.top := zTop
newZ.bottom := zBot
newZ.isSupply := true
newZ.birthBar := pBar
newZ.touches := 1
newZ.totalVol := nz(volume )
newZ.strength := calcStrength(1, newZ.totalVol, nz(avgVol, 1), 1)
newZ.bx := box.new(left=pBar, top=zTop, right=bar_index + 20, bottom=zBot,
border_color=color.new(i_supplyColor, 50), border_width=1,
bgcolor=i_supplyColor, border_style=line.style_solid)
zones.push(newZ)
sigNewSupply := true
// ── 1c. Create Demand Zone from Pivot Low ──
if not na(pivotLo) and i_showZones
int pBar = bar_index - i_pivotLen
float zBot = low
float zTop = zBot + nz(atrVal) * i_zoneAtrMult
bool merged = false
if zones.size() > 0
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if not z.isSupply and not z.broken and zonesOverlap(zTop, zBot, z.top, z.bottom)
z.top := math.max(z.top, zTop)
z.bottom := math.min(z.bottom, zBot)
z.touches += 1
z.totalVol += nz(volume )
z.strength := calcStrength(z.touches, z.totalVol, nz(avgVol, 1), bar_index - z.birthBar)
if not na(z.bx)
z.bx.set_top(z.top)
z.bx.set_bottom(z.bottom)
merged := true
break
if not merged
Zone newZ = Zone.new()
newZ.top := zTop
newZ.bottom := zBot
newZ.isSupply := false
newZ.birthBar := pBar
newZ.touches := 1
newZ.totalVol := nz(volume )
newZ.strength := calcStrength(1, newZ.totalVol, nz(avgVol, 1), 1)
newZ.bx := box.new(left=pBar, top=zTop, right=bar_index + 20, bottom=zBot,
border_color=color.new(i_demandColor, 50), border_width=1,
bgcolor=i_demandColor, border_style=line.style_solid)
zones.push(newZ)
sigNewDemand := true
// ── 1d. Zone Maintenance: Extend, Touch Count, Age-out, Capacity ──
if zones.size() > 0
for i = zones.size() - 1 to 0
Zone z = zones.get(i)
// Remove zones that are too old
if bar_index - z.birthBar > i_maxZoneAge
if not na(z.bx)
z.bx.delete()
zones.remove(i)
continue
// Extend active zone boxes to the right
if not z.broken and not na(z.bx)
z.bx.set_right(bar_index + 20)
// Count touches on active zones (price approaches & rejects)
if not z.broken
if z.isSupply and high >= z.bottom and high <= z.top and close < z.bottom
z.touches += 1
z.totalVol += volume
if not z.isSupply and low <= z.top and low >= z.bottom and close > z.top
z.touches += 1
z.totalVol += volume
// Update strength
z.strength := calcStrength(z.touches, z.totalVol, nz(avgVol, 1), bar_index - z.birthBar)
// Enforce max zone count — remove weakest active zones
if zones.size() > i_maxZones
// Find and remove weakest non-broken zone
float weakest = 999999.0
int weakIdx = -1
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if not z.broken and z.strength < weakest
weakest := z.strength
weakIdx := i
if weakIdx >= 0
Zone wz = zones.get(weakIdx)
if not na(wz.bx)
wz.bx.delete()
zones.remove(weakIdx)
// ─────────────────────────────────────────────────────────────────────────────
// PHASE 2: MARKET STRUCTURE + BREAKOUT DETECTION
// ─────────────────────────────────────────────────────────────────────────────
// ── 2a. Market Structure ──
if not na(pivotHi)
msSwingHi2 := msSwingHi1
msSwingHi1 := pivotHi
if not na(pivotLo)
msSwingLo2 := msSwingLo1
msSwingLo1 := pivotLo
// Determine bias
bool isHH = not na(msSwingHi1) and not na(msSwingHi2) and msSwingHi1 > msSwingHi2
bool isHL = not na(msSwingLo1) and not na(msSwingLo2) and msSwingLo1 > msSwingLo2
bool isLH = not na(msSwingHi1) and not na(msSwingHi2) and msSwingHi1 < msSwingHi2
bool isLL = not na(msSwingLo1) and not na(msSwingLo2) and msSwingLo1 < msSwingLo2
if isHH and isHL
msBias := 1
else if isLH and isLL
msBias := -1
else
msBias := 0
// Structure label on pivots
if i_showStructure and not na(pivotHi)
string sLabel = isHH ? "HH" : isLH ? "LH" : "SH"
color sColor = isHH ? i_longColor : isLH ? i_shortColor : color.gray
label.new(bar_index - i_pivotLen, high , sLabel,
style=label.style_label_down, color=color.new(sColor, 80),
textcolor=sColor, size=size.tiny)
if i_showStructure and not na(pivotLo)
string sLabel = isHL ? "HL" : isLL ? "LL" : "SL"
color sColor = isHL ? i_longColor : isLL ? i_shortColor : color.gray
label.new(bar_index - i_pivotLen, low , sLabel,
style=label.style_label_up, color=color.new(sColor, 80),
textcolor=sColor, size=size.tiny)
// ── 2b. Breakout Detection ──
bool volFilter = volume > avgVol * i_volMult
bool bodyFilter = bodySize > nz(atrVal)
if zones.size() > 0
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if z.broken
continue
// Bullish breakout: close above supply zone with confirmation
if z.isSupply and close > z.top and volFilter and bodyFilter
z.broken := true
z.brokenBar := bar_index
z.breakDir := 1
if not na(z.bx)
z.bx.set_bgcolor(i_brokenColor)
z.bx.set_border_color(color.new(i_brokenColor, 50))
z.bx.set_right(bar_index)
sigBullBO := true
if i_showLabels
label.new(bar_index, low, "BO▲",
style=label.style_label_up, color=color.new(i_longColor, 60),
textcolor=i_longColor, size=size.small)
// Bearish breakout: close below demand zone with confirmation
if not z.isSupply and close < z.bottom and volFilter and bodyFilter
z.broken := true
z.brokenBar := bar_index
z.breakDir := -1
if not na(z.bx)
z.bx.set_bgcolor(i_brokenColor)
z.bx.set_border_color(color.new(i_brokenColor, 50))
z.bx.set_right(bar_index)
sigBearBO := true
if i_showLabels
label.new(bar_index, high, "BO▼",
style=label.style_label_down, color=color.new(i_shortColor, 60),
textcolor=i_shortColor, size=size.small)
// ─────────────────────────────────────────────────────────────────────────────
// PHASE 3: RETEST CONFIRMATION + LONG/SHORT SIGNALS
// ─────────────────────────────────────────────────────────────────────────────
if zones.size() > 0
for i = 0 to zones.size() - 1
Zone z = zones.get(i)
if not z.broken or z.retested
continue
// Skip if breakout too old
if bar_index - z.brokenBar > i_maxRetestDist
continue
// Must be at least 2 bars after breakout for retest to form
if bar_index - z.brokenBar < 2
continue
// ── Bullish Retest (supply broken upward → now demand) ──
if z.breakDir == 1
// Previous bar: wick dipped into zone, closed above zone
bool prevRetest = low <= z.top and low >= z.bottom and close > z.top
// Current bar: bullish confirmation
bool confirm = close > open and close > close
bool volOK = volume > avgVol
bool structOK = msBias >= 0
if prevRetest and confirm and volOK and structOK
float entry = close
float sl = z.bottom - nz(atrVal) * i_slBuffer
float risk = entry - sl
float tp = entry + risk * i_minRR
float rr = risk > 0 ? (tp - entry) / risk : 0.0
// Check no supply zone nearby above
bool noOppZone = not hasOppositeZoneNearby(true, entry, nz(atrVal) * i_noOppZoneDist)
if risk > 0 and rr >= i_minRR and noOppZone and z.touches >= i_minTouches
z.retested := true
sigRetest := true
sigLong := true
// Draw entry arrow
label.new(bar_index, low, "▲ LONG " + fmtPrice(entry),
style=label.style_label_up, color=i_longColor,
textcolor=color.white, size=size.normal)
if i_showSLTP
// SL line
line.new(bar_index, sl, bar_index + 20, sl,
color=i_shortColor, width=1, style=line.style_dashed)
label.new(bar_index + 20, sl, "SL " + fmtPrice(sl),
style=label.style_label_left, color=color.new(i_shortColor, 70),
textcolor=i_shortColor, size=size.tiny)
// TP line
line.new(bar_index, tp, bar_index + 20, tp,
color=i_longColor, width=1, style=line.style_dashed)
label.new(bar_index + 20, tp, "TP " + fmtPrice(tp) + " (" + str.tostring(rr, "#.#") + "R)",
style=label.style_label_left, color=color.new(i_longColor, 70),
textcolor=i_longColor, size=size.tiny)
// Entry line
line.new(bar_index, entry, bar_index + 20, entry,
color=i_longColor, width=2, style=line.style_solid)
// ── Bearish Retest (demand broken downward → now supply) ──
if z.breakDir == -1
// Previous bar: wick pushed into zone, closed below zone
bool prevRetest = high >= z.bottom and high <= z.top and close < z.bottom
// Current bar: bearish confirmation
bool confirm = close < open and close < close
bool volOK = volume > avgVol
bool structOK = msBias <= 0
if prevRetest and confirm and volOK and structOK
float entry = close
float sl = z.top + nz(atrVal) * i_slBuffer
float risk = sl - entry
float tp = entry - risk * i_minRR
float rr = risk > 0 ? (sl - entry) / risk * i_minRR : 0.0
bool noOppZone = not hasOppositeZoneNearby(false, entry, nz(atrVal) * i_noOppZoneDist)
if risk > 0 and rr >= i_minRR and noOppZone and z.touches >= i_minTouches
z.retested := true
sigRetest := true
sigShort := true
label.new(bar_index, high, "▼ SHORT " + fmtPrice(entry),
style=label.style_label_down, color=i_shortColor,
textcolor=color.white, size=size.normal)
if i_showSLTP
line.new(bar_index, sl, bar_index + 20, sl,
color=i_shortColor, width=1, style=line.style_dashed)
label.new(bar_index + 20, sl, "SL " + fmtPrice(sl),
style=label.style_label_left, color=color.new(i_shortColor, 70),
textcolor=i_shortColor, size=size.tiny)
line.new(bar_index, tp, bar_index + 20, tp,
color=i_longColor, width=1, style=line.style_dashed)
label.new(bar_index + 20, tp, "TP " + fmtPrice(tp) + " (" + str.tostring(i_minRR, "#.#") + "R)",
style=label.style_label_left, color=color.new(i_longColor, 70),
textcolor=i_longColor, size=size.tiny)
line.new(bar_index, entry, bar_index + 20, entry,
color=i_shortColor, width=2, style=line.style_solid)
// ─────────────────────────────────────────────────────────────────────────────
// PHASE 4: SIGNAL INFO TABLE
// ─────────────────────────────────────────────────────────────────────────────
// Structure bias bar color (subtle background)
barcolor(i_showStructure ? (msBias == 1 ? color.new(i_longColor, 90) : msBias == -1 ? color.new(i_shortColor, 90) : na) : na)
// Info table on last bar
if barstate.islast
var table infoTbl = table.new(position.top_right, 2, 5,
bgcolor=color.new(#1e222d, 10), border_width=1, border_color=color.new(color.gray, 70))
string biasText = msBias == 1 ? "BULLISH" : msBias == -1 ? "BEARISH" : "NEUTRAL"
color biasClr = msBias == 1 ? i_longColor : msBias == -1 ? i_shortColor : color.gray
int activeCount = 0
int brokenCount = 0
if zones.size() > 0
for i = 0 to zones.size() - 1
if zones.get(i).broken
brokenCount += 1
else
activeCount += 1
infoTbl.cell(0, 0, "SMC PRO", text_color=color.white, text_size=size.small, bgcolor=color.new(#363a45, 0))
infoTbl.cell(1, 0, "", bgcolor=color.new(#363a45, 0))
infoTbl.cell(0, 1, "Structure", text_color=color.gray, text_size=size.tiny)
infoTbl.cell(1, 1, biasText, text_color=biasClr, text_size=size.tiny)
infoTbl.cell(0, 2, "Active Zones", text_color=color.gray, text_size=size.tiny)
infoTbl.cell(1, 2, str.tostring(activeCount), text_color=color.white, text_size=size.tiny)
infoTbl.cell(0, 3, "Broken Zones", text_color=color.gray, text_size=size.tiny)
infoTbl.cell(1, 3, str.tostring(brokenCount), text_color=color.white, text_size=size.tiny)
infoTbl.cell(0, 4, "ATR", text_color=color.gray, text_size=size.tiny)
infoTbl.cell(1, 4, fmtPrice(nz(atrVal)), text_color=color.white, text_size=size.tiny)
// ─────────────────────────────────────────────────────────────────────────────
// PHASE 5: FIXED RANGE VOLUME PROFILE
// ─────────────────────────────────────────────────────────────────────────────
if barstate.islast and i_showVP
// ── 5a. Cleanup previous VP drawings ──
if vpBoxes.size() > 0
for i = vpBoxes.size() - 1 to 0
box b = vpBoxes.get(i)
if not na(b)
b.delete()
vpBoxes.clear()
if vpLines.size() > 0
for i = vpLines.size() - 1 to 0
line l = vpLines.get(i)
if not na(l)
l.delete()
vpLines.clear()
if vpLabels.size() > 0
for i = vpLabels.size() - 1 to 0
label lb = vpLabels.get(i)
if not na(lb)
lb.delete()
vpLabels.clear()
// ── 5b. Calculate price range ──
int lookback = math.min(i_vpLookback, bar_index)
float rangeHi = ta.highest(high, lookback)
float rangeLo = ta.lowest(low, lookback)
float rowH = (rangeHi - rangeLo) / i_vpRows
if rowH > 0
// ── 5c. Accumulate volume per row ──
array buyVol = array.new(i_vpRows, 0.0)
array sellVol = array.new(i_vpRows, 0.0)
for b = 0 to lookback - 1
float bHi = high
float bLo = low
float bVol = nz(volume )
bool isBuy = close >= open
int startRow = math.max(0, math.floor((bLo - rangeLo) / rowH))
int endRow = math.min(i_vpRows - 1, math.floor((bHi - rangeLo) / rowH))
if endRow >= startRow
int numRows = endRow - startRow + 1
float volPerRow = bVol / numRows
for r = startRow to endRow
if isBuy
buyVol.set(r, buyVol.get(r) + volPerRow)
else
sellVol.set(r, sellVol.get(r) + volPerRow)
// ── 5d. Find POC, max volume, VAH, VAL ──
float maxVol = 0.0
int pocRow = 0
float totalVol = 0.0
array totalPerRow = array.new(i_vpRows, 0.0)
for r = 0 to i_vpRows - 1
float rv = buyVol.get(r) + sellVol.get(r)
totalPerRow.set(r, rv)
totalVol += rv
if rv > maxVol
maxVol := rv
pocRow := r
// Value Area calculation — expand outward from POC until vaPercent reached
float vaTarget = totalVol * i_vaPercent / 100.0
float vaSum = totalPerRow.get(pocRow)
int vaHiRow = pocRow
int vaLoRow = pocRow
for _step = 0 to i_vpRows - 1
if vaSum >= vaTarget
break
float aboveVol = vaHiRow < i_vpRows - 1 ? totalPerRow.get(vaHiRow + 1) : 0.0
float belowVol = vaLoRow > 0 ? totalPerRow.get(vaLoRow - 1) : 0.0
if aboveVol >= belowVol and vaHiRow < i_vpRows - 1
vaHiRow += 1
vaSum += aboveVol
else if vaLoRow > 0
vaLoRow -= 1
vaSum += belowVol
else if vaHiRow < i_vpRows - 1
vaHiRow += 1
vaSum += aboveVol
else
break
float pocPrice = rangeLo + (pocRow + 0.5) * rowH
float vahPrice = rangeLo + (vaHiRow + 1) * rowH
float valPrice = rangeLo + vaLoRow * rowH
// ── 5e. Draw histogram ──
int vpLeftBar = bar_index + 5
float volScale = maxVol > 0 ? i_vpWidth / maxVol : 0.0
for r = 0 to i_vpRows - 1
float rowBot = rangeLo + r * rowH
float rowTop = rowBot + rowH
float bv = buyVol.get(r)
float sv = sellVol.get(r)
float tv = bv + sv
if tv > 0
int totalWidth = math.max(1, math.round(tv * volScale))
int buyWidth = math.max(0, math.round(bv * volScale))
int sellWidth = totalWidth - buyWidth
// Buy volume box
if buyWidth > 0
box bxBuy = box.new(vpLeftBar, rowTop, vpLeftBar + buyWidth, rowBot,
border_color=color.new(i_buyVolColor, 70), border_width=0,
bgcolor=i_buyVolColor)
vpBoxes.push(bxBuy)
// Sell volume box (stacked after buy)
if sellWidth > 0
box bxSell = box.new(vpLeftBar + buyWidth, rowTop, vpLeftBar + buyWidth + sellWidth, rowBot,
border_color=color.new(i_sellVolColor, 70), border_width=0,
bgcolor=i_sellVolColor)
vpBoxes.push(bxSell)
// Highlight HVN / LVN
bool isHVN = tv > totalVol / i_vpRows * 1.5
bool isLVN = tv < totalVol / i_vpRows * 0.5
// HVN: subtle bright border
if isHVN and totalWidth > 2
box bxHVN = box.new(vpLeftBar, rowTop, vpLeftBar + totalWidth, rowBot,
border_color=color.new(color.white, 70), border_width=1,
bgcolor=color.new(color.white, 97))
vpBoxes.push(bxHVN)
// ── 5f. Draw POC, VAH, VAL lines ──
int lineRight = vpLeftBar + i_vpWidth + 5
line pocLine = line.new(bar_index - lookback, pocPrice, lineRight, pocPrice,
color=i_pocColor, width=2, style=line.style_solid)
vpLines.push(pocLine)
line vahLine = line.new(bar_index - lookback, vahPrice, lineRight, vahPrice,
color=i_vahColor, width=1, style=line.style_dashed)
vpLines.push(vahLine)
line valLine = line.new(bar_index - lookback, valPrice, lineRight, valPrice,
color=i_valColor, width=1, style=line.style_dashed)
vpLines.push(valLine)
// Labels
label pocLbl = label.new(lineRight, pocPrice, "POC " + fmtPrice(pocPrice),
style=label.style_label_left, color=color.new(i_pocColor, 70),
textcolor=i_pocColor, size=size.tiny)
vpLabels.push(pocLbl)
label vahLbl = label.new(lineRight, vahPrice, "VAH " + fmtPrice(vahPrice),
style=label.style_label_left, color=color.new(i_vahColor, 70),
textcolor=i_vahColor, size=size.tiny)
vpLabels.push(vahLbl)
label valLbl = label.new(lineRight, valPrice, "VAL " + fmtPrice(valPrice),
style=label.style_label_left, color=color.new(i_valColor, 70),
textcolor=i_valColor, size=size.tiny)
vpLabels.push(valLbl)
// ─────────────────────────────────────────────────────────────────────────────
// ALERTS
// ─────────────────────────────────────────────────────────────────────────────
alertcondition(sigNewDemand, title="New Demand Zone", message="SMC PRO: New Demand (Support) Zone detected")
alertcondition(sigNewSupply, title="New Supply Zone", message="SMC PRO: New Supply (Resistance) Zone detected")
alertcondition(sigBullBO, title="Bullish Breakout", message="SMC PRO: Bullish Breakout — price closed above supply zone with volume confirmation")
alertcondition(sigBearBO, title="Bearish Breakout", message="SMC PRO: Bearish Breakout — price closed below demand zone with volume confirmation")
alertcondition(sigRetest, title="Successful Retest", message="SMC PRO: Successful Retest confirmed at broken zone")
alertcondition(sigLong, title="Long Entry", message="SMC PRO: LONG Entry — breakout + retest + confirmation + volume + structure aligned")
alertcondition(sigShort, title="Short Entry", message="SMC PRO: SHORT Entry — breakout + retest + confirmation + volume + structure aligned")
// ─────────────────────────────────────────────────────────────────────────────
// END
// ─────────────────────────────────────────────────────────────────────────────
Indicator

Adaptive Trend ConsensusAdaptive Trend Consensus (ATC)
Why this exists
Nearly every trend tool has the same failure mode: it is excellent while a market trends and it bleeds out while a market chops. The usual response is to stack more trend indicators on top of each other — three moving averages, a Supertrend and a MACD. That does not help, because those tools are all measuring the same thing. When one is wrong they are usually all wrong together. Stacking correlated indicators increases confidence without increasing information.
ATC takes a different approach. It uses a single orthogonal measurement — how efficiently price is moving — and lets that measurement adapt, weight and gate everything else.
The spine: Kaufman's Efficiency Ratio
Efficiency Ratio (ER) is the net distance price travelled over N bars divided by the total path length it walked to get there:
ER = |close − close | / Σ|close − close |
A perfectly straight move returns 1.0. Pure noise returns close to 0.0. ER says nothing about direction — only about the quality of movement. That is what makes it a genuinely independent input rather than another trend indicator in disguise.
In this script ER does three jobs at once:
It sets the baseline's speed. The baseline is an adaptive moving average whose smoothing constant is derived from ER, so it tracks price tightly during efficient moves and goes nearly flat during noise. It does not need a "fast" and a "slow" setting, because it is both.
It sets the trail's width. A ratcheting ATR trail is built around that baseline, but the ATR multiplier is scaled inversely to efficiency — roughly 1.6× ATR in a clean trend, widening toward 4.0× as efficiency collapses. The trail therefore tightens when it should be responsive and widens exactly when whipsaw risk is highest. A fixed-multiplier Supertrend cannot do this.
It gates the whole script. Below the ER threshold the indicator declares a non-trending regime, greys out, and stops issuing signals entirely. This is the single most important behaviour in the script: it is designed to say nothing, often.
The consensus score
Rather than an AND chain of boolean filters — brittle, and it fails silently when one condition is marginal — ATC produces a weighted score from −100 to +100 across four deliberately uncorrelated components:
Component What it measures Why it is here
Structure (40%) Adaptive trail direction + baseline slope normalised in ATR units The trend reading itself
MTF alignment (25%) The same engine run on two higher timeframes, each weighted by its own efficiency Context — and a chopping higher timeframe correctly contributes almost nothing
Momentum quality (20%) Rate of change converted to a z-score against its own recent distribution Standardised, so it is comparable across symbols and volatility regimes
Participation (15%) Chaikin Money Flow — is volume transacting toward the highs or the lows Trends without participation decay; auto-disabled with weight redistributed on symbols with no volume feed
Weights are fully adjustable, and disabling a component redistributes its weight rather than leaving a hole in the score.
Exhaustion damping
When price runs a long way from the adaptive baseline the trend is not absent — it is late. Flipping the signal there would be wrong. Instead ATC damps the score's magnitude toward neutral in proportion to how stretched price is in ATR terms. The effect is to discourage fresh entries into an extended move without forcing an exit from a position already working. The dashboard shows the stretch in ATR units and how much damping is being applied.
Non-repainting
Higher-timeframe data is read with a one-bar offset inside the higher-timeframe context, so only closed higher-timeframe bars are ever used. Historical signals match what would have been available live. The usual trade-off applies: confirmation arrives at the close of the higher-timeframe bar rather than during it.
How to read it
Baseline — coloured by consensus score. Grey means no trade.
Trail — the adaptive stop line; its distance from price tells you the current regime at a glance.
Dashboard — every component's contribution shown separately, so you can see why the score is what it is rather than trusting a black box.
Markers — ▲ / ▼ on entry, ✕ on exit, ! when the trend is extended.
Defaults
Tuned for intraday index and futures work. The session filter is available for cash-hours-only operation. Longer-horizon users should raise the Efficiency Ratio length and the chop gate; faster users should lower both.
Honest limitations
ATC is a trend tool. In a genuinely range-bound market it will correctly refuse to trade, which means long stretches of no signals. That is the design, not a fault.
The chop gate is a threshold on a continuous variable, so it will occasionally re-enter a trend late after a shakeout drops ER below the gate.
Higher-timeframe confirmation lags by construction. That is the price of not repainting.
Chaikin Money Flow depends on the venue's volume feed. On spot forex it reflects tick volume, which is a proxy, not real participation.
No indicator has an edge on its own. This is a decision-support tool, not a trading system. Indicator

Indicator

Session Micro-Structure Shift & Range Equilibrium RadarOverview and Purpose
The Session Micro-Structure Shift and Range Equilibrium Radar is an open source technical analysis indicator designed for intraday traders utilizing ICT and Smart Money Concepts (SMC). It automates the tracking of key trading sessions like Asia, London, and New York, measures range equilibrium, and filters for structural shifts combined with Fair Value Gap (FVG) retests.
How the Indicator Works and Mathematical Logic
1. Session Range and Equilibrium Computation:
The script plots distinct session ranges for Asia (20:00 to 00:00 UTC-4), London (02:00 to 06:00 UTC-4), and New York (08:00 to 12:00 UTC-4). For each active session, the 50 percent Equilibrium level is dynamically plotted using the average of session high and session low.
2. Liquidity Sweep Detection:
The algorithm continuously checks whether price sweeps the previous session high or low liquidity levels.
3. ATR Filtered Displacement and MSS Confirmation:
Following a sweep, a Micro-Structure Shift (MSS) is validated only when a displacement candle forms. Displacement is verified using a 14 period Average True Range filter where the candle body size exceeds 0.8 times the ATR value. The bar must close beyond the active session equilibrium line to mark a true MSS.
4. Fair Value Gap (FVG) Identification and Alert Engine:
When an MSS is confirmed, the script checks for a 3 candle imbalance and draws an active zone box. To avoid signal spam, exactly one alert per session is triggered when price taps into the FVG zone.
Trading Interpretation and Application
Valid Setup (FVG Tap):
When price sweeps a session extreme, confirms an MSS across the Equilibrium level, and retraces to tap the highlighted FVG zone, a valid trade setup occurs. Traders typically place stop losses at the recent swing low or high and target a minimum 1 to 2.5 Risk to Reward ratio.
Invalidated or Unfilled Setup (Missed FVG):
If price performs all required steps like sweep and MSS but fails to retest or tap the FVG box before expanding away, no alert triggers, and the setup is treated as unfilled to protect capital.
Disclaimer
This script is strictly for educational and chart analysis purposes. It does not provide financial advice or direct trading signals. Always manage risk responsibly and perform backtesting across your chosen trading pairs.
Indicator

Structure Sniper1. What it is
Structure Sniper is an overlay indicator that answers one question: is price at a location worth trading, and is momentum agreeing with it right now?
It merges four analytical layers that traders normally run as separate indicators:
Market structure (Break of Structure / Change of Character)
Order blocks (institutional supply/demand zones)
Fair value gaps (price imbalances)
A momentum confluence engine that internally re-implements the logic of SMI Pro X (SMI + Squeeze) and Confluence Compass (envelope + MFI)
Instead of you cross-referencing four panels, it scores everything into a single 0–7 confluence score per side and only prints a signal when the score clears your threshold. Nothing repaints: structure breaks, zones, and signals are only confirmed on closed bars (barstate.isconfirmed).
2. The four layers, in detail
Layer 1 — Market structure (the trend filter, worth 2 points)
The script finds swing highs and lows using pivots (default: 8 bars each side). When a candle closes beyond the last swing high/low:
BOS (Break of Structure) — the break continues the current trend. Trend confirmation.
CHoCH (Change of Character) — the break goes against the prior trend. Early reversal warning.
Each break draws a dashed line from the swing and a small label. Internally the script keeps a trend state (bull / bear), and that state is worth 2 of the 7 points. This is the backbone: without structure agreement, a signal can score at most 5/7.
Because breaks require a close beyond the level (not a wick), stop-hunt wicks through a swing high do not flip the trend state. That is your first false-signal filter, built in.
Layer 2 — Order blocks (the "where", worth 2 points shared with FVGs)
When a bullish break happens, the script looks back (default 15 bars) for the last bearish candle before the impulse — the bullish order block — and draws it as a green zone. Bearish breaks produce red zones from the last bullish candle. Zones auto-extend right and are deleted the moment price closes through them (a violated zone is dead information; keeping it on the chart is how most OB indicators generate false confidence).
Only the most recent zones are kept (default 6 per type), so the chart shows the zones that still matter, not archaeology.
Layer 3 — Fair value gaps (also part of the "where")
A three-candle imbalance (candle 1's high below candle 3's low, or inverse) creates an FVG box — blue for bullish, orange for bearish. Two filters keep these honest:
ATR minimum size (default 0.15 × ATR14): micro-gaps that fill instantly are ignored.
Fill deletion: once price closes back through the gap, the box is removed.
Price touching any live bullish OB or bullish FVG sets the "In Zone" condition — worth 2 points. Location is deliberately weighted as heavily as trend: a signal in the middle of nowhere is the most common false signal in momentum systems.
Layer 4 — Momentum confluence (three checks, 1 point each)
These are compact re-implementations of your other two indicators, so one script can flag full-stack agreement:
SMI vs its signal line (from SMI Pro X): +1 long when SMI > signal, +1 short when below. Direction-of-momentum check.
MFI positioning (from Confluence Compass): +1 long when MFI < 40 (selling pressure exhausting), +1 short when MFI > 60. This is intentionally a contrarian check — it rewards entering where flow is stretched, not chasing it.
Volatility trigger: +1 when either the squeeze just released (BB inside KC on the prior bar, released now) or price swept beyond the Gaussian envelope band (default 3 × mean absolute error). Both are "energy" events: compression breaking, or an overextension snapping back.
3. The score and the signal
Long score = Trend bull (2) + In bull zone (2) + SMI rising (1) + MFI < 40 (1) + Squeeze fire or envelope sweep (1)
Short score = mirror image
A "▲ SNIPE n/7" label prints when the score reaches your threshold (default 5) on a closed bar, subject to a cooldown (default 10 bars) that prevents signal clusters. Alerts exist for both sides. The dashboard (top right) shows every component live plus both scores, so you always know why a signal did or didn't fire.
Think about what 5/7 forces: you can't signal without either trend or zone (2+2 = 4 of the 7), plus at least one momentum agreement. A trend-only signal (2+1+1+1) needs every momentum check aligned. A countertrend signal needs the zone plus all three momentum checks — rare by design, which is exactly what a CHoCH reversal entry should be.
4. Fading out false signals — the tuning manual
False signals in this system come from four identifiable sources. Each has a specific dial.
Source 1: Chop — structure flips every few bars. The fix is Swing Pivot Length. At 8 (default) structure is responsive; in ranging conditions it flips too easily. Raise to 10–12 and only meaningful swings register, so the 2 trend points stop oscillating. This is the single highest-impact anti-noise setting.
Source 2: Stale zones — signals firing off zones the market no longer respects. Lower Max Zones Kept from 6 to 3–4. Fewer, fresher zones mean the 2 location points only come from levels created by recent structure. Also raise Min Gap Size to 0.25–0.30 ATR so only meaningful imbalances count as FVGs — on gold 15m, sub-quarter-ATR gaps are spread noise.
Source 3: Threshold too permissive. Raise Signal Threshold from 5 to 6. At 6/7 you effectively require trend + zone + two momentum confirmations. Expect roughly 60–70% fewer signals; the ones that remain are the A-setups. If you find yourself taking every signal at 5, you want 6.
Source 4: Signal clustering around one event. Raise Cooldown from 10 to 16–20 bars on 15m (4–5 hours). One structural event = one signal. Re-entries on the same zone are usually the trade that gives back the first one's profit.
Recommended preset for XAUUSD 15m (conservative / publication default)
Input Default Anti-noise setting
Swing Pivot Length 8 10
OB Search Lookback 15 15
Max Zones Kept 6 4
Min Gap Size (ATR) 0.15 0.25
Signal Threshold 5 6
Cooldown Bars 10 16
Envelope Window / Bandwidth / Mult 50 / 8 / 3.0 50 / 8 / 3.25
Per-timeframe presets
5m (scalping — expect the most noise): Pivot 12, Max Zones 3, Gap 0.30 ATR, Threshold 6, Cooldown 24, Envelope Mult 3.5. On 5m gold, treat 6/7 as the only tradeable signal and skip the first 15 minutes of London and NY opens — structure breaks there are liquidity events, not trends.
15m (your primary): the conservative preset above. Best signal quality windows are the London morning and the first two hours of NY after the open volatility settles.
1H (swing entries): Pivot 8, Max Zones 4, Gap 0.20 ATR, Threshold 5, Cooldown 8, defaults elsewhere. Structure is naturally cleaner on 1H, so the default threshold works; here the MFI point becomes more reliable because 1H flow extremes actually mean exhaustion.
4H/Daily: Pivot 6, Threshold 5, Cooldown 4, Envelope Window 75. Signals are rare (a few per month) but these are the ones worth sizing up.
The filters the indicator can't apply for you
Three discretionary rules remove most of what remains: skip signals within 30 minutes of red-folder news (structure breaks on NFP/CPI are liquidity sweeps in disguise); prefer signals where the zone being touched was created by a CHoCH, not a routine BOS (reversal zones are defended harder); and on 15m, check that SMI Pro X's HTF reading agrees with the direction — the internal SMI is chart-timeframe only.
5. Reading the dashboard
Row Meaning What you want before a long
Trend Structure state BULL
In Zone (OB/FVG) Price touching a live zone BULL
SMI Value + direction arrow ▲ (rising)
MFI Money flow 0–100 < 40, ideally turning
Squeeze ON / FIRED / off FIRED (or fresh envelope sweep)
Long / Short score Live 0–7 tally ≥ your threshold
A useful habit: when the score sits at threshold−1, you know exactly which single condition is missing — wait for it rather than anticipating it.
6. What it won't do (honesty section for the publication page)
It doesn't know the higher timeframe — pair it with your HTF bias. It doesn't know the news calendar. The MFI check is contrarian and will occasionally hold the score down during strong one-way trends; that's the cost of it saving you from buying tops. Order blocks and FVGs are heuristics for institutional interest, not a guarantee anyone will defend them. And no confluence score substitutes for a stop: the natural invalidation is the far side of the zone that triggered the signal, or the swing that created the last BOS.
7. Alerts
Two alert conditions ship with the script: Structure Sniper LONG and Structure Sniper SHORT. Both fire only on closed bars at or above the threshold, so an alert equals a chart signal — no intrabar ghosts. Indicator

SMA + BB STATUES1. Price Action: TDP 2 (Candlestick Body Ratios)
What it does: It looks for specific bullish and bearish candles based on a minimum body ratio (the body of the candle must make up at least 55% of the total high-to-low range).
How it works:
Bullish Candles: Marked with a Green Arrow pointing up. The script remembers the low of the most recent valid bullish candle.
Bearish Candles (Under Low): Marked with a Red Arrow pointing down if a valid bearish candle closes below the low of the last bullish candle.
Bearish Candles (Not Under Low): Marked with an Orange X if a valid bearish candle forms but fails to close below the low of the last bullish candle.
Behind the scenes: The script tracks the highs and lows of the last two bullish signals, allowing for potential future logic to compare them.
2. Trend Direction: Simple Moving Average (SMA)
What it does: Plots a traditional Simple Moving Average to help you identify the baseline trend direction.
How it works:
Defaults to a length of 9 (customizable).
You also have an advanced "SMA Smoothing" option where you can apply a secondary moving average (or even Bollinger Bands) to the SMA itself. This is useful if you want to look for momentum shifts within the moving average.
3. Volatility: Madrid Bollinger Bands
What it does: Plots a multi-layered channel around the price to show volatility and potential overextended areas.
How it works:
Instead of just one standard deviation line, it plots two. It calculates a standard deviation and plots one band at that level, and a second band at a multiplied level (e.g., 2.0x).
The bands are filled with color-coded gradients (Blue when the price is above the basis line, Orange when below) to give you an immediate visual cue of the trend state and the volatility expansion/contraction.
4. The Dashboard: Multi-Timeframe Status Table
What it does: A real-time data table in the top right corner that reads the trend and volatility states across three different timeframes simultaneously (Daily, Weekly, Monthly).
How it works:
SMA Status: Checks a 50-period Daily SMA, a 20-period Weekly SMA, and a 10-period Monthly SMA. If the current price is above the respective SMA, it reads "POSITIVE" (Green); if below, it reads "NEGATIVE" (Red).
Bollinger Bands Status: Analyzes a 20-period Bollinger Band across all three timeframes to tell you exactly where the price sits within the channel:
hi: Price is in the upper half of the channel (between 55% and 105% of the band width).
mid edge: Price is consolidating right around the moving average (between 45% and 55% of the band width).
in low: Price is in the lower half of the channel (between -5% and 45% of the band width). Indicator

Indicator

ConfluXA multi-factor directional bias indicator that reads five independent market forces and points to a single, honest answer: where is the tape actually pointing right now?
Overview
Most traders stare at four or five indicators, argue with themselves, and take the trade anyway. ConfluX does the arguing for you. It reads trend, momentum, structure, volatility, and flow on the timeframe you're watching and one higher timeframe, aggregates them into a single directional score, and shows you when the tape is aligned — and when it's a coin flip.
The output is a compass needle that swings from -100 (strong bearish confluence) to +100 (strong bullish confluence), plus a background heatmap on the price chart and a confluence badge showing how many of the five components agree.
Use it to:
Filter your existing setups (only trade when the compass agrees)
Time entries against S/R zones (compass flips inside a demand zone = buy trigger)
Avoid chop (needle stuck between -30 and +30 = stand aside)
Confirm higher-timeframe bias without switching charts
The Five Components
Each component outputs a normalized -1 to +1 score and is weighted into the final compass reading.
1. Trend Alignment (weight: 30%)
EMA stack alignment — fast (default 20), medium (50), slow (200). Score is based on:
Whether all three EMAs are stacked in order (fast > medium > slow = full bull, opposite = full bear)
Price position relative to the medium EMA
Slope of the medium EMA
2. Momentum (weight: 25%)
Composite of RSI (default 14) and Squeeze Momentum (LazyBear-style, TTM-style, or your preferred implementation). Score reflects:
Direction: is RSI above/below its centerline and rising/falling?
Squeeze state: momentum expanding or contracting?
Divergence flag (optional): if enabled, negates score on confirmed divergences
3. Market Structure (weight: 20%)
Simple higher-highs/higher-lows (or LH/LL) detection on a swing lookback (default 10 bars). Score:
+1 for confirmed HH+HL sequence
-1 for confirmed LH+LL sequence
0 during range/consolidation
Bonus proximity boost when price is inside a marked S/R zone (optional input)
4. Volatility Regime (weight: 15%)
ATR (default 14) as a % of price, with Bollinger Band width as a cross-check. Score:
Expanding volatility in the direction of the trend = boost
Expanding volatility against trend = penalty (reversal risk)
Contracting volatility = damped signal (chop warning)
5. Flow (weight: 10%)
VWAP position plus volume delta approximation. Score:
Price above/below session VWAP
Volume above 20-bar average = confirmation
Volume divergence = penalty
Higher-Timeframe Confirmation
The compass reads all five components on the current chart timeframe and on one higher timeframe (default: 4× the current, so 15m chart pulls 1H, 1H pulls 4H, 4H pulls Daily). Higher-TF score gets a 40% weight blended into the final reading. This prevents you from scalping longs into a daily downtrend.
Visual Output
Compass needle (top-right panel, resizable): swings from -100 to +100 with color-graded arc (deep red → orange → yellow → light green → deep green)
Chart background tint: subtle green/red wash when confluence is > +50 or < -50
Confluence badge: "3/5 bullish" or "5/5 bearish" — shows how many components agree
Signal dots: optional plot when needle crosses through user-defined thresholds (default ±60)
HTF stripe: thin colored band at the top showing higher-TF bias
Inputs (Panel Groups)
Core
Timeframe multiplier for HTF (default: 4)
Bullish threshold (default: +60)
Bearish threshold (default: -60)
Chop threshold (default: ±30 → no signal)
Trend
Fast EMA (default: 20)
Medium EMA (default: 50)
Slow EMA (default: 200)
Slope lookback (default: 5 bars)
Momentum
RSI length (default: 14)
Squeeze length (default: 20)
Enable divergence penalty (default: on)
Structure
Swing lookback (default: 10)
Use manual S/R zones (default: off)
Volatility
ATR length (default: 14)
BB length / mult (default: 20 / 2.0)
Flow
VWAP anchor (session / week / month, default: session)
Volume MA length (default: 20)
Visuals
Show compass needle (on)
Show background tint (on)
Show signal dots (on)
Show HTF stripe (on)
Compass size (small / medium / large)
Color scheme (default / dark / colorblind)
Recommended Settings by Timeframe
The indicator ships with sensible defaults, but here are the tested presets. Save them as separate profiles inside the indicator's settings if you flip timeframes often.
15-Minute (Scalping / Intraday Execution)
Input Value
HTF multiplier 4 (pulls 1H)
Fast / Med / Slow EMA 9 / 21 / 55
RSI length 9
Squeeze length 14
Swing lookback 5
ATR length 10
Bull / Bear threshold ±50
Chop threshold ±25
VWAP anchor Session
Why: faster lookbacks respond in real time. Lower thresholds because 15m signals are noisier — you want to act on weaker confluence with tight stops. Session VWAP because you're trading the day, not the week.
1-Hour (Intraday Swing)
Input Value
HTF multiplier 4 (pulls 4H)
Fast / Med / Slow EMA 20 / 50 / 200
RSI length 14
Squeeze length 20
Swing lookback 8
ATR length 14
Bull / Bear threshold ±55
Chop threshold ±30
VWAP anchor Session
Why: this is the balanced middle. Defaults work well. Standard EMAs make the compass agree with what most other traders see, which is a feature, not a bug — it reads the crowd.
4-Hour (Swing Trading)
Input Value
HTF multiplier 6 (pulls Daily)
Fast / Med / Slow EMA 20 / 50 / 200
RSI length 14
Squeeze length 20
Swing lookback 10
ATR length 14
Bull / Bear threshold ±60
Chop threshold ±35
VWAP anchor Weekly
Why: higher thresholds because you're taking fewer, bigger trades — false signals cost more. Weekly VWAP because swing traders care where the week is anchored, not the session. HTF multiplier 6 pulls Daily bias directly.
Daily (Position Trading)
Input Value
HTF multiplier 5 (pulls Weekly)
Fast / Med / Slow EMA 21 / 50 / 200
RSI length 14
Squeeze length 20
Swing lookback 20
ATR length 20
Bull / Bear threshold ±65
Chop threshold ±40
VWAP anchor Monthly
Why: everything slower, everything more demanding. You want the compass to be genuinely convinced before you commit position-sized capital. Monthly VWAP captures institutional accumulation/distribution.
How to Trade It
Rule 1 — The Green/Red Light Only take longs when compass > +60 (or your custom threshold). Only take shorts when compass < -60. Between -30 and +30 = no trade, market is chopping.
Rule 2 — HTF Must Agree If HTF stripe disagrees with your compass reading, cut position size in half or skip the trade. HTF alignment is where the edge lives.
Rule 3 — Zones + Compass = Entries Wait for price to reach a marked support (for longs) or resistance (for shorts). Enter only when the compass flips into your direction at the zone. This is the highest-probability setup.
Rule 4 — Exit on Compass Divergence If you're long and the compass rolls under +30 while price is still making highs, take profit or trail your stop. The confluence is fading before price is.
Rule 5 — Chop Filter When needle sits in ±30 for 20+ bars, close directional trades and switch to range strategies (or step away).
Best Use Cases
Intraday scalpers: 15m preset, threshold ±50, tight stops at 15m ATR
Swing traders: 4H preset, wait for zone confluence, position for 3-10 day holds
Position traders: Daily preset, only act when compass hits ±80+, size for weeks-to-months
Multi-TF traders: keep 4H compass on one screen, 15m on another — take intraday trades only when both agree
What It Won't Do
Predict news / event-driven gaps
Work well on illiquid or thinly-traded symbols
Replace stop losses or position sizing
Save you from over-trading if you ignore Rule 5
ConfluX is a filter, not a crystal ball. Its edge is refusing to give you a signal when the market genuinely has no direction — a discipline most indicators (and most traders) lack.
Version Notes
v1.0: Initial release. Five components, HTF confirmation, compass needle visual, four TF presets.
Disclaimer
This indicator is a technical analysis tool and does not constitute financial advice. Past performance does not guarantee future results. Always use with proper risk management. Test on your instrument and timeframe before committing real capital.
Confluence Compass — because the market only rewards conviction when the conviction is earned. Indicator

Indicator

ADR% & LoD. dist%Who it's for
Breakout traders who want a quick read on whether a setup is still worth taking. ADR% helps you judge if the stock still has room based on its normal daily range. If price is already beyond its typical ADR%, you may choose not to buy. LoD dist helps with intraday entries by showing how far price is from the low of day, especially when using that low as your stop.
Why we built this
We wanted one clean indicator that showed both ADR% and distance from low of day. Existing tools either showed only one, had shit interfaces, or produced unreliable numbers across timeframes, so we built our own.
What it shows
ADR% — average daily range as a percentage, calculated from the 20-period average of daily high/low using closed daily bars only, so it stays stable intraday.
LoD dist — current price distance from the regular-hours low of day, in percent. It updates during RTH, ignores pre/post-market prints, and freezes after the session closes.
ATR — optional, off by default, for traders who size using absolute range instead of percentage.
Accuracy
Most accurate on the daily chart and reliable on the 5-minute chart, so the table is limited to those two timeframes instead of showing numbers we are not confident in.
Enjoy!
Written by Gordon Lee, Peter Lee
Coding work supported by Claude AI.
Indicator

OBV Signal Confluence [MarkitTick]💡 This advanced technical utility provides a comprehensive evaluation of market momentum by synthesizing cumulative volume flow with structural trend dynamics and dynamic support levels. Designed for rigorous market analysis, it evaluates directional shifts by demanding strict confluence across multiple dimensions, including momentum divergence, historical trend validation, and volatility expansion. Rather than relying on isolated price action, this tool builds a holistic profile of market participation, delivering a complete framework for structured trade management and robust signal verification.
● ✨ Originality and Utility
Most traditional momentum oscillators evaluate price velocity in a vacuum, completely ignoring the underlying participation required to sustain a trend. This utility stands apart by merging volume-weighted momentum with strict filtering mechanisms to evaluate the true strength of a market move. By integrating a multi-tiered filtration system, it effectively isolates high-probability directional shifts while filtering out low-participation market noise.
The utility is entirely self-contained, projecting dynamic trade management levels directly onto the chart when momentum alignment is confirmed. It seamlessly bridges the gap between raw data analysis and actionable trade management. By establishing precise entry, invalidation, and multiple target zones based on current market volatility, it transforms raw volume data into a structured operational blueprint.
Furthermore, the inclusion of a comprehensive heads-up display ensures that all underlying metrics—from momentum strength to historical trend states—are continuously aggregated and visually accessible, allowing for rapid contextual assessment without cluttering the primary analytical workspace.
● 🔬 Methodology and Concepts
This tool operates on a sophisticated, multi-layered evaluative engine. To protect the integrity of the underlying architecture, the methodology is described conceptually:
Cumulative Volume Flow: The primary engine evaluates the continuous flow of market volume, categorizing buying and selling pressure based on specific price action thresholds. This cumulative data is then smoothed against a dynamic, user-selectable baseline to establish the core momentum trajectory.
Higher Timeframe Confluence: To prevent acting on insignificant intraday fluctuations, the engine references the structural momentum of a higher timeframe. Signals are strictly gated unless the localized momentum aligns with this broader, macro-level directional bias.
Momentum Divergence Detection: The utility continuously scans for structural discrepancies between price pivot extremes and the corresponding extremes in the volume flow. When price establishes new structural boundaries without validating volume participation, the system flags these areas as potential exhaustion or reversal zones.
Volatility and Participation Filters: Trend strength and volume ratios are continuously measured against established historical averages. The engine requires both a minimum threshold of directional strength and a surge in relative volume participation to validate any momentum shift, ensuring that structural breaks are supported by actual market activity.
Dynamic Risk Profiling: Upon signal confirmation, the tool automatically calculates an invalidation level utilizing a multiplier of the underlying asset's average true volatility. Profit targets are then extrapolated from this established risk parameter, ensuring that every projected setup adheres to strict, predefined risk-to-reward ratios.
● 🎨 Visual Guide
The visual interface is designed to provide immediate contextual awareness while maintaining a clean charting environment:
Momentum Histogram: Plotted as columns, this visualizes the delta between the cumulative volume flow and its dynamic baseline. Color intensity shifts dynamically to reflect both the direction and the immediate acceleration or deceleration of the momentum.
Heat Candles: When enabled, this feature overrides the native chart candles, painting the price action to match the underlying volume momentum state, allowing for rapid visual confirmation of the current trend environment.
Divergence Markers: Distinct upward and downward triangular shapes are plotted directly on the chart to indicate areas where structural price action has diverged from the supporting volume flow.
Trade Management Levels: Upon a confirmed momentum shift, dashed horizontal lines appear to project the Entry, Stop Loss (SL), and three tiered Take Profit (TP) zones.
Risk/Reward Shading: Shaded background zones visually map the risk parameters, contrasting the invalidation zone against the projected reward territory to provide an immediate assessment of the trade's structural viability.
Heads-Up Dashboard: A customizable table anchored to the chart corner. It provides a real-time aggregate readout of all critical internal metrics, including current trend state, raw momentum values, divergence status, participation ratios, and active trade progression percentages.
● 📖 How to Use
Establish Context: Monitor the Heads-Up Dashboard to evaluate the current macro trend state and participation ratios. Wait for the dashboard to indicate alignment between directional momentum, volume participation, and trend strength.
Identify Confluence: Look for structural momentum shifts indicated by the histogram crossing its zero-line, strictly validated by the alignment of the Heat Candles. Divergence markers appearing prior to these shifts serve as early warning signs of an impending structural rotation.
Signal Confirmation: Wait for the current bar to close. The utility is engineered to execute calculations on confirmed data to ensure structural stability. A confirmed signal will instantly plot the dynamic trade management levels.
Execute and Manage: Utilize the projected Entry, Stop Loss, and Take Profit levels to structure your position. The Risk/Reward shading and the progress tracker on the dashboard will provide continuous feedback as the price action develops toward the established targets.
Alert Integration: For automated tracking, configure the built-in alert conditions which generate structured data payloads for long entries, short entries, position closures, and individual target strikes.
● ⚙️ Inputs and Settings
Core: Define the source data for momentum calculations and select the preferred baseline calculation method and lookback length. This also includes the pivot length for divergence detection.
Filters: Activate and calibrate the higher timeframe alignment constraints. Set the specific lengths and minimum thresholds for directional strength and volume participation multipliers to strictly define what constitutes a valid breakout.
Trade: Toggle the visibility of the dynamic management levels. Adjust the volatility lookback, the invalidation multiplier, and customize the exact risk-to-reward ratios for all three projected profit targets.
Vis: Control the visual clutter by toggling the histogram, zero line, divergence signals, and heat candles on or off according to personal preference.
Dash: Enable or disable the Heads-Up Dashboard and anchor it to any of the four chart corners for optimal workspace organization.
Alerts: Define custom action strings and dynamic payload identifiers to integrate seamlessly with external execution engines or tracking software.
Colors: Fully customize the aesthetic profile of the indicator. Modify the specific hex values and opacities for the histogram states, trade levels, risk shading, divergence markers, and the internal dashboard elements to match your charting theme.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundation of this utility is deeply rooted in the principles of Auction Market Theory and the Law of Effort versus Result. In any financial market, price discovery is driven by the continuous auction process between buyers and sellers. However, price alone is a one-dimensional metric. Volume represents the actual energy or "effort" expended to move that price. By systematically analyzing the relationship between price displacement and volume flow, this tool effectively maps the true liquidity absorption within the market.
When a market establishes a new structural price extreme, fundamental market mechanics dictate that this move must be supported by an equivalent expansion in volume participation. If the aggregate volume flow begins to decelerate while price continues to advance, a structural divergence is formed. This indicates a severe lack of liquidity supporting the current auction, highlighting an area where the prevailing trend is highly vulnerable to mean reversion or a complete structural failure.
Furthermore, the integration of volatility-based risk profiling adheres to established quantitative risk management principles. Market volatility is not static; it constantly expands and contracts in cyclical phases. By anchoring invalidation levels to a dynamic multiplier of average true volatility, the utility ensures that risk parameters adapt to the current market environment. This prevents premature invalidation during periods of high liquidity expansion while maintaining tight structural constraints during periods of market consolidation.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Indicator

Sessions Suite [claysul] + FVG# Sessions Suite + FVG — Warsaw Time
This indicator provides a complete intraday market framework by combining global trading sessions, key historical price levels, opening prices, liquidity references, Fair Value Gaps, and market structure.
The purpose of the indicator is not to generate automatic buy or sell signals. Its role is to show the market data and reference levels that professional traders monitor when building a trading narrative.
## Why are these levels important?
Price does not move randomly between candles. Markets frequently react around previously established highs, lows, opening prices, imbalances, and session ranges.
These areas may represent:
* resting liquidity above highs and below lows,
* locations where stop orders may be concentrated,
* important institutional reference prices,
* potential support or resistance,
* premium and discount areas,
* targets for liquidity sweeps,
* locations where displacement or market structure shifts may begin.
A level should not be treated as a trade signal by itself. Its value increases when it aligns with session timing, liquidity, market structure, displacement, and a clear risk-management plan.
## Main Features
### Global Trading Sessions
The indicator displays the most important intraday trading sessions in Warsaw time:
* Asia
* London
* New York AM
* New York PM
* optional New York Lunch session
Each session can display its range, high, low, equilibrium, background box, labels, and extended liquidity lines.
Session highs and lows are especially important because they often become liquidity targets during the following trading session.
### Previous Period Levels
The indicator includes:
* Previous Hour High and Low
* Previous Day High and Low
* Previous Day Equilibrium
* Previous Day Close
* Previous Week High and Low
* Previous Week Equilibrium
* Previous Month High and Low
These levels provide essential higher-timeframe context. They help traders understand where price is trading relative to previous ranges and where significant liquidity may still remain.
When several levels overlap, the indicator prioritizes the higher-timeframe level to reduce unnecessary chart clutter.
### Opening Prices
The indicator marks:
* Daily Open
* Weekly Open
* Monthly Open
* configurable intraday opening prices
* previous custom opening levels
Opening prices are important reference points because they help determine whether price is trading above or below a key benchmark for the current day, week, month, or trading session.
They can also help identify intraday bias, expansion away from equilibrium, and possible mean-reversion areas.
### Fair Value Gaps
Bullish and bearish Fair Value Gaps are automatically detected and displayed directly at the location where the imbalance was created.
Fair Value Gaps represent areas where price moved aggressively and left an inefficient auction behind. These zones may later act as potential retracement, rebalancing, reaction, or continuation areas.
An FVG should be evaluated together with market direction, liquidity, displacement, and structure rather than traded mechanically.
### BOS and CHOCH
The market-structure module identifies:
* Break of Structure — BOS
* Change of Character — CHOCH
BOS may indicate continuation of the current structural direction, while CHOCH may signal that market behaviour is beginning to change.
The pivot length can be adjusted to control the sensitivity of the structure detection.
### New Day and New Week Opening Gaps
The indicator can display:
* New Day Opening Gap — NDOG
* New Week Opening Gap — NWOG
* gap equilibrium levels
* mitigation status
Opening gaps may act as important price-delivery references, magnets, support or resistance zones, and potential rebalancing targets.
### 90-Minute Cycles
Each major session can be divided into configurable 90-minute cycles.
This feature helps traders study how price delivery changes throughout the session and identify periods where accumulation, manipulation, expansion, or reversal may occur.
### Mitigation Management
Session levels and opening gaps can be:
* extended until price reaches them,
* stopped at the end of the trading day,
* removed after mitigation,
* limited to a selected number of days.
This allows the chart to remain clean while preserving the most relevant untested liquidity levels.
## How to Use the Indicator
Start by identifying the higher-timeframe context using previous day, week, and month levels.
Next, observe where price is trading relative to the daily, weekly, and monthly opening prices.
During the active session, monitor:
1. which session high or low is being targeted,
2. whether liquidity has been swept,
3. whether displacement appears after the sweep,
4. whether BOS or CHOCH confirms a structural reaction,
5. whether an FVG offers a logical retracement area,
6. whether the potential trade provides acceptable risk-to-reward.
The strongest setups usually appear when several independent elements align around the same price area.
## Timezone
All sessions and custom opening times are calculated using the Europe/Warsaw timezone.
Users trading from other regions should verify that the configured session times match the instruments and market hours they follow.
## Important Notice
This indicator is a market-analysis and chart-visualisation tool. It does not predict future price movements and does not provide guaranteed trading signals.
Historical levels can be broken, liquidity can remain untouched, and Fair Value Gaps do not always produce a reaction.
Always confirm the market context independently and use appropriate position sizing, stop-loss protection, and risk management.
For educational and analytical purposes only.
Indicator
