STRAT Trap & VWAP Engine [WillyAlgoTrader]📊 STRAT Trap & VWAP Engine is an overlay toolkit that reads every candle through the lens of The STRAT methodology, detects failed-breakout "trap" candles, and turns them into fully managed trade plans — entry, structural stop, three R-multiple targets, break-even automation and webhook alerts — filtered by a volatility regime engine and accompanied by a pivot-anchored VWAP trail.
The core insight: the most information-dense candle on any chart is the one that breaks a prior extreme and then closes against its own break. The market went hunting for liquidity, found it, and failed to follow through. This indicator classifies every bar the STRAT way, catches exactly those divergence candles, and manages the resulting trade for you — while a regime filter keeps you out of chop and an anchored VWAP shows where the volume-weighted crowd is positioned inside the current trend leg.
Works on all markets (crypto, forex, stocks, indices, futures) and all timeframes.
📚 THE STRAT IN 60 SECONDS (for beginners)
The STRAT is a price-action methodology popularized by veteran floor trader Rob Smith. Its power is its simplicity: every candle on every chart is one of only three types, defined purely by its relationship to the previous candle's range:
— 1 (Inside bar) : the candle's entire range fits inside the previous candle (high <= prior high AND low >= prior low). The market is in equilibrium — nobody won.
— 2 (Directional bar) : the candle breaks ONE side of the previous candle. 2U breaks the prior high only; 2D breaks the prior low only. One side won.
— 3 (Outside bar) : the candle breaks BOTH sides (high > prior high AND low < prior low). Maximum disagreement — both sides were swept.
Sequences of these numbers form repeatable patterns. A 2D-2U is a reversal (sellers pushed down, buyers answered). A 2-1-2 is a pause-and-go. A 3-1-2 is compression after chaos resolving into direction. Because the classification is purely mechanical, there is zero subjectivity — two traders looking at the same chart will always count the same sequence.
The second pillar of The STRAT is Full Timeframe Continuity (FTC) : checking whether the higher timeframes (hourly, daily, weekly, monthly) are all trading in the same direction as your entry. When the 15-minute, hourly and daily candles are all green, a long is swimming with the current, not against it.
This indicator automates all of it — and then adds the twist that gives it its name.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A STRAT pattern tells you a structure formed — but not whether the breakout that follows is genuine. A trap detector spots failed breakouts — but without structural context it fires in the middle of chop. A regime filter knows trend from range — but generates no entries by itself. A VWAP shows positioning — but a session VWAP resets at midnight regardless of what the trend is doing. None of these alone produces a complete, managed trade.
Bar classification → pattern matrix → trigger FSM → trap detection → regime + volume + FTC filters → trade engine (SL/TP1-3/BE) → anchored VWAP context
The classifier turns raw candles into STRAT numbers. The pattern matrix scans the sequence for tradeable combinations and arms a setup with exact trigger and stop levels. The trigger FSM waits for a confirmed break — or the Trap engine fires instead when a candle breaks an extreme and closes against it. Every prospective entry then passes through three independent gates (PVTE regime, volume confirmation, FTC alignment) before the trade engine takes over: structural stop, three R-multiple targets, automatic break-even, and a webhook alert at every stage. The anchored VWAP restarts at each confirmed structural pivot inside the regime, showing the volume-weighted average of the current leg — the reference institutional participants care about.
Remove any link and the chain breaks: patterns without triggers are just decoration; traps without a regime filter fade every wiggle; a trade engine without structural stops places arbitrary lines; a VWAP without pivot anchoring measures the wrong leg.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Mechanical STRAT classifier with a data-driven pattern matrix.
Every bar is classified exhaustively:
— Inside (1): high <= high and low >= low
— Outside (3): high > high and low < low
— 2U: high > high and low >= low
— 2D: low < low and high <= high
Patterns are not hardcoded if-chains — they live in a priority-ordered matrix scanned longest-first, so a 2-2-2 continuation (Extended mode) outranks the 2-2 it contains, and overlapping patterns resolve deterministically. Core set: 2-2 Rev/Cont, 3-2, 3-2-2, 2-1-2 Rev/Cont, 3-1-2, 1-2-2 RevStrat. Extended (opt-in): 2-2-2, 2-2-2-2 "Randy Jackson", 1-bar 3 RevStrat (outside bar closing beyond the prior bar's range).
2️⃣ Three-stage trigger FSM: SETUP → PENDING → TRIGGERED.
When a pattern completes on a confirmed close, the engine arms: trigger = the final pattern bar's high (bull) or low (bear), stop = the opposite side. A wick break of the trigger level on a later confirmed bar fires TRIGGERED. An adverse CLOSE beyond the stop side invalidates. No break within Setup Expiry bars (default 3) expires the setup. On an outside bar that pierces both sides, the adverse close wins — the conservative read, because the intrabar touch order is unknowable.
3️⃣ Trap Bar entry engine — the headline feature (default mode).
A trap bar is a candle whose body color contradicts its STRAT direction:
— Red 2U : broke the prior high, closed below its open → buyers were trapped above the break → SHORT
— Green 2D : swept the prior low, closed above its open → sellers were trapped below → LONG
Entry = trap bar close; stop = beyond the sweep extreme (the trap bar's own high/low) + 0.25×ATR buffer, with a 0.5×ATR minimum distance always enforced. Dojis (close == open) never qualify. Three Entry Modes: Trap Bar (default), STRAT Trigger (classic breakout entries), Both — where a trap candle on a trigger bar overrides the trigger's direction, because the failed breakout IS the trade.
4️⃣ Structural stop anchoring, four modes.
For trigger entries the SL Anchor input chooses: Trigger Level (default — just beyond the broken high/low; price trading back through the broken level means the breakout failed), Setup Bar (opposite side of the setup bar — wider, fully structural), Wick-Anchored (beyond the entry bar's own wick), or ATR (close ± SL Multiplier × ATR). All structural modes use:
stop_long = min(anchor − 0.25×ATR, close − 0.5×ATR)
which simultaneously applies the buffer and guarantees the minimum distance. A Max Risk cap (default 3×ATR, 0 = off) skips entries whose structural risk is too wide — outside-bar setups are the usual offenders.
5️⃣ Full trade management with honest intrabar accounting.
TP1/TP2/TP3 are R-multiples of the actual entry→stop distance (Risk Presets: Conservative 1R/2R/4R with 2.5×ATR stop, Balanced 1R/2R/3R, Aggressive, Scalping, or Custom). After TP1 is touched the stop moves to entry ( break-even ) — and a BE moved on a bar cannot stop that same bar out (the SL check uses the bar-start stop). When SL and a first TP1/TP3 touch land on the same bar, the TP registers and blocks the SL — an optimistic intrabar model, disclosed openly : the true touch order inside one bar is unknowable without tick data. A trade closes only at TP3, SL, or a BE stop-out. Win = TP1 was touched.
6️⃣ PVTE Regime Filter — two-threshold hysteresis, ON by default.
A 3-state regime engine (BULL / BEAR / NEUTRAL) built on a selectable basis kernel (EMA default, DEMA, HMA, KAMA; length 21) and ATR bands (length 100):
outer band = basis ± ATR × 3.0
inner band = basis ± ATR × (3.0 − 1)
Regime is entered on a confirmed close through an outer band and exits to NEUTRAL only on a close through the OPPOSITE inner band — the two-threshold gap kills flip-flopping in chop. Longs pass only in BULL, shorts only in BEAR; NEUTRAL blocks both by default (Allow mode available). Every entry — trap or trigger — must pass this gate, which converts the naturally counter-trend trap fade into a trend-continuation tool: only sweeps AGAINST the regime get faded, in the regime's direction.
7️⃣ Pivot-anchored VWAP trail.
Inside an active regime, the VWAP anchors at each confirmed structural pivot (Pivot Length 13 bars each side) in the regime direction, backfills from the pivot bar in one pass, then accumulates incrementally:
aVWAP = Σ(price × volume) / Σ(volume), from the anchor bar
It re-anchors on every new in-regime pivot and hard-resets on regime change — so the dotted trail always represents the current leg's volume-weighted average, not a stale session artifact. Pivot confirmation is honest lag: the swing is only KNOWN Pivot Length bars after it forms; the trail is drawn from the confirmed pivot forward. Delayed confirmation, not repainting.
8️⃣ FTC strip and FTC Alignment filter.
A top-center strip shows every timeframe above your chart (15m → Quarter): green/red for the current higher-TF candle direction, with ·I / ·O flags when that candle is inside/outside its predecessor. The optional Min FTC Aligned filter (default 0 = off) requires N visible higher timeframes to agree with your entry direction. Honesty note, stated in the tooltip as well: continuity is a live-state concept, so the strip and this filter read the FORMING higher-TF candles — the only reload-unstable element in the indicator; everything else is confirmed-close based.
9️⃣ Volume confirmation gate.
Optional filter requiring entry-bar volume > SMA20 × threshold (default 1.2), automatically bypassed on instruments without volume data. Applies to both entry sources.
🔟 Bot-grade alert architecture.
Every event emits a structured JSON webhook (or human-readable text): setup_bull/bear, trigger_bull/bear, trap_long/short, be, tp1_hit, tp2_hit, tp3_close, sl_hit. Entry payloads carry pattern, price, entry, sl, tp1-3, the PVTE regime (−1/0/1) and a compact FTC string like "1H+4H+D-W+". Closure payloads carry the result (win/loss) and a be_stop flag — built from pre-reset snapshots so same-bar event collisions can never produce NaN fields. Alerts follow a fixed intrabar chronology (management → closures → entries → setups) and five category toggles let a bot mute any stream it doesn't act on. Nine static alertcondition entries cover the TV alert dialog.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Classify: On every bar the STRAT type (1 / 2U / 2D / 3) is computed and, on confirmed close, appended to the sequence.
Step 2 — Match: The pattern matrix scans the sequence newest-first, longest patterns first; the first match arms a setup with trigger/stop at the final pattern bar's extremes.
Step 3 — Resolve: A pending setup is checked each confirmed bar: adverse close → invalidated; wick break of the trigger → TRIGGERED; expiry (default 3 bars) → expired. Setup lines freeze and dim on any resolution.
Step 4 — Detect traps: Independently, every confirmed bar is tested for the trap condition (2U closing red / 2D closing green).
Step 5 — Filter: The prospective entry (trap first in Both mode) must pass PVTE regime, volume and FTC gates, then the Max Risk cap.
Step 6 — Open & manage: Entry at close; SL/TP1-3 computed; each later confirmed bar checks TP touches (TP priority), moves BE after TP1, and closes on TP3/SL/BE stop-out. Lines project forward, extend while active, persist after close as a record, and recolor teal on TP hits.
Step 7 — Track context: The PVTE regime FSM updates on closes; the anchored VWAP accumulates, re-anchors on new pivots, resets on regime change.
Step 8 — Report: Dashboard sections refresh (sequence, setup state, trade, session stats), and the alert engine emits events in fixed chronological order.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to a clean chart. Defaults are ready to observe: Trap Bar entries, PVTE filter ON, regime bands and anchored VWAP visible.
2. Watch the numbers under the candles: 1 = pause, 2 = direction, 3 = sweep of both sides. This alone teaches you The STRAT faster than any book.
3. Wait for a LONG · Trap 2D or SHORT · Trap 2U label — the indicator found a failed break aligned with the regime and opened a managed plan.
4. Follow the plan on the chart: dotted entry line, solid red stop, dashed green targets. Watch TP1 turn teal and the entry label switch to "→ SL (BE)".
5. Once comfortable, create ONE PulseWire alert with condition "Any alert() function call" and paste your webhook URL — every event now reaches your phone or bot in JSON.
👁️ Reading the chart:
— Numbers 1/2/3 under bars = STRAT types (amber, green/red, magenta)
— 🟢 LONG · / 🔴 SHORT · labels = trade entries with the source pattern; the tooltip shows entry, SL, TP1-3 and risk
— ▲ / ▼ labels = STRAT triggers that did NOT open a trade (engine busy or filtered) — still valid signals for manual traders
— Solid/dotted horizontal pairs after a pattern = pending trigger (colored) and stop (muted); they dim if invalidated or expired
— Small triangles = hammer (below) / shooter (above), wick-dominant candles by the Actionable Wick fraction (default 0.75)
— Colored bands = PVTE regime envelope; dotted trail = anchored VWAP of the current leg
— Dashed horizontal levels = previous Day/Week/Month high/low with price tags (lookahead-safe)
— Top-center strip = Full Timeframe Continuity at a glance
📊 Dashboard fields:
— Seq: the last four confirmed STRAT types, oldest left
— Setup: pending pattern, direction and bars-waited/expiry — or "idle"
— Levels: the pending trigger (T) and stop (S) prices
— Candle: Hammer / Shooter / Inside on the current bar (informational)
— PVTE: current regime — BULL / BEAR / NEUTRAL / Off
— Trade section: entry, stop (with "BE @" after break-even), TP1-3 with ✓ marks, R:R at TP1, stop distance in %
— Stats section: trades, wins, losses, win rate with gauge, and the ▰▱ form strip of the last 10 — for the selected period (24H / 30D / All-Time)
🔧 Tuning guide:
— Too few trades: switch In NEUTRAL Regime to Allow, or set Entry Mode to Both, or raise Max Risk
— Too many shallow trades in chop: keep NEUTRAL = Block, raise the PVTE ATR Multiplier (wider regime bands), or add Min FTC Aligned = 2
— Stops feel too tight: change SL Anchor to Setup Bar (structural, wider) — targets scale with the wider risk automatically
— Stopped out by noise at breakeven: that is the cost of the BE rule; disable Break-Even After TP1 if you prefer to let trades breathe
— Chart too busy: Setup Labels, Trigger Labels and bar coloring are already off by default; Regime Bands and the VWAP trail have their own toggles
— Learning mode: turn Setup Labels and Trigger Labels ON and Trade Engine OFF — the chart becomes a pure STRAT trainer
⚙️ KEY SETTINGS
🎨 Appearance: Theme (Auto/Dark/Light — the palette adapts, signals stay readable on white and black), watermark, bar coloring (off), bar numbers (on), Signal Label Size.
📐 Pattern Engine: Extended Patterns (off), Setup Labels (off), Max Pattern Drawings (60, FIFO).
🎯 Trigger Engine: Setup Expiry (3 bars), Trigger/Stop Lines (on), Trigger Labels (off).
🛡️ Risk Management: Trade Engine (on), Entry Mode (Trap Bar), Risk Preset (Balanced), SL Anchor (Trigger Level), SL Buffer (0.25×ATR), ATR Length (14), TP1/2/3 multipliers (Custom preset), Max Risk (3×ATR), Break-Even After TP1 (on), line styles, label toggles, % distance on labels.
🔍 Filters: Volume Confirmation (off, ×1.2 SMA20), Min FTC Aligned (0 = off).
🌊 PVTE Regime Filter: filter toggle (on), Basis Kernel (EMA), Basis Length (21), ATR Length (100), ATR Multiplier (3.0), NEUTRAL behavior (Block), Regime Bands (on), Anchored VWAP (on), VWAP Pivot Length (13), VWAP Source (Close).
🕯️ Actionable Candles: hammer/shooter marks (on), Min Wick Fraction (0.75).
📊 Dashboard: position, size (Small-Huge), Market/Trade/Stats section toggles, Win Rate Period.
🔔 Alerts: master Enable, JSON/Text format, five category toggles (Entries, TP/BE, SL, Filtered Triggers, Setups).
🔔 ALERTS
— 🟢 trigger_bull / trap_long — entry with pattern, price, entry, sl, tp1-3, regime, ftc
— 🔴 trigger_bear / trap_short — mirrored short payload
— 🎯 tp1_hit / tp2_hit — target touches with level and entry
— 🛡️ be — stop moved to break-even
— 🏆 tp3_close — final target, result "win"
— 🛑 sl_hit — stop-out with be_stop flag and win/loss result
— 📐 setup_bull / setup_bear — a pattern armed with its trigger/stop levels
— Plain trigger alerts for signals that did not open a trade (filters/engine busy)
All fire on confirmed bar close. One alert covers everything: condition "Any alert() function call". Nine static alertcondition entries are also available in the TV dialog.
⚠️ IMPORTANT NOTES
— 🚫 No repainting of signals. Classification is fixed on bar close; all setups, triggers, traps, entries and closures are evaluated on barstate.isconfirmed only; pivots for the VWAP anchor use equal left/right lookback (delayed confirmation, drawn forward from the confirmed bar). One disclosed exception by design: the FTC strip and the optional FTC Alignment filter read the FORMING higher-timeframe candles, because timeframe continuity is a live-state concept — an entry allowed live can look filtered after a reload. That filter is OFF by default.
— 📐 Optimistic intrabar model. When SL and a first TP touch share one bar, the TP is credited (TP priority). Session statistics use this model and the "win = TP1 touched" definition; they reset on chart reload and are NOT a backtest — no commissions, slippage or position sizing.
— ⚖️ Trap entries are regime-gated fades. With the PVTE filter off, the trap engine will fade every divergence candle, including mid-range noise. The default configuration (NEUTRAL = Block) is intentional.
— 🛠️ This is an analysis tool, not an automated bot. It provides classification, signals, trade plans and alerts — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Instruments without volume data: the VWAP falls back to the price source and the volume filter bypasses automatically.
— 📚 The STRAT is a public price-action methodology popularized by Rob Smith. This is an original clean-room implementation: no third-party code is reused, and the pattern engine, trap logic, trade management and regime integration are built from scratch as described above. Indicator

Khabib Takedown Fractal Nest Breakdown ViprasolKhabib Takedown — Fractal Nest Breakdown 🤼
CONCEPT
This tool looks for SELF-SIMILARITY in a decline: a big bearish leg (lower high -> lower low)
with a smaller bearish leg nested inside it that is a scaled copy — same shape, a fraction of
the size. When the small "fractal" completes in the direction of the big one (a break of the
last low), the structure grounds price -> SHORT. It is a fractal-echo measurement, not a plain
lower-low. The nesting ratio between the small leg and the big leg is the core filter.
HOW IT DETECTS
- Swings are found with confirmed pivot highs/lows (left/right bar lookback) and chained into a
lightweight zigzag.
- The tool reads the last four alternating swings (high, low, high, low).
- Big leg = first high minus first low; small leg = second high minus second low.
- A valid nest requires: lower high and lower low (bearish structure); big leg >= (Min big x ATR);
small leg positive; and the nesting ratio (small/big) inside the band .
- The signal fires when price closes below the most recent swing low and the bar closes red.
- ATR (Wilder) scales the minimum big-leg size across instruments and timeframes.
ENTRY / STOP / TARGET
- Entry: SHORT on the close of the confirming (red) bar that breaks the last low.
- Stop: above the second (inner) swing high plus an ATR buffer (default 0.3 x ATR).
- Target: entry minus R multiple x risk (default 2R, where risk = stop distance).
- The script draws the big leg and the nested small leg, plus filled TP and SL zones that extend
to the right until price touches one of them.
NON-REPAINTING
Pivots are only used once fully confirmed (they require the right-side bars), and the signal is
evaluated on bar close (barstate.isconfirmed). Drawings are created on the confirmed bar. The tool
does not repaint completed signals. Live, the forming bar can still change until it closes, as with
any bar-close tool.
FEATURES
- Fractal nesting (scaled self-similar legs), not a plain lower-low break.
- ATR-scaled minimum big-leg requirement and adjustable nesting-ratio band.
- Automatic R-multiple TP and ATR-buffered SL, drawn as zones that extend until hit.
- One-trade-at-a-time option and a minimum-bars-between-signals gap to reduce clustering.
- On-chart status table (open trades) and an alertcondition for automation.
INPUTS OVERVIEW
- Swing pivot left/right bars: swing sensitivity.
- Nesting ratio band (ratLo/ratHi): how close in scale the small leg must be to the big leg.
- Min big leg (x ATR) and ATR length: minimum move and volatility scaling.
- TP R multiple, SL buffer (x ATR), min bars between signals, one-trade-at-a-time.
- Visual colors, label offset, and zone transparency.
HOW TO USE
1. Add to any liquid symbol and timeframe; start with defaults.
2. Tighten the nesting-ratio band for stricter self-similarity, or widen it for more signals.
3. Raise Min big leg (x ATR) to demand larger, cleaner declines before a nest counts.
4. Use the drawn TP/SL zones for context; set an alert on the signal for hands-off monitoring.
5. Combine with your own trend/context read before acting.
LIMITATIONS
- This is a pattern/education tool, not a signal service, and not financial advice.
- Breakdown patterns fail; nesting geometry is a filter, not a guarantee. Losing signals will occur.
- Pivot confirmation adds inherent lag (it needs bars to the right of a swing to confirm).
- Very choppy or illiquid markets can produce misshapen legs and weak signals.
- Requires user discretion, risk management, and position sizing. No performance is implied.
CREDITS
The name is an inspirational sports homage only; it does not imply any endorsement or affiliation.
ATR uses Wilder's average true range. Pivot/zigzag swing detection uses standard public techniques.
The fractal-nest (scaled self-similar leg) geometry, the detection assembly, and the trade/zone
visualization are original Viprasol work.
Original Viprasol work; no third-party Pine code reused.
Indicator

Reactive Trail System [WillyAlgoTrader]📊 Reactive Trail System (RTS) is an overlay trend-following indicator that combines a momentum-adaptive trailing stop, a dual volatility engine, a 0–100 signal quality score, and a complete trade-management layer (Entry / SL / TP1–TP3 / break-even) — all tracked live on a sectioned dashboard with win-rate statistics.
The core insight: a trailing stop should not have a fixed width. When momentum is strong, price moves cleanly and the trail can hug price to lock in profit. When momentum fades, price gets noisy and the trail must widen to survive the chop. RTS measures momentum every bar and reshapes the trail width automatically — up to 40% tighter in strong moves — so one setting adapts to changing conditions instead of being permanently too tight or too loose.
If you are new to trailing stops: think of the trail as a colored line that follows price from below in an uptrend (green) and from above in a downtrend (red). As long as price stays on the right side of the line, the trend is alive. When price closes through the line, the trend flips — and RTS turns that flip into a fully managed trade idea with a stop-loss and three targets drawn on the chart for you.
Works on all markets (crypto, forex, stocks, indices, commodities) and all timeframes.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A classic supertrend-style trail has three chronic problems. First, its width is fixed — the same multiplier that protects you in chop gives back too much profit in a strong trend. Second, a raw trail flip says nothing about signal quality — a flip in dead, low-volume conditions looks identical to a flip with real participation. Third, a flip is not a trade — you still have to decide where the stop goes, where the targets go, and when to move to break-even.
RTS solves all three with one integrated pipeline:
Baseline MA (6 engines) → Dual volatility measure (ATR + StDev) → RSI momentum engine → Adaptive trail width → Ratcheting trail state machine → HTF bias + volume filters → 0–100 signal score → Wick-anchored SL + TP1/TP2/TP3 → Break-even automation → Trade outcome statistics
The baseline MA defines the anchor the trail hangs from. The volatility engine defines the raw distance. The RSI momentum engine then compresses that distance when momentum is strong — this is what makes the trail "reactive" rather than static. The ratcheting state machine guarantees the trail only ever tightens in the trade's favor (it never backs away from price). The HTF and volume filters decide whether a flip is allowed to become a trade. The scoring engine grades every entry so you can tell an A-setup from a C-setup at a glance. The risk engine converts the signal into concrete levels anchored to real market structure (the signal bar's wick), and the trade engine tracks every touch, break-even move, stop-out and reversal — feeding honest statistics back to the dashboard.
Remove any link and the chain breaks: without momentum adaptation the trail is just another supertrend; without filters every flip fires; without the wick-anchored stop the levels ignore structure; without outcome tracking you never learn how the system actually behaves on your market.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Momentum-adaptive trail width — the trail breathes with the market.
Instead of a fixed multiplier, RTS computes a momentum distance from the smoothed RSI and uses it to compress the trail:
— momDist = min(|RSI_smoothed − 50| / 50, 1.0) — 0 means dead-center momentum, 1 means extreme
— effectiveMultiplier = TrailMultiplier × (1 − Adaptivity × momDist × 0.4)
— trailOffset = volatility × effectiveMultiplier
With default Trail Multiplier 2.0 and Adaptivity 1.0, the trail runs at full width in neutral conditions and tightens by up to 40% when RSI pushes toward extremes. Set Adaptivity to 0 and you get a classic fixed-width trail; the default 1.0 gives maximum adaptation. RSI length 13 with EMA smoothing 3 keeps the width changes calm instead of jittery.
Why this matters: strong momentum = clean price movement = you can afford a tight trail that protects open profit. Weak momentum = noise = the trail widens automatically so you don't get shaken out.
2️⃣ Dual volatility engine — ATR, StDev, or a stabilized Hybrid.
Trail distance can be measured three ways (Volatility Length default 13):
— ATR: classic bar-range volatility
— StDev: close-to-close dispersion
— Hybrid (default): (ATR + StDev) / 2
ATR reacts to wicks and gaps; StDev reacts to closing dispersion. Averaging them dampens the weakness of each — a single wild wick inflates ATR but barely moves StDev, so the Hybrid stays stable where a pure-ATR trail would suddenly balloon.
3️⃣ Six baseline engines including KAMA and T3 — with a volume-safety fallback.
The trail anchors to a baseline MA selectable from HMA, ALMA (default, length 21), KAMA, T3, VWMA and EMA. KAMA and T3 are computed from their full formulas internally (Kaufman efficiency-ratio smoothing constant sc = (ER × (fast − slow) + slow)², and Tillson's six-stage EMA cascade with a = 0.7). If you pick VWMA on an instrument whose data feed reports no volume (common on some forex feeds), RTS silently falls back to EMA instead of plotting garbage.
4️⃣ Ratcheting trail state machine — the stop never retreats.
In a bull regime the trail is trail = max(previous trail, baseline − offset): it can only rise. In a bear regime it can only fall. A flip requires a full bar close beyond the trail — intrabar wicks through the line do not flip the trend. This one-way ratchet is what makes the line usable as an actual trailing stop rather than a wavy band.
5️⃣ Non-repainting HTF bias filter.
Optional filter: longs only when the higher timeframe (default 240 = 4H) closes above its 50 EMA, shorts only below. The HTF request uses the last closed HTF bar (index with lookahead), so the bias never changes retroactively — what you see in a live chart is what a backtest would have seen.
6️⃣ Signal quality score 0–100 — every entry is graded, not just fired.
Each entry gets a transparent confluence score:
— Momentum component (0–40): min(momDist / 0.6, 1) × 40
— Volume component (0–30): participation vs the 20-bar volume SMA, clamped; fixed 15 when the feed has no volume
— HTF alignment (10 or 30): 30 when the higher timeframe agrees with the trade direction, 10 when it doesn't
The score is shown in the BUY/SELL label tooltip, in the dashboard "Last signal" row, and in every entry alert. A 90-score long (strong momentum, heavy volume, HTF agrees) and a 45-score long are both valid flips — but you instantly know which one deserves full size.
7️⃣ Wick-anchored stop-loss — structure-aware risk, not a blind ATR offset.
Default SL mode anchors the stop to the signal bar's actual wick:
— Long SL = min(low − 0.25 × ATR, close − 0.5 × ATR)
— Short SL = max(high + 0.25 × ATR, close + 0.5 × ATR)
The 0.25 × ATR buffer sits the stop just beyond the wick (where stop-hunts reach), and the 0.5 × ATR minimum distance prevents absurdly tight stops on small-bodied signal bars. A classic fixed ATR mode (SL = entry ± multiplier × ATR, ATR length 14) is available too. Targets are pure R-multiples of the actual risk: TP = entry ± risk × multiplier.
Four one-click risk presets: Conservative (SL 2.5×ATR, TP 1R/2R/4R), Balanced (default: 1.5×ATR, 1R/2R/3R), Aggressive (1.0×ATR, 1.5R/2.5R/4R), Scalping (0.8×ATR, 0.8R/1.5R/2R), plus a fully manual Custom preset with input validation (TP1 < TP2 < TP3 enforced).
8️⃣ Full trade lifecycle engine with honest intrabar rules.
RTS doesn't just draw levels — it tracks the trade like a journal:
— Hits are checked only on confirmed bars, and never on the entry bar itself (entry-bar guard)
— TP-priority model: if a bar touches both a TP and the SL, the TP touch registers first (this optimistic assumption is disclosed right in the dashboard tooltip)
— Break-even automation: once TP1 is touched, the stop moves to entry; a BE moved this bar cannot stop you out on the same bar
— Opposite confirmed signal reverses the position (closes the old trade, opens the new one)
— Win definition is fixed and transparent: a trade counts as a WIN once TP1 has been touched (TP3 close, BE stop-out after TP1, or reversal after TP1); closed before TP1 = loss
9️⃣ Persistent trade visualization.
Entry (subtle dotted), SL (solid, prominent) and TP1/TP2/TP3 (dashed) lines extend with the live trade. When a TP is touched, its line turns solid teal with a ✓ on the label. When break-even activates, the original SL line dims to a record and the entry label is annotated "→ SL (BE)". After the trade closes, the drawing persists as a record until the next entry replaces it — you can scroll back and see exactly how each trade resolved.
🔟 Dashboard 2.0 with period-filtered statistics.
A sectioned panel (Market / Trade / Stats — each toggleable, position and font size configurable):
— Market: trend direction, trend age in bars, HTF bias, smoothed RSI, last signal with score and bars-ago
— Trade: entry, SL (with "BE @" marker), TP1–TP3 with ✓ checkmarks, R:R at TP1, SL distance in % — collapses to one row when flat
— Stats: closed trades, wins, losses, win rate with a ▰▱ gauge, and a "Form" strip of the last 10 results
The win-rate window is selectable: last 24 Hours, last 30 Days, or All-Time — computed from timestamped trade closures kept in a rolling 31-day buffer. Statistics reset on chart reload, and this is disclosed directly in the dashboard tooltips.
📖 HOW IT WORKS — CALCULATION FLOW
Step 1 — Baseline: the selected MA engine (ALMA 21 by default) is computed as the trail anchor.
Step 2 — Volatility: ATR and StDev over 13 bars are combined per the selected engine into one volatility measure.
Step 3 — Momentum: RSI(13) is EMA-smoothed(3); its distance from 50 (normalized 0–1) compresses the trail multiplier by up to 40%.
Step 4 — Trail update: the ratcheting state machine raises the trail in bull regimes / lowers it in bear regimes; a confirmed close through the trail flips the regime.
Step 5 — Filtering: the flip becomes an entry signal only if it passes the optional HTF bias and volume-confirmation filters, on a confirmed bar, after the warm-up period.
Step 6 — Scoring: the entry is graded 0–100 from momentum, volume participation and HTF alignment.
Step 7 — Risk placement: SL is anchored to the signal bar's wick (or fixed ATR), TP1–TP3 are projected as R-multiples of the actual risk per the active preset.
Step 8 — Trade tracking: every confirmed bar is checked for TP touches, break-even activation, stop-out or reversal; outcomes update the win/loss statistics and the Form strip.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to your chart. Defaults (ALMA 21, Hybrid volatility, Balanced preset) are ready to use.
2. Wait for a ▲ BUY or ▼ SELL label — hover it to see the score, RSI, SL and TP1.
3. Check the dashboard: score of the last signal, HTF bias, and current R:R.
4. Prefer high-score signals (70+) where the HTF bias agrees with the trade direction.
5. Manage by the drawn levels: partial at TP1 (stop moves to break-even automatically), remainder toward TP2/TP3 or until the trail flips.
👁️ Reading the chart:
— 🟢 Green trail line below price = bull regime; it can only rise
— 🔴 Red trail line above price = bear regime; it can only fall
— ▲ BUY / ▼ SELL labels = filtered, confirmed entries (tooltip shows score and levels)
— Dotted line = entry reference · solid red = stop-loss · dashed green = TP1/TP2/TP3
— Teal solid TP line with ✓ = target reached · dimmed SL + "→ SL (BE)" = stop moved to entry
— Optional: soft trend fill between trail and baseline, and regime-colored candles
📊 Dashboard fields:
— Trend / Age: current regime and bars since the last flip
— HTF Bias: higher-timeframe direction (Off when the filter is disabled)
— RSI: the smoothed momentum value driving trail width
— Last signal: direction · score (bars ago)
— Entry / SL / TP1–TP3 / R:R / SL Dist: full live trade card
— Trades / Wins / Losses / Win rate: statistics for the selected period (24H / 30D / All-Time)
— Form: last 10 results, ▰ = win, ▱ = loss, newest on the right
🔧 Tuning guide:
— Too many flips / whipsaws: raise Trail Multiplier toward 2.5–3.0, raise Baseline Length toward 34–55, or enable the HTF Bias Filter
— Exits feel too late: lower Trail Multiplier toward 1.8, or keep Adaptivity at 1.0 so strong momentum tightens the trail
— Trail width feels jumpy: lower Momentum Adaptivity to 0.4–0.6 or raise Momentum Smoothing to 5–8
— Too few signals: disable the volume filter, or shorten Baseline Length toward 13–21
— Stops too tight on your market: switch the preset to Conservative, or use ATR mode with a higher SL multiplier
— Scalping lower timeframes: Scalping preset + Volatility Length 10 + consider HMA baseline
⚙️ KEY SETTINGS
⚙️ Main:
— Baseline MA Type (default ALMA): trail anchor engine — HMA / ALMA / KAMA / T3 / VWMA / EMA
— Baseline Length (default 21): higher = smoother, fewer flips
— Momentum (RSI) Length (default 13) and Smoothing (default 3): the adaptive-width driver
— Volatility Engine (default Hybrid) and Length (default 13)
— Trail Multiplier (default 2.0): base trail distance in volatility units
— Momentum Adaptivity (default 1.0): 0 = fixed width, 1 = up to 40% tightening
🔍 Filters:
— HTF Bias Filter (default off) + Higher Timeframe (default 240): trade only with the bigger trend
— Volume Confirmation (default off) + Threshold (default 1.2 × SMA20): require real participation; auto-bypassed on no-volume feeds
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom
— SL Mode (default Wick-Anchored): structure-based stop or fixed ATR
— ATR Length (default 14), SL / TP1 / TP2 / TP3 multipliers (Custom preset)
— Break-Even After TP1 (default on)
— SL/TP lines, labels, % distance and per-line styles are all configurable
🎨 Visual:
— Theme Auto / Dark / Light (auto-detects chart background), trail / baseline / fill / labels / candle-coloring toggles, font sizes, bull & bear colors
📊 Dashboard:
— Show/hide the panel and each section, position (4 corners), font size, Win Rate Period (24 Hours / 30 Days / All-Time)
🔔 ALERTS
— 🟢 LONG / 🔴 SHORT — entry with price, SL, TP1–TP3, R:R and score; plain text or JSON webhook payload for bot integration
— 🎯 TP1 HIT / 🎯🎯 TP2 HIT — target touches
— 🏆 TP3 HIT — final target, trade closed
— 🛑 SL HIT / 🛡️ BE STOP-OUT — stop-outs with entry and stop price
— 🛡️ BREAK-EVEN — stop moved to entry after TP1
— 🔄 REVERSAL — opposite signal closed the trade and opened the other direction
— ▲ / ▼ FLIP (optional, informational) — trail flipped but the entry was blocked by filters
All alerts fire once per confirmed bar close. Set up a single alert with "Any alert() function call" and toggle the categories you want in the settings.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Signals require barstate.isconfirmed; a flip needs a full bar close through the trail; the HTF filter reads only the last closed higher-timeframe bar; all alerts use bar-close frequency. What you see on historical bars is what the live chart produced.
— 📐 Intrabar assumption disclosed. When a single bar touches both a TP and the SL, the TP registers first (optimistic model). This is stated in the dashboard tooltip so the statistics are interpreted correctly.
— 📐 Statistics are session-based. Win/loss counts and the Form strip are computed from the loaded chart history and reset on chart reload. Past performance does not guarantee future results.
— ⚖️ Scope. RTS is a trend-following system — like any trail-based approach it performs best in trending conditions and will flip more often in tight ranges. Use the HTF and volume filters and the score to skip low-quality environments.
— 🛠️ This is an analysis tool, not an automated trading bot. It identifies trend regimes, grades entries, and draws structured risk levels — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Instruments without volume data are handled automatically (VWMA falls back to EMA, the volume filter bypasses, scoring uses a neutral volume component).
The indicator is completely free. Indicator

Liquidity Trail Matrix [WillyAlgoTrader]📊 Liquidity Trail Matrix (LTM) is an overlay trend-following system that combines a four-band proportional ATR trailing stack, a 5-factor retest quality score (0–100), a non-repainting higher-timeframe bias filter, a range-distributed volume profile of the current trend segment (POC / Value Area / HVN / LVN), and a full trade engine with wick-anchored stops, three R-multiple targets, break-even automation and honest session statistics — all in one indicator.
The core insight: a single trailing stop line gives you a binary answer — "in trend" or "flipped". But price interacts with the liquidity zone around the trail in layers: shallow pullbacks, deep sweeps, and full reversals all look different. LTM replaces the single line with a graded four-band matrix, scores every pullback-and-reclaim by depth, candle quality, volume, higher-timeframe alignment and trend maturity, and overlays where volume actually accumulated during the current trend leg — so you can see whether a retest is landing on real acceptance (HVN / POC) or falling into a volume vacuum (LVN).
Works on all markets (crypto, forex, stocks, indices, commodities) and all timeframes. On zero-volume symbols the profile automatically switches to a range-weighted proxy.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A trailing stop alone tells you the trend direction but nothing about entry quality — every touch of the line looks the same. A volume profile alone shows you where volume traded but has no concept of trend regime or entry timing. A retest signal alone fires on any bounce, whether it happens in a mature trend with higher-timeframe support or in the dying bars of an exhausted move. Used separately, these tools leave you guessing.
LTM chains them into one pipeline:
ATR band stack → trend flip detection → pullback depth measurement → 5-factor quality scoring → HTF bias confirmation → trade engine (entry / SL / TP / BE) → segment volume profile context → session outcome tracking
The band stack defines the trend and, critically, grades how deep each pullback penetrates (Band 1 = shallow, Band 4 = extreme). That depth becomes the largest single component of the retest score. The score is then adjusted by the reclaim candle's close location, relative volume, trend age, and the higher-timeframe EMA-50 bias — five independent dimensions that a plain trailing stop cannot see. Every confirmed signal is handed to the trade engine, which places a structure-aware stop, three risk-multiple targets and manages break-even. Meanwhile the volume profile is rebuilt from the exact flip bar of the current trend, so POC, Value Area and LVN levels always describe this leg — telling you whether your entry sits on volume acceptance or in a vacuum. Finally, every closed trade feeds the on-chart statistics, so the dashboard shows how this exact configuration has behaved on this exact chart.
Remove any link and the chain breaks: without band depth there is no meaningful score; without the score every bounce is a signal; without the segment-anchored profile the volume context is stale; without the trade engine the signals have no defined risk; without stats you never learn whether the settings fit the instrument.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Proportional four-band trail geometry — spacing that scales with width.
Most multi-line trails use fixed offsets (base, base+1, base+2 ATR). LTM computes every band as a proportion of the base multiplier:
Band K distance = base × (1 + K_offset × step), giving four multipliers:
— m1 = base
— m2 = base × (1 + step)
— m3 = base × (1 + 2 × step)
— m4 = base × (1 + 3 × step)
With the default Balanced preset (base 4.0, step 0.25) that yields 4.0 / 5.0 / 6.0 / 7.0 ATR. Because spacing is proportional, the geometry of the stack stays visually and behaviorally consistent whether you run tight Scalping bands (2.5 × ATR, step 0.20) or wide Deep Trend bands (6.0 × ATR, step 0.30). Each band ratchets independently (max-lock in uptrends, min-lock in downtrends) and never loosens.
Why this matters: fixed +1/+2/+3 offsets make the stack proportionally "fat" at small base values and "thin" at large ones — proportional spacing keeps pullback depth grading meaningful at any width.
2️⃣ Selectable flip depth — you choose which band defines a reversal.
The trend flips only when price closes beyond a user-chosen band from the previous bar: Fast (Band 2), Balanced (Band 3, default) or Deep (Band 4). Comparing against the previous bar's band value prevents same-bar feedback between the flip and the band update. A warm-up guard (max(3 × ATR length, 60) bars) suppresses all signals until the ATR stack is statistically stable.
Why this matters: flip sensitivity becomes an explicit, single-purpose setting instead of an accidental side effect of band width.
3️⃣ 5-factor retest quality score (0–100) — every signal explains itself.
When price touches any band and then reclaims Band 1 with a directional candle inside the retest window (default 8 bars), LTM computes:
— 📐 Pullback depth (max 25) : Band 2 touch = 25, Band 3 = 18, Band 1 = 15, Band 4 = 10. The maximum touched depth during the pending window is used. Note the deliberate non-linearity: Band 2 scores highest — deep enough to reset liquidity, not deep enough to threaten the trend. Band 4 sweeps score lowest because they often precede full reversals.
— 🕯️ Reclaim candle (max 20) : close location value CLV = (close − low) / (high − low) for longs (mirrored for shorts). CLV > 0.7 → 20 points, > 0.5 → 12, else 5. A reclaim that closes near its extreme shows commitment.
— 📊 Volume (max 20) : current volume vs. the previous bar's 20-period SMA — the spike must not dampen itself by inflating its own average. Volume > 1.2 × baseline → 20, > 1.0 × → 12, else 5. Symbols without volume data receive a neutral 12.
— 🧭 HTF bias (max 20) : aligned with the higher-timeframe EMA-50 direction → 20, no HTF data → 10, against bias → 0.
— ⏳ Trend age (max 15) : 10–150 bars into the trend → 15 (mature, established), under 10 bars → 8 (unproven), over 150 → 5 (aging).
Signals print only when the total meets the Min Retest Score (default 80) and the shared anti-whipsaw cooldown (default 5 bars, deliberately shared across both directions) has elapsed. Every diamond label shows the score, and its tooltip breaks down all five components — no black-box signals.
4️⃣ Non-repainting higher-timeframe bias.
HTF bias compares the higher timeframe's previous closed bar close against its EMA-50, requested with confirmed-bar indexing so the value never changes retroactively. Bias is a soft score component (0/10/20 points), not a hard filter — counter-bias signals can still print if the other four factors are strong enough.
5️⃣ Segment volume profile — range-distributed, anchored to the live trend leg.
The profile is rebuilt on the last bar from the exact flip bar of the current trend (capped by Max Profile Bars, default 500) — no arbitrary lookback padding. Accumulation is range-distributed: each bar's volume is split across every price bin its high–low range overlaps, weighted by overlap fraction:
bin_volume += bar_volume × overlap(bin, bar_range) / (bar_high − bar_low)
This shows where volume actually traded, not where bars happened to close. From the histogram LTM derives:
— 🟡 POC — the highest-volume bin of the segment, drawn with price and volume label. The strongest magnet / defense level of this leg.
— 📦 Value Area (70%) — expanded symmetrically from POC by always adding the larger neighboring bin until 70% of segment volume is enclosed. VAH / VAL edges act as dynamic S/R.
— 📈 HVN — local volume peaks ≥ 0.55 × POC volume (configurable): acceptance shelves where price tends to stall.
— 🕳️ LVN — local troughs ≤ 0.30 × POC volume inside the Value Area (configurable): volume vacuums that price tends to travel through quickly. Each LVN is labeled and feeds a dedicated break alert.
On symbols with no volume feed (forex, some CFDs) the engine substitutes a true-range proxy per bar, so the profile stays structurally meaningful instead of failing.
6️⃣ Trade engine with strict signal-trade parity.
Every confirmed signal (scored retest or trend flip) acts, with unambiguous rules:
— flat → open a position in the signal direction
— opposite position → reverse (close and enter the new direction on the same bar)
— same-direction position → ignored (no pyramiding, no stop tampering)
There are exactly four closure paths: SL hit, break-even stop-out, TP3 touch, or reversal by an opposite signal. Hit detection uses three safety guards: an entry-bar guard (SL/TP are never evaluated on the entry bar itself), a pessimistic same-bar rule (if a bar touches both SL and a TP, the SL wins — statistics never get the benefit of the doubt), and a break-even latency rule (a stop moved to break-even mid-bar cannot trigger on that same bar — the engine checks against the bar-start stop value).
7️⃣ Wick-anchored stop-loss mode.
Two SL modes at entry:
— Wick-Anchored (default) : SL = signal bar's wick extreme ± 0.25 × ATR buffer, with a minimum distance of 0.5 × ATR enforced. The stop hides behind the structure that produced the signal instead of floating at an arbitrary distance.
— ATR : classic fixed SL Multiplier × ATR from entry.
TP1 / TP2 / TP3 are pure risk multiples of the actual SL distance (defaults 1R / 2R / 3R), so the reward structure automatically adapts to how much room the stop needed. Four risk presets (Conservative 2.5 × ATR SL, TP 1/2/4R; Balanced 1.5, TP 1/2/3R; Aggressive 1.0, TP 1.5/2.5/4R; Scalping 0.8, TP 0.8/1.5/2R) plus full Custom control. Optional break-even moves the stop to entry after TP1.
8️⃣ Honest session statistics with a fixed win definition.
A closed trade counts as a win only if TP1 was touched before closure — including break-even stop-outs after TP1 (you banked at least 1R or protected the position). Everything else is a loss, including reversals that never reached TP1. The dashboard shows closed trades, W/L, win rate with a ▰▱ gauge, and a "Form" strip of the last 10 outcomes. Stats are session-scoped and reset on chart reload — this is transparent live tracking of the current settings on the current chart, not a backtest report.
9️⃣ Trend P&L tracker and theme-aware visual system.
An optional floating label follows price in real time and shows the directional % move since the current trend flip (a falling bear trend shows positive %), anchored by a dotted baseline at the trend start price. The label turns red when the trend is under water. The entire visual layer — band transparencies, heatmap fills, dashboard, profile, SL/TP palette — has separate Dark and Light calibrations (Auto-detected from the chart background), because bright hues that look right on dark charts wash out on white ones. TP lines recolor to solid teal with a ✓ when touched; the SL line dims and the entry label annotates "→ SL (BE)" when break-even activates. SL/TP lines persist after the trade closes as a visual record until the next entry replaces them.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Band geometry: The preset (or Custom inputs) resolves the base multiplier and proportional step; four multipliers m1–m4 are derived and multiplied by ATR (default length 13).
Step 2 — Ratcheting trail: In an uptrend each band only rises (max-lock); in a downtrend only falls (min-lock). On a flip the whole stack re-seeds on the opposite side of price.
Step 3 — Flip detection: A close beyond the previous bar's value of the chosen flip band (2/3/4) reverses the trend state. Flip labels print on confirmed bars after the warm-up period.
Step 4 — Pullback tracking: Any touch of Band 1–4 against the trend arms a pending retest with its maximum depth, valid for the retest window; pendings decay each bar and are voided on a flip.
Step 5 — Reclaim and scoring: A directional close back beyond Band 1 triggers scoring: depth (25) + candle (20) + volume (20) + HTF bias (20) + trend age (15). Score ≥ threshold and cooldown elapsed → confirmed signal on bar close.
Step 6 — Trade engine: The signal opens or reverses a position; SL is placed (wick-anchored or ATR), TP1–TP3 are projected as risk multiples; break-even, TP recolors and the four closure paths are managed bar by bar with pessimistic resolution.
Step 7 — Segment profile: On the last bar the profile is rebuilt from the flip bar: range-distributed accumulation → POC → 70% Value Area expansion → HVN/LVN detection → drawing.
Step 8 — Reporting: The dashboard updates trend state, signal state, profile levels, live trade card and session statistics; alerts fire on bar close in within-bar chronological order (management → closures → reversal → entries → info).
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to your chart and pick a Band Width Preset: Scalping for 1–15M, Balanced for most timeframes, Deep Trend for D–W position trading.
2. Set the Higher Timeframe Bias one or two steps above your chart (e.g. 1H while trading 15M).
3. Choose a Risk Preset that matches your style, or leave Balanced.
4. Watch the dashboard: Trend + HTF Bias aligned means you only consider signals in that direction with full conviction; the retest diamonds do the timing.
5. After 15–20 closed trades, read the Stats section and tune Min Retest Score up (fewer, cleaner signals) or down (more signals) for your instrument.
👁️ Reading the chart:
— 🟢 / 🔴 Band stack + heatmap = the liquidity trail zone; the deeper the fill, the closer price is to a trend flip.
— ◆ diamond with a number = confirmed scored retest entry (the number is the 0–100 quality score; hover the tooltip for the full component breakdown).
— ▲ / ▼ FLIP = confirmed trend reversal through the chosen flip band.
— Long ▲ / Short ▼ = trade entry taken by the engine on a flip (printed when there is no retest diamond on the same bar, so every entry is visibly marked).
— ENTRY / SL / TP1–TP3 lines = the live trade card; TP lines turn solid teal with ✓ when touched; a dimmed SL with "→ SL (BE)" on the entry label means the stop sits at break-even.
— 🟡 POC line = highest-volume price of the current trend leg; dashed VAH/VAL = Value Area edges; LVN labels = volume vacuums inside the Value Area.
— ▲ +X.XX% floating label (optional) = real-time directional P&L of the current trend since the flip.
📊 Dashboard fields:
— Trend / Age : direction of the band stack and bars since the last flip.
— HTF Bias : higher-timeframe EMA-50 direction (soft score component).
— Signal : current engine position — LONG, SHORT or Wait.
— Last signal : most recent event, its score, and bars elapsed.
— POC / VA High / VA Low : live segment profile levels.
— Entry / SL / TP1–TP3 / R:R / SL Dist % : the open trade card ("BE @" marks a break-even stop; ✓ marks touched targets); collapses to one row when flat.
— Trades / W-L / Win rate / Form : session statistics; ▰ = win, ▱ = loss, newest on the right.
🔧 Tuning guide:
— Too many weak signals: raise Min Retest Score toward 85–90, or increase Signal Cooldown.
— Too few signals: lower Min Retest Score toward 55–65, or widen the Retest Window to 10.
— Whipsaw flips on a choppy symbol: switch Flip Band to Deep (Band 4) or move to the Deep Trend preset.
— Flips lag too far behind on fast moves: Flip Band → Fast (Band 2) or the Scalping preset.
— Stops feel too tight / too wide: switch SL Mode between Wick-Anchored and ATR, or change the Risk Preset; on volatile symbols prefer Conservative.
— Profile looks coarse on long trends: raise Profile Rows to 50+ and Max Profile Bars toward 800.
— Counter-trend retests keep printing: set an explicit Higher Timeframe Bias — counter-bias signals lose 20 points and rarely clear a high threshold.
⚙️ KEY SETTINGS
⚙️ Trend Engine:
— Band Width Preset (default Balanced): Scalping 2.5 × ATR / step 0.20, Balanced 4.0 / 0.25, Deep Trend 6.0 / 0.30, or Custom.
— Base Multiplier (default 5.0) and Band Spacing (default 0.25): manual geometry, active in Custom preset only.
— ATR Length (default 13): lookback for band-width ATR.
— Source (default close): price series for trailing and flips.
— Flip Band (default Balanced / Band 3): which band a close must breach to flip the trend.
— Higher Timeframe Bias (default empty = chart TF): HTF for EMA-50 bias scoring.
🎯 Signals:
— Min Retest Score (default 80): 0–100 quality threshold for retest diamonds.
— Retest Window (default 8 bars): how long a band touch stays armed for a reclaim.
— Signal Cooldown (default 5 bars): minimum spacing between signals, shared across directions.
📦 Volume Profile:
— Show Segment Volume Profile (on), Profile Rows (30), Profile Width (34 bars), Max Profile Bars (500).
— Show POC (on), Show Value Area 70% (on), Show HVN / LVN Levels (on), Profile Label Size (Small).
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— SL Mode (default Wick-Anchored): structure-aware wick stop vs. fixed ATR distance.
— ATR Length (Risk) (14), SL Multiplier (1.5), TP1 / TP2 / TP3 Multipliers (1.0 / 2.0 / 3.0 × risk) — Custom preset.
— Break-Even After TP1 (on): stop moves to entry once TP1 is touched.
— Show SL/TP Lines / Labels / % Distance and per-line style controls (Entry dotted, SL solid, TP dashed by default).
🎨 Visual:
— Theme (Auto / Dark / Light), Show Trail Bands , Show Band Heatmap Fill , Show Retest Signals , Show Flip Labels , Show Trend P&L Tracker (off by default), label size controls, watermark toggle, Bull / Bear color pickers.
📊 Dashboard:
— Show Dashboard (on), position (5 anchors), font size, and independent toggles for the Market, Profile, Trade and Stats sections.
🔧 Advanced:
— HVN Threshold (default 0.55 × POC volume): minimum relative volume for an acceptance node.
— LVN Threshold (default 0.30 × POC volume): maximum relative volume for a vacuum node.
🔔 ALERTS
— 🟢 LONG ENTRY / 🔴 SHORT ENTRY — ticker, timeframe, price, signal score, SL, TP1–TP3, R:R. Plain text or JSON webhook format ({"action":"buy"...}) for bot integrations.
— 🎯 TP1 / TP2 / TP3 HIT — target touches with prices (optional).
— 🛡️ BREAK-EVEN — stop moved to entry after TP1 (optional).
— 🛑 SL HIT / BE STOP-OUT — stop-loss trigger with direction, entry and stop prices; a distinct BE variant when the stop was at break-even.
— 🔄 REVERSAL — position reversed by an opposite signal, with the closed trade's outcome (after / before TP1).
— ▲ / ▼ TREND FLIP — informational flips that did not open or reverse a trade.
— ⚡ LVN BREAK — a close crossing a Low Volume Node of the live segment profile (price entering a volume vacuum often accelerates).
All alerts fire once per bar close. Alerts are ordered by within-bar chronology: trade management → closures → reversal → new entries → informational.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals, entries and alerts are confirmed on bar close (barstate.isconfirmed). The trend flip compares against the previous bar's band value. The HTF bias uses the higher timeframe's previous closed bar, so its value never changes retroactively. A warm-up guard suppresses signals for the first max(3 × ATR length, 60) bars.
— 📐 The segment volume profile is a live construct. It is redrawn on the last bar for the current trend leg and evolves as the leg grows — this is by design (it describes the present segment), and historical profile states are not preserved.
— 📊 Session statistics reset on chart reload. They are transparent live tracking of the current settings on the current symbol and timeframe — not a backtest, and past performance does not guarantee future results.
— ⚖️ Same-bar ambiguity is resolved pessimistically. If one bar touches both a stop and a target, the stop wins in the statistics. Intrabar sequence cannot be known from OHLC data, so the engine never gives itself the benefit of the doubt.
— 🕳️ Zero-volume symbols use a range-weighted proxy for the profile, and the volume score component defaults to a neutral value — profile shapes on such symbols reflect price dwell time, not traded volume.
— 🛠️ This is an analysis and trade-planning tool, not an automated trading bot. It detects trend state, scores retests, projects stops and targets, and tracks outcomes — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Indicator

Retest & Break Setup [LuxAlgo]The Retest & Break Setup indicator identifies and tracks price action structures where price breaks a pivot level, retests it multiple times, and subsequently breaks out to confirm the trend.
🔶 USAGE
The indicator identifies "Retest & Break" patterns by monitoring pivot levels (Pivot Highs for bullish setups and Pivot Lows for bearish setups). A setup begins when a pivot is broken by price. The script then tracks whether price returns to "retest" this broken level as support or resistance.
A setup is considered "completed" once the required number of retests is met and price breaks out past the newly formed extreme established during the retest phase. For bullish setups, this means price must close above the highest high reached during the retest period. For bearish setups, price must close below the lowest low reached during the retest period.
A completed bullish setup suggests that price is likely to continue moving higher, while a bearish setup suggests a move lower. The logic behind this is often linked to liquidity; as price retests a level multiple times without breaking back through, liquidity (such as stop-loss orders) builds up just beyond the retest extremes.
When price finally breaches these levels, this concentrated liquidity can act as fuel, accelerating the breakout and confirming the new trend direction.
🔹 Parameters and Setup Sensitivity
The behavior of the indicator is highly dependent on four primary settings:
Length: Determines the significance of the initial pivot. A higher value identifies major swing points, while a lower value identifies minor intraday levels.
Required Consecutive Retests (K): Specifies how many times price must touch the broken level without breaking back through it. Increasing this value requires more confirmation before a setup is considered valid.
Max Bars between Retests (P): Controls the "tightness" of the retest phase. If price takes too long to return for a retest, the setup is invalidated.
Max Bars for Break (N): Defines the window of opportunity for the final breakout. After the required retests are met, price must break the recent extreme (high for bullish, low for bearish) within this many bars.
🔹 Finding Long-Term vs. Short-Term Setups
For users looking for longer-term, more significant setups, it is recommended to increase the Length (e.g., 10-20) and the Max Bars parameters ( N and P ) to allow for the slower price development typical of higher timeframes or major trend shifts.
Conversely, for scalping or fast-moving markets, lower values for Length and P will highlight quick "touch-and-go" patterns.
🔶 DETAILS
The indicator includes a comprehensive dashboard to help users evaluate the historical reliability of the identified structures on the current chart and timeframe.
🔹 Dashboard Metrics
Total: This counts the number of setups that successfully completed the initial break and all required K retests. It represents the "Potential" setups that reached the final stage.
Completion: This tracks how many of the "Total" setups actually achieved a confirmed breakout past the retest extreme within the N bars limit.
Win Rate: This is a predictive performance metric. For every "Completed" setup, the script records the price at the moment of breakout. After N bars have passed since that breakout, it checks if price is still above (bullish) or below (bearish) the breakout level.
🔹 Visualization
The script uses dashed lines to represent the broken pivot level being retested. Solid lines represent the "trigger" level (the extreme of the retest phase). When a setup is completed, a shaded box appears, and a "Break" label is plotted. If "Only Show Complete Setups" is disabled, invalidated setups will remain on the chart in a faded gray color for study.
🔶 SETTINGS
Length: The lookback period used to detect Pivot Highs and Lows.
Max Bars for Break (N): The maximum time allowed for price to break out after the final retest.
Max Bars between Retests (P): The maximum time allowed between the initial break and the first retest, or between subsequent retests.
Required Consecutive Retests (K): The number of successful retests required to validate the zone.
Only Show Complete Setups: When enabled, removes setups from the chart that failed to meet the retest or breakout criteria.
Setup Colors: Customizable colors for bullish, bearish, and invalidated patterns.
Dashboard Settings: Options to toggle the dashboard visibility, change its position on the chart, and adjust its size.
Indicator

Mirage Liquidity Sweep Pro [WillyAlgoTrader]💧 Mirage Liquidity Sweep Pro is a free overlay toolkit that detects liquidity sweeps (stop-hunts), scores each one on a transparent 0-100 quality scale, optionally waits for a market-structure shift (CHoCH) to confirm, and then auto-builds a complete trade plan — wick-based stop, three take-profits, break-even logic, and a projected liquidity target — all on the bar the signal fires.
The core insight: price doesn't reverse at random support and resistance — it reverses where resting orders (liquidity) get consumed. A swing high above the market holds Buy-Side Liquidity (BSL); a swing low below it holds Sell-Side Liquidity (SSL). When price spikes through one of those levels and then closes back inside, that is a sweep: the move grabbed liquidity and rejected. Mirage finds those exact events, measures how clean the rejection was, and turns the strong ones into structured setups. It works on any market and any timeframe.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A raw sweep detector fires on every wick that pokes a level — most of which go nowhere. A pure structure tool (CHoCH/BOS) tells you the trend flipped but not whether liquidity was actually taken first. A risk calculator gives you a stop and targets but has no idea where the trade should go. Used separately, each one leaves a gap the others could fill.
Mirage fuses them into a single pipeline:
Swing memory → Liquidity sweep detection → 5-factor quality score → CHoCH structure confirmation → Wick-anchored risk engine (SL / TP1-3 / break-even) → Liquidity target projection → Outcome tracking & stats
The swing engine remembers recent highs and lows and tags them as resting liquidity. The sweep detector only triggers when a level is pierced and reclaimed on the close — a stop-hunt, not a clean break. The quality score then rates that sweep so weak pokes are filtered out before they ever become signals. CHoCH confirmation (optional) makes price prove the reversal by breaking minor structure before you commit. The risk engine anchors the stop to the actual sweep wick — the precise point invalidating the idea — and projects the next opposite pool of liquidity as the logical objective. Finally, every closed setup is tracked so you can see the strategy's behavior in real time.
Without the score, you drown in low-quality sweeps. Without CHoCH, you front-run reversals that never come. Without wick-anchored risk, your stop sits in an arbitrary place. Without the liquidity target, you have no idea where the move is actually drawn. The combination is what turns "a wick touched a level" into a complete, rule-based trade.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ 5-factor sweep quality score (0-100) — the heart of the system.
Every detected sweep is scored before it can qualify. The score blends five independent, normalized factors:
— 📐 Wick depth (weight 0.30): wickComp = min( max(wick, 0) / ATR , 1.0 ). For a bullish sweep, wick = min(open, close) − low; for bearish, wick = high − max(open, close). Bigger rejection wick relative to ATR = stronger grab.
— 🔄 Reclaim (weight 0.25): rclComp = min( max(reclaim, 0) / ATR , 1.0 ). Bullish reclaim = close − level; bearish = level − close. Measures how decisively price closed back on the right side of the swept level.
— 🕯️ Close position (weight 0.20): closePos = (close − low) / (high − low). For bulls the raw value is used; for bears it is inverted (1 − closePos). Rewards candles that close near the rejection extreme.
— 📊 Volume (weight 0.15): volComp = clamp( (volRatio − 1) / (volMult − 1) , 0, 1 ), where volRatio = volume / SMA(volume, 21) and volMult defaults to 1.5×. On volume-less feeds this factor neutralizes to 0.5 automatically.
— 🧭 HTF bias (weight 0.10): htfComp = 1.0 if the sweep aligns with the higher-timeframe EMA trend, else 0 (or 0.5 if the filter is off).
Final score = (wickComp×0.30 + rclComp×0.25 + cpComp×0.20 + volComp×0.15 + htfComp×0.10) × 100.
A sweep only qualifies when its score ≥ Min Sweep Score (default 50). This single number is your master quality dial.
2️⃣ Sweep vs. break distinction — closes decide everything.
A stored level is treated three ways. For a swing low: if price closes below it, the level is simply consumed (a real breakdown — no signal). If price wicks below but closes back above, that is a bullish sweep. The mirror logic applies to swing highs. This close-based rule is what separates a genuine liquidity grab from a trend break, and it is why the detector ignores most noise wicks.
3️⃣ Two-stage signal — sweep then CHoCH confirmation.
With confirmation on (default), a qualifying sweep becomes a pending setup rather than an instant entry. The signal only fires when price then breaks the most recent minor pivot (Change of Character) within the Confirmation Window (default 13 bars). Minor structure is tracked with its own pivot length (default 8). Turn confirmation off and the signal fires on the sweep bar itself — responsive, but earlier. Pending setups expire automatically if no CHoCH arrives in time.
4️⃣ Wick-anchored risk engine with a minimum-distance guard.
Entry = close of the signal bar. The stop is placed beyond the actual sweep wick:
— Long: SL = sweepLow − ATR×buffer
— Short: SL = sweepHigh + ATR×buffer
If the resulting stop sits closer than ATR×0.5 to entry, it is widened to exactly ATR×0.5 to avoid an unrealistically tight stop. Risk distance dist = |entry − SL|, and targets are pure R-multiples: TP1/TP2/TP3 = entry ± dist × multiplier.
5️⃣ Risk presets — one click from scalp to swing.
Five presets set buffer / TP1 / TP2 / TP3 instantly (SL buffer in ×ATR, TPs in R):
— Conservative: 0.50 / 1R / 2R / 4R
— Balanced (default): 0.25 / 1R / 2R / 3R
— Aggressive: 0.15 / 1.5R / 2.5R / 4R
— Scalping: 0.10 / 0.8R / 1.5R / 2R
— Custom: your own values
6️⃣ Break-even automation after TP1.
When TP1 is touched, the stop moves to entry. From the next bar a wick back to entry closes the trade at break-even — protecting the position once it has paid out its first target. The SL line dims and the entry label annotates "→ SL (BE)" so the state is always visible.
7️⃣ Resting liquidity map — BSL / SSL + EQH / EQL.
Every un-swept swing high is drawn as Buy-Side Liquidity and every un-swept swing low as Sell-Side Liquidity (most recent N per side, default 6). A level disappears the instant it is swept, so the map always shows live, untapped pools. Consecutive near-equal swings (within Equal H/L Tolerance × ATR, default 0.15) are connected as Equal Highs / Equal Lows — the strongest liquidity magnets and the most common sweep targets.
8️⃣ Liquidity target projection — the draw-on-liquidity objective.
On each entry, Mirage projects a line to the nearest opposite un-swept liquidity pool: a long aims at the closest BSL above entry, a short at the closest SSL below. This is the logical place the move is "drawn" toward, independent of the fixed R-multiple TPs.
9️⃣ Higher-timeframe bias as a soft, non-repainting filter.
The HTF trend (close vs. EMA, default 4H / EMA-50) is requested with confirmed prior-bar values and contributes only 10% of the score — it nudges quality rather than hard-blocking signals, so counter-trend sweeps can still fire if they are clean enough.
🔟 Honest, transparent outcome tracking.
The dashboard records every closed setup: wins, losses, win rate (with a visual gauge), and a recent-form strip of the last 10 results. A setup is counted as a WIN the moment TP1 is touched, and a trade closes on a stop-out or when TP3 is reached. This definition is stated openly so you always know exactly what the numbers mean — see Important Notes for the full caveats.
🧠 HOW IT WORKS — CALCULATION FLOW
Step 1 — Map the swings: Confirmed pivot highs/lows (length 21) are stored in bounded memory and tagged as un-swept BSL/SSL.
Step 2 — Detect a sweep: On each new bar, un-swept levels within Max Sweep Distance (default 80 bars) are checked. A wick-through-then-close-back-inside event is flagged as a sweep; a close beyond the level just marks it consumed.
Step 3 — Score it: The 5-factor formula rates the sweep 0-100. Only sweeps at or above Min Sweep Score, after warm-up, on a confirmed bar, qualify.
Step 4 — Resolve the signal: If CHoCH confirmation is on, the sweep becomes a pending setup and waits for a minor-structure break within the window; otherwise it fires immediately.
Step 5 — Build the trade: Entry, wick-based SL (with the ATR×0.5 minimum guard), and TP1/TP2/TP3 as R-multiples are calculated. Only one position runs at a time.
Step 6 — Manage it: Bar by bar, hits are checked on confirmed bars. TP1 triggers break-even; a stop-out or TP3 closes and records the result.
Step 7 — Visualize & report: Lines, labels, the liquidity map, the target projection, and the dashboard all update live.
📖 HOW TO USE (beginner-friendly)
🎯 Quick start — 5 steps:
1. Add the indicator to any chart and any timeframe (15m–4H is a good starting range).
2. Leave every setting on default. The Balanced preset and a Min Score of 50 are a sensible baseline.
3. Wait for a green Long ▲ or red Short ▼ marker. That is your entry signal — and it only appears once a sweep has passed the quality score (and, by default, a CHoCH confirmation).
4. Read the entry, stop, and three targets straight off the chart lines and labels. The numbers are already calculated for you.
5. Manage the trade using TP1/TP2/TP3 and the automatic break-even — see the dashboard for live status.
👁️ Reading the chart — what each thing means:
— 🟢 Long ▲ / 🔴 Short ▼ = a confirmed signal (a trade opened here).
— ✖️ Small × mark = a raw sweep (liquidity was grabbed) — shown even when no trade opens.
— Dashed level line = the swing high/low that was swept, drawn from where it formed.
— Thick vertical tick = the penetration depth — how far the wick pierced beyond the level.
— ENTRY line = where the trade opened. SL line (red) = stop. TP1/TP2/TP3 lines = targets; a target turns solid teal with a ✓ once touched.
— Gold dashed line "◎ Liquidity Target" = the nearest opposite liquidity pool the move is drawn toward.
— Dotted BSL / SSL lines = un-swept resting liquidity above (BSL) and below (SSL) — likely future sweep targets.
— EQH / EQL connectors = near-equal highs/lows = the strongest liquidity magnets.
— % on labels = distance from entry to each level, e.g. "SL 1.2300 (−0.36%)".
📊 Dashboard fields:
— Trend: direction of the most recent qualifying signal.
— HTF Bias: higher-timeframe EMA bias (the soft 10% score factor).
— Signal: LONG / SHORT when in a trade, "Wait" when flat (a new trade opens only while flat).
— Last sweep: most recent qualifying sweep and its 0-100 score.
— SL / TP1 / TP2 / TP3: live levels; ✓ marks a target already touched; "BE @" marks a stop moved to break-even.
— R:R (TP1): reward-to-risk at the first target.
— SL Dist %: stop distance as a percent of entry.
— Trades / W-L / Win rate / Form: session results, with a gauge and a ▰/▱ strip of the last 10 outcomes (newest on the right).
🔧 Tuning guide (common fixes):
— Too few signals? Lower Min Sweep Score (e.g. 40-45), shorten Swing Length, or turn off CHoCH confirmation for earlier entries.
— Too many weak signals? Raise Min Sweep Score (60+), keep CHoCH on, and enable the Volume filter.
— Stops feel too tight/wide? Switch presets (Conservative widens, Scalping tightens) or set the SL buffer manually in Custom.
— Choppy market? Increase Swing Length and lean on the HTF bias filter so only trend-aligned sweeps score highly.
💡 Trading ideas:
— EQH/EQL hunt: watch a marked Equal High/Low — when it is swept and reclaimed with a high score, the rejection is often clean.
— Draw-on-liquidity: use the gold target line as a partial-exit zone; price frequently reaches the next opposite pool.
— Confirmation toggle: use CHoCH-on for selective swing entries, CHoCH-off on lower timeframes for faster scalps.
— Bias stacking: take only signals whose direction matches the HTF Bias field for higher-conviction entries.
⚙️ KEY SETTINGS
⚙️ Main:
— Swing Length (default 21): pivot lookback for the liquidity pools to sweep. Higher = bigger, cleaner pools.
— Max Sweep Distance (default 80 bars): a swing can only be swept within this many bars of forming.
— Min Sweep Score (default 50): master quality gate, 0-100.
🧩 Confirmation:
— Require CHoCH Confirmation (default on): wait for a structure break after the sweep.
— Structure Pivot Length (default 8): minor pivots used to detect the CHoCH.
— Confirmation Window (default 13 bars): how long a pending setup waits before expiring.
🔍 Filters:
— Use Volume Filter (default on) / Volume MA Length (21) / Volume Spike ×MA (1.5).
— Use HTF Bias (default on) / HTF Timeframe (240) / HTF EMA Length (50).
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— ATR Length (14) / SL Buffer ×ATR (0.25, Custom) / TP1/TP2/TP3 ×Risk (1.0 / 2.0 / 3.0, Custom).
— Break-Even After TP1 (default on), plus SL/TP line and label visibility, % distance, and line styles.
💧 Liquidity:
— Show Resting Liquidity (BSL/SSL) (on) / Max Levels / Side (6) / Line Extend (10 bars).
— Show Equal Highs/Lows (on) / Equal H/L Tolerance ×ATR (0.15) / Show Liquidity Target (on).
🎨 Visual & Dashboard:
— Theme (Auto / Dark / Light), raw sweep marks, swept-level line, penetration, signals, score labels, watermark, label font size.
— Dashboard position, font size, and Market / Trade / Stats section toggles.
🔔 ALERTS
— 🟢 LONG entry — ticker, timeframe, score, price, SL, TP1, TP2, TP3, R:R.
— 🔴 SHORT entry — same payload.
— 🛑 SL Hit (and 🛡️ Break-Even stop-out) — entry and stop levels.
— 🛡️ Break-Even activated — when the stop moves to entry.
— 🎯 TP1 / TP2 / TP3 touched — price at each target.
All alerts support plain-text and JSON webhook formats and fire on bar close (alert.freq_once_per_bar_close).
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Signals require confirmed bars (barstate.isconfirmed); swing pivots use equal left/right lookback, so the actual pivot is in the past by Swing Length bars and is drawn only once confirmed — this is delayed confirmation, not repainting of future values. The HTF bias is requested with confirmed prior-bar values, and all alerts fire on bar close.
— 📊 How wins are counted: a setup is marked a WIN as soon as TP1 is touched (1R by default). A trade that reaches TP1 and then reverses to break-even still counts as a win. This is a deliberately transparent definition, not an inflated one — read it that way when interpreting the win rate.
— 📐 Stats are session-based and simulated. The dashboard reflects the indicator's own single-position logic on the loaded history and resets when the chart reloads. It is not a broker-accurate backtest and includes no fees, slippage, or funding.
— ⚖️ One position at a time. A new signal can only open while flat — sweeps that occur mid-trade are shown but not traded.
— 🛠️ This is an analysis tool, not an automated trading bot. It detects sweeps, scores them, confirms with structure, and builds a structured trade plan — trade decisions remain yours.
— 🌐 Universal. Works on all markets and all timeframes. Volume-dependent scoring auto-neutralizes on feeds without volume.
Free to use — add it to your chart and explore. Feedback and feature requests are welcome. Indicator

Meridian Flow [WillyAlgoTrader]🧭 Meridian Flow is an overlay Smart-Money toolkit that reads market structure the way an institutional trader does — detecting confirmed swing points, classifying every break as a BOS (trend continuation) or a CHoCH (trend reversal), drawing the order block each break leaves behind, and then turning that signal into a complete trade plan with ATR-based stop-loss, three take-profits, automatic break-even, and a live performance dashboard — all on one chart, with zero manual drawing.
The core idea: most "SMC" tools just paint boxes and labels and leave you to figure out the rest. Meridian Flow closes the loop. It does not stop at "here is a break" — it answers where to enter, where the stop goes, where the targets are, when to move to break-even, and how the setup has performed . Structure detection, order-block tracking, a higher-timeframe bias filter, a full risk engine, a structure-anchored trend line, and a sectioned dashboard are wired into a single pipeline so each part feeds the next.
It works on any market and any timeframe — forex, crypto, stocks, indices, futures — because every component is built from price action and ATR, not from instrument-specific assumptions.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A raw BOS/CHoCH labeler tells you structure broke, but not whether to trust the break, where the institutional zone is, or how to manage risk once you're in. An order-block tool draws zones but has no concept of trade management. A risk calculator needs an entry it can't generate on its own. Used separately, you're constantly stitching three or four tools together by hand.
Meridian Flow fuses them into one chain:
Confirmed swing detection → HH/HL/LH/LL classification → BOS / CHoCH break engine → HTF bias filter → Order-block creation + mitigation tracking → ATR risk model (SL / TP1-3 / break-even) → Structure-anchored ATR trend line → Live stats & form dashboard → Alerts
The swing engine finds confirmed pivots. Classification tells you whether each new swing extends or contradicts the prior one. The break engine reads the running structure state to decide BOS vs CHoCH — the same state then sets the direction of the trailing trend line, so the line and the labels never disagree. Each qualifying break spawns the order block that produced the move and tracks it until price mitigates it. The HTF filter vetoes breaks that fight the higher timeframe. The risk engine takes the surviving signal and immediately builds entry, stop, and three targets sized in ATR and R-multiples. The dashboard records the outcome and feeds it back to you as a win rate and a recent-form strip.
Without structure classification you can't separate continuations from reversals. Without the running-state logic, BOS and CHoCH blur together. Without order blocks you lose the institutional zone. Without the HTF filter you take every counter-trend poke. Without the risk model a signal is just an arrow. The combination is what turns "structure broke" into a managed, reviewable trade.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Confirmed swing engine with automatic HH / HL / LH / LL labeling.
Swings are found with symmetric pivots — equal left/right lookback (default Swing Length 13 ) — so a pivot is only confirmed once enough bars have closed on both sides. Each new high is labeled:
— isHH = (no previous high) OR (pivotHigh >= previousHigh)
— otherwise it is an LH
Each new low is labeled:
— isLL = (no previous low) OR (pivotLow <= previousLow)
— otherwise it is an HL
This gives you an objective, repeatable map of structure instead of subjective lines.
2️⃣ BOS vs CHoCH disambiguation via a running structure-state machine.
The indicator keeps an internal trend state (structTrend = +1 bull, −1 bear, 0 neutral). When a swing high breaks, it reads that state:
— bull break while structTrend >= 0 → BOS ▲ (continuation)
— bull break while structTrend < 0 → CHoCH ▲ (reversal up)
The mirror logic applies to bear breaks. This is why the same break can be a BOS in one context and a CHoCH in another — the label reflects the trend you were already in, not just the candle that broke.
3️⃣ Conflict suppression + warmup guard.
If a bull break and a bear break would register on the very same bar, the bar is flagged a conflict and both are suppressed — no contradictory signals. On top of that, no signal fires until the chart has warmed up:
— WARMUP_BARS = max(Swing Length × 2, 50)
Early-history noise, where pivots aren't yet reliable, is filtered out before a single arrow prints.
4️⃣ Order blocks tied to the break, with displacement detection and an arm→mitigate lifecycle.
When a break creates an OB, the engine scans back up to OB Lookback (default 30) bars for the last opposite candle (for a bullish OB: the last down candle, close < open) and prefers one that was followed by a displacement move out of its range. If no displacement is found, it falls back to the nearest opposite candle.
Every box then runs a lifecycle:
— Armed : price first closes beyond the zone (confirming the OB worked)
— Mitigated : price later returns into the zone (by wick or close, your choice), committed on bar close
Mitigated blocks fade to grey and freeze, or can be removed entirely. The box cap ( Max Order Blocks, default 8 ) always drops mitigated zones first, so live zones stay on the chart longest.
5️⃣ Non-repainting higher-timeframe bias filter.
An EMA (default 50 ) is computed on a higher timeframe (default 60-minute ) and read with a one-bar offset on confirmed values:
— Bullish bias when close >= HTF EMA
— Bearish bias when close <= HTF EMA
When the filter is on, longs are only allowed in a bullish HTF regime and shorts only in a bearish one. Because the HTF value is taken from the already-closed higher-timeframe bar, it does not repaint.
6️⃣ Preset-driven ATR risk model — entry, stop, and three targets in one shot.
Stop distance is volatility-scaled, and targets are placed as multiples of that risk (R):
— slDistance = ATR(SL length, default 13) × SL multiplier
— SL = entry ∓ slDistance
— TP1/TP2/TP3 = entry ± slDistance × (TP1/TP2/TP3 multiplier)
One click selects a full profile (SL ×ATR / TP1 / TP2 / TP3 in R):
— Conservative : 2.5 / 1R / 2R / 4R
— Balanced : 1.5 / 1R / 2R / 3R
— Aggressive : 1.0 / 1.5R / 2.5R / 4R
— Scalping : 0.8 / 0.8R / 1.5R / 2R
— Custom : set every multiplier by hand
Only one position at a time is tracked — no pyramiding, no overlapping clutter.
7️⃣ Break-even-after-TP1 with WIN-on-TP1 accounting.
When TP1 is first touched and break-even is enabled, the stop is moved to the entry price. From the next bar, any wick back to entry closes the trade at break-even — locking out the give-back loss. Crucially, a trade counts as a WIN the moment TP1 is touched , even if it later comes back to the break-even stop. This keeps the win-rate honest about partial profit-taking.
8️⃣ Structure-anchored ATR trend line (SuperTrend-style, but it flips on CHoCH).
A smoothed ATR band trails price, but its direction is not decided by its own crossover logic — it is slaved to the structure state:
— band = hl2 ∓ (ATR Trend Multiplier, default 5) × EMA(ATR(length 10), smoothing 5)
— Bull regime: line trails as max(previous line, lower band)
— Bear regime: line trails as min(previous line, upper band)
— The line flips only when structure flips (a CHoCH), marked with a circle
So your trailing line and your BOS/CHoCH labels always tell the same story.
9️⃣ Session stats engine — win rate gauge + recent-form strip.
The dashboard tallies closed trades, wins, losses, and win rate, rendered with a Unicode block gauge (▰▱). A separate Form strip shows the last 10 outcomes (▰ = win, ▱ = loss, newest on the right), so you can see whether the current settings are in or out of sync with the market at a glance.
🧠 HOW IT WORKS — bar by bar
Step 1 — Detect swings: symmetric pivots confirm a swing high or low and label it HH/HL/LH/LL.
Step 2 — Watch for a break: price closing (or wicking, your choice) beyond the last swing flags a raw break; same-bar conflicts are suppressed.
Step 3 — Classify the break: the running structure state turns the raw break into a BOS or a CHoCH and flips the trend state.
Step 4 — Filter by bias: if the HTF filter is on, the break must agree with the higher-timeframe EMA regime to qualify.
Step 5 — Spawn the order block: the engine finds the originating candle (preferring displacement) and draws the OB zone.
Step 6 — Open the trade: while flat, a qualifying break sets entry, ATR stop, and TP1/TP2/TP3 from the active preset.
Step 7 — Manage it: each bar checks for TP touches and stop hits; TP1 triggers break-even; SL or TP3 closes the trade and books the result.
Step 8 — Track zones: every open OB arms and then mitigates as price interacts with it.
Step 9 — Report: the dashboard updates trend, signal, levels, R:R, win rate, and recent form; alerts fire on close.
📖 HOW TO USE (beginner-friendly)
🎯 Quick start — get running in 5 steps:
1. Add Meridian Flow to any chart, any timeframe. Defaults already work.
2. Look at the dashboard (top-right). The colored header tells you the current trend: green = bullish, red = bearish, blue = neutral.
3. Wait for a Long ▲ or Short ▼ marker to print under/over a candle. That is a new trade signal.
4. Read the colored lines that appear: the dotted line is your entry, the solid red line is your stop-loss, the three dashed lines are TP1, TP2, TP3.
5. Use those exact levels in your broker. The dashboard shows the same numbers in text so you can copy them.
That is the whole loop: signal prints → take the levels → manage to the targets. Everything else below just helps you read and fine-tune it.
👁️ Reading the chart (what every element means):
— 🟢 Long ▲ / 🔴 Short ▼ markers = a trade just opened in that direction.
— BOS ▲/▼ = trend is continuing in the same direction.
— CHoCH ▲/▼ = trend may be reversing — the first sign of a turn.
— HH / HL = higher high / higher low (healthy uptrend). LL / LH = lower low / lower high (healthy downtrend).
— Colored boxes = order blocks (institutional zones). Bright = still active; faded grey = already mitigated (price came back to it).
— Dotted line = entry · solid red = stop-loss · dashed lines = TP1/TP2/TP3. A target turns solid teal with a ✓ once price reaches it.
— Trailing ATR line = quick visual trend; it flips (with a small circle) when structure reverses.
📊 Dashboard fields:
— Trend : current structure direction (Bullish / Bearish / Neutral).
— Signal : LONG, SHORT, or Wait (a new trade only opens when you're flat).
— Last event : the most recent BOS or CHoCH.
— Timeframe : the chart timeframe.
— SL / TP1 / TP2 / TP3 : live levels of the open trade (✓ marks targets already hit; "BE @" means the stop moved to break-even).
— R:R (TP1) : reward-to-risk to the first target.
— SL Dist % : how far the stop sits from entry as a percentage.
— Trades / W-L / Win rate : this-session performance with a gauge.
— Form : last 10 results, ▰ win · ▱ loss, newest on the right.
🔧 Tuning guide (fix common issues):
— Too many small/noisy signals: raise Swing Length (try 20-30) and set Break Confirmation to "Close".
— Signals feel late: lower Swing Length (5-10) and/or switch Break Confirmation to "Wick".
— Too many counter-trend trades: turn on the HTF Trend Filter.
— Stops too tight / too wide: change the Risk Preset, or use Custom and adjust SL ×ATR.
— Chart too busy: turn off OB labels and the mean line, reduce Max Order Blocks, or enable "Remove OB After Mitigation".
💡 Trading ideas:
— Reversal hunting: set Signal Mode to "CHoCH only" to trade structure turns; pair with an order-block retest for confirmation.
— Trend riding: set Signal Mode to "BOS only" with the HTF filter on to stack with the higher-timeframe direction.
— Zone entries: wait for a fresh OB, then enter on the mitigation tap back into the zone rather than chasing the break.
— Scalping: use the Scalping preset on low timeframes for tight stops and quick 1:1 to 1:2 targets.
— Risk-free runners: keep Break-Even After TP1 on so winners can't turn into losers.
⚙️ KEY SETTINGS REFERENCE
🏗️ Structure:
— Swing Length (default 13): pivot lookback. Lower = more, smaller swings; higher = cleaner.
— Break Confirmation (default Close): Close = fewer fakeouts; Wick = earlier, riskier.
— Signal Mode (default BOS + CHoCH): which events fire trades — CHoCH only / BOS only / both.
— Show HH/HL/LH/LL (default on) · Show BOS / CHoCH (default on).
📦 Order Blocks:
— Show Order Blocks (default on) · Create OB On (default BOS + CHoCH).
— Mitigation Trigger (default Wick): Wick = earlier; Close = stricter.
— Remove OB After Mitigation (default off) · OB Lookback (default 30) · Max Order Blocks (default 8).
— OB Box Transparency (default 85) · Show 50% Mean Line (default off) · Show OB Labels (default off).
🔍 Filters:
— HTF Trend Filter (default off) · HTF Timeframe (default 60) · HTF EMA Length (default 50).
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— ATR Length (SL) (default 13) · SL ×ATR / TP1 / TP2 / TP3 multipliers (Custom mode).
— Show SL/TP Lines (default on) · Show SL/TP Labels (default on) · Show % Distance (default on).
— Break-Even After TP1 (default on) · Entry / SL / TP Line Style .
🎨 Visual:
— Theme (default Auto) · Show Buy/Sell Signals (default on) · Label Font Size (default Small).
— Show ATR Trend Line (default on) · ATR Trend Length (default 10) · Multiplier (default 5.0) · Smoothing (default 5).
— Show Watermark (default on).
📊 Dashboard:
— Show Dashboard (default on) · Position (default Top Right) · toggles for Market / Trade / Stats sections.
🔔 Alerts:
— Webhook JSON Format (default off) · Alert on SL Hit (default on) · Alert on TP / Break-Even (default off) · Alert on OB Mitigation (default off).
🔔 ALERTS
— 🟢 LONG / 🔴 SHORT — entry with ticker, timeframe, price, SL, TP1/TP2/TP3 and R:R.
— 🛑 SL HIT / 🛡️ BE STOP-OUT — stop or break-even stop-out, with entry and stop price.
— 🛡️ BREAK-EVEN — stop moved to entry after TP1.
— 🎯 TP1 / TP2 / TP3 HIT — each target as it is touched.
— 📦 OB MITIGATION — price returns into a bull or bear order block.
All alerts support plain text and JSON webhook output, and fire on bar close (once per bar close).
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Swings use symmetric (equal left/right) pivots, so a pivot is confirmed only after the lookback bars close — the actual swing sits in the past by the Swing Length; the indicator draws forward from that confirmed bar. Breaks, hits, and OB mitigation all commit on bar close (barstate.isconfirmed), the HTF bias reads the already-closed higher-timeframe bar, and alerts fire once per bar close. This is delayed confirmation, not repainting of future values.
— 📐 Confirmation delay is inherent: signals appear after the bar that triggers them closes. This is the cost of avoiding fakeouts.
— ⚖️ Stats are session-based: win rate and the form strip reset when the script reloads or any input changes. They reflect the visible history with current settings, not a guaranteed forward result.
— 📊 "SL Dist %" is the stop distance as a percentage of entry — it is not a position-sizing or account-risk figure. Size your positions with your own risk rules.
— 🛠️ This is a market-structure analysis and trade-planning tool, not an automated trading bot. It detects structure, draws zones, builds stop/target levels, and tracks outcomes — trade decisions remain yours.
— 🌐 Works on all markets and all timeframes. Past performance does not guarantee future results.
— 🆓 Meridian Flow is free to use. Feedback and suggestions are welcome in the comments. Indicator

Synapse Trail Pro [WillyAlgoTrader]◆ SYNAPSE TRAIL PRO — FREE & OPEN-SOURCE
Synapse Trail Pro is an overlay indicator that fuses a ratcheted ATR trail, a 3-factor market regime engine, a 5-factor signal quality score, and a complete risk-management layer (SL + TP1/TP2/TP3 + automatic break-even) into one decision-support system. Every signal arrives pre-graded (A / B / C), pre-leveled (SL and three targets drawn on the chart), and pre-contextualized (regime, HTF bias, volume, RSI, ATR percentile — all in one dashboard).
The core problem it solves: classic SuperTrend-style trails fire too many signals in choppy markets, and the trader is left guessing which ones to trust. Synapse Trail Pro keeps the clean visual of an ATR trail but scores each signal 0–100 using multi-factor confluence and tells you the market regime in plain language — so you know at a glance whether the chart wants a trend signal taken or skipped.
This is fully free, open-source Pine v6 — no paywall, no invite, no DM required. Use it, study it, adapt it.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A trail line alone tells you direction. A quality score alone tells you confidence. A regime filter alone tells you environment. None of these are useful in isolation — a high-confidence signal in a choppy regime is still a coin flip, and a clean trail flip in a strong trend with no volume confirmation can still fail.
Synapse Trail Pro fuses them into a single pipeline:
ATR Trail (with optional ratchet) → Direction Flip Detection → Regime Score (ADX + Choppiness + R²) → Quality Score (HTF + Volume + RSI + Regime + Break Strength) → Grade A/B/C → Risk Levels (preset SL + TP1/TP2/TP3) → Break-Even after TP1 → Lifecycle Stats
The trail produces the raw signal. The regime engine tells you whether the market is even capable of trending right now. The quality score weighs five independent confluence factors against that regime. The grade compresses the score into a single letter you can act on. The risk layer then drops your SL, three TPs, and break-even logic onto the chart automatically — so the moment the signal fires, you already see the trade plan.
Without the regime engine, you'd take signals in chop. Without the quality score, you'd treat every flip equally. Without the risk levels, you'd still be calculating SL and TPs manually after the signal. Each component covers a blind spot of the others.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Ratcheted ATR Trail with Adaptive Volatility Multiplier.
The trail center is an EMA (default 21) of close, with bands at ±ATR × multiplier (default base 1.618 — the golden ratio). When the Ratchet option is on (recommended), the lower band only moves up in a long position and the upper band only moves down in a short — never loosens, only tightens. On a direction flip, the band resets to its raw value.
When the Adaptive Volatility Multiplier is on, the base multiplier auto-scales based on the 100-bar ATR percentile rank:
— Low vol (rank < 30) → multiplier × 0.8 (narrower band, catch the move earlier)
— Mid vol (30–70) → multiplier × 1.0 (default)
— High vol (rank > 70) → multiplier × 1.25 (wider band, avoid noise wicks)
Why this matters: a fixed multiplier overreacts in calm markets and gets whipsawed in volatile ones. Percentile-rank scaling keeps the trail behavior consistent across market conditions.
2️⃣ Composite Market Regime Score (0–100) — three-factor blend.
Each bar, three independent measurements vote on whether the market is trending or choppy:
— ADX (weight 40%) : standard Directional Movement ADX, length 14. Score = min(ADX / 50 × 100, 100). High ADX = strong directional pressure.
— Choppiness Index (weight 35%) : ChopIdx = 100 × log10(sum(TR, N) / (highest(high, N) − lowest(low, N))) / log10(N), then inverted to a trend score: chopScore = 100 − ChopIdx. Length 14. Low choppiness = clean directional movement.
— R² Linearity (weight 25%) : R² = correlation(close, bar_index, 50)². Measures how linearly price is moving. R² near 1 = clean trend, R² near 0 = pure noise.
Final regime score = ADX × 0.40 + chopScore × 0.35 + R² × 100 × 0.25.
Thresholds:
— Score ≥ 60 → Trending (green)
— Score < 35 → Choppy (red) — signals flagged with ⚠ or hard-skipped
— Between → Mixed (yellow)
Why three indicators instead of one: ADX measures strength but lags. Choppiness measures range expansion but can spike on news. R² measures linearity but is noisy on short windows. Combined and weighted, they cover each other's failure modes.
3️⃣ 5-Factor Quality Score (0–100) with letter grading.
When a trail-flip signal fires, it's scored on five confluence factors:
— HTF Bias (max 30 points) : higher-timeframe (4× current TF by default) EMA-50 bias. Match = 30, against = 0, HTF data missing or filter off = 15 (neutral credit).
— Volume Confirmation (max 20 points) : volume > 20-bar SMA × 1.3 (configurable). Auto-bypassed and given full credit on volume-less instruments (FX).
— RSI Momentum (max 20 points) : bullish signal needs RSI > 50, bearish needs RSI < 50.
— Regime Score (max 20 points) : regimeScore × 0.20.
— Break Strength (max 10 points) : how far past the band close pierced, capped at 3 × ATR. breakStrength = min(|breakDist| / ATR, 3) / 3 × 100, then × 0.10.
Grades:
— Score ≥ 75 → A (high-quality, all factors aligned)
— Score ≥ 55 → B (acceptable, most factors aligned)
— Score < 55 → C (weak — most factors against, consider skipping)
A "Min Quality Score" input lets you hide everything below a threshold (e.g., set to 55 to show only A and B grades).
4️⃣ Risk Presets with Per-Trade Snapshot Locking.
Four risk presets (plus Custom) auto-set SL × ATR and TP1/TP2/TP3 as R-multiples:
— Conservative : SL 2.5 × ATR, TP 1R / 2R / 4R
— Balanced (default): SL 1.5 × ATR, TP 1R / 2R / 3R
— Aggressive : SL 1.0 × ATR, TP 1.5R / 2.5R / 4R
— Scalping : SL 0.8 × ATR, TP 0.8R / 1.5R / 2R
— Custom : full manual control
Critical detail: SL and TP multipliers are snapshotted at entry . If you change the preset mid-trade, the open position keeps its original levels — and the Avg R statistic stays accurate (each closed trade contributes its own-time R values).
5️⃣ Break-Even Logic with Diagnostic BE-Save Counter.
When Break-Even After TP1 is on (recommended), reaching TP1 automatically moves the stop-loss to entry price. From the next bar onward, any wick at entry stops out at break-even instead of original SL — letting winners run risk-free to TP2/TP3.
A dedicated BE Saves counter on the dashboard tracks wins that closed because BE-stop fired (TP1 reached but TP3 didn't). A high BE-save ratio is a diagnostic signal that your TP3 may be too far — consider tightening.
6️⃣ Same-Bar Hit Guard + Realistic Closure Logic.
Two guards prevent unrealistic results:
— Entry-bar hold : SL/TP hits are ignored on the entry bar itself. A hairpin wick can't instantly stop out a fresh position.
— Same-bar SL+TP1 : if both SL and TP1 are hit on the same bar, the trade closes as a LOSS (conservative — mirrors realistic broker behavior on a single wick).
Closures are routed through a single classifier function so flip-closures, SL-closures, and TP3-closures are all tallied identically.
7️⃣ Flip Detection + Dedicated Flip Alert.
A "flip" is when an opposite signal fires while a position is still active. The old trade is classified and counted (its TP-reached state determines W/L and R-multiple), THEN the new position opens. A dedicated POSITION FLIP alert fires in addition to the new buy/sell alert, with from-direction, to-direction, prior entry, and new entry — useful for closing managed positions externally.
8️⃣ Unified Dashboard with Three Toggleable Sections.
One positioned table with three sections you can switch on/off individually:
— Trade section : Direction (with grade), SL (with BE marker), TP1/TP2/TP3 (with ✓ on hit), Risk % / R:R with unicode gauge, Bars in Trade.
— Market section : Regime (with 0–100 gauge), HTF bias, Volume status, RSI, ATR | Volatility-rank with adaptive multiplier.
— Statistics section : Total signals + grade breakdown (A:N B:N C:N), Buy/Sell split, Closed trades, W/L, Win rate, Avg R-multiple, BE Saves, Flips.
Dynamic section headers carry live context (e.g., "─── Trade · LONG · 23 bars ───") so the divider itself summarizes state.
9️⃣ Three Trail Visual Schemes for Different Aesthetics.
— Adaptive (Bull/Bear) : classic bright green/red — high visibility.
— Premium Indigo (recommended): muted indigo (long) and earth-brown (short) — financial-terminal aesthetic, never competes with green TP lines.
— Monochrome : neutral grey for ultra-minimal charts.
Optional Double Trail Line adds a dashed secondary line offset by a fraction of ATR (configurable 0.05–1.0 × ATR), creating a "channel" visual. The dashed segments are drawn via a ring-buffer of line.new(... line.style_dashed) instead of plot() — this produces PulseWire's native dashed look that plot() can't render natively.
🔟 Theme Auto-Detection + Premium Color Palette.
The indicator detects whether your chart background is dark or light (using color.r(chart.bg_color) < 128) and adapts every palette element accordingly. Theme can also be force-set to Dark or Light. Light-theme variants use deeper, more saturated colors to maintain contrast (e.g., deep crimson SL on white, dark amber for BE).
All label text colors are calibrated for ≥4.5:1 contrast against their background (e.g., dark green text on bright green long labels = 7.8:1 ratio).
1️⃣1️⃣ Webhook-Ready JSON Alerts with Full Payload.
Every buy/sell/flip/SL-hit/TP-hit/BE-activation event can fire as plain text OR structured JSON. The JSON payload includes action, ticker, timeframe, price, SL, TP1/TP2/TP3, R:R, grade, quality score, regime, choppy flag, and flip flag — ready for any webhook automation.
🧠 HOW IT WORKS — STEP BY STEP
Step 1 — ATR + Trail Center: ATR(13) and EMA(21) of close are computed. Raw bands = EMA ± ATR × multiplier (base 1.618).
Step 2 — Adaptive Multiplier (optional): If on, the multiplier scales by 100-bar ATR percentile (×0.8 / ×1.0 / ×1.25).
Step 3 — Ratchet Logic (optional): In a long, the lower band can only move up. In a short, the upper band can only move down. On a direction flip, the band resets to raw.
Step 4 — Direction Flip Detection: Close > prev upper band → direction = 1 (long). Close < prev lower band → direction = −1 (short). A change in direction is the raw signal.
Step 5 — Regime Score: ADX × 0.40 + ChopScore × 0.35 + R² × 100 × 0.25. Trending ≥ 60, Choppy < 35.
Step 6 — Quality Score: HTF (0/15/30) + Volume (0 or 20) + RSI (0 or 20) + Regime × 0.20 + BreakStrength × 0.10. Grade A ≥ 75, B ≥ 55, C < 55.
Step 7 — Filtering: Min Quality threshold, choppy-skip toggle, barstate.isconfirmed gating.
Step 8 — Risk Levels: SL = entry ± ATR × slMult. TP1/TP2/TP3 = entry ± slDistance × tpMult. All snapshotted to the trade.
Step 9 — Lifecycle: On TP1 first-touch → BE activates (SL → entry). On SL or TP3 → trade closes, classified by tp1Reached (WIN if true, LOSS if false), R-multiple credited (1/3 per TP partition), state reset.
Step 10 — Visuals + Alerts: SL/TP lines drawn forward, labels updated on hit (✓ + cyan), alerts fired with full payload, dashboard updated.
📖 HOW TO USE — BEGINNER GUIDE
🎯 Quick start (5 steps):
1. Add Synapse Trail Pro to your chart on any timeframe.
2. Open Settings. Leave defaults for the first session — they are tuned for general use (Balanced preset, Premium Indigo trail, HTF filter on, BE on).
3. Wait for the first signal to fire (▲ Long or ▼ Short marker). The marker shows the grade (A/B/C) and a ⚠ flag if in choppy regime.
4. Read the dashboard (top-right by default). Note the Direction , Grade , Regime , and the SL/TP1/TP2/TP3 levels — these are your full trade plan.
5. Execute the trade in your broker using the SL and TPs from the dashboard. Optionally partition position 1/3 at each TP.
👁️ Reading the chart:
— 🟢 ▲ Long Grade-letter below a bar = Buy signal. Color matches grade quality.
— 🔴 ▼ Short Grade-letter above a bar = Sell signal.
— ⚠ next to the grade = signal fired in choppy regime (be cautious or skip).
— Trail line = current direction context. Indigo = long bias, terracotta = short bias (in Premium scheme).
— Dashed secondary line = soft/hard limit zone, offset by a fraction of ATR.
— ENTRY line (dotted blue) = your entry reference price.
— SL line (solid red) = your stop-loss.
— TP1 / TP2 / TP3 lines (dashed green) = your take-profit targets. Turn solid teal with ✓ on hit.
— Entry → SL (BE) label in amber = break-even is active (TP1 was reached, SL is now at entry).
📊 Dashboard fields (Trade section):
— Direction : LONG / SHORT / FLAT + Grade letter.
— SL : stop-loss price. Shows "BE @" prefix when break-even is active.
— TP1 / TP2 / TP3 : target prices. ✓ prefix once reached.
— Risk / R:R : distance % from entry to SL + current R:R + visual gauge.
— Bars in Trade : how many bars since entry.
📊 Dashboard fields (Market section):
— Regime : Trending / Mixed / Choppy + 0–100 gauge.
— HTF : higher-timeframe bias (Bullish / Bearish / Flat / off).
— Volume : Confirmed / Weak / no data / off.
— RSI : current 14-period RSI value, color-coded.
— ATR | Vol : ATR value, 100-bar volatility percentile, and current adaptive multiplier.
📊 Dashboard fields (Statistics section):
— Signals : total fired + breakdown (A:N B:N C:N).
— Buy / Sell : directional split.
— Closed : total wins + losses (flip, SL, and TP3 closures all counted).
— W / L : wins / losses.
— Win Rate : TP1-reached = WIN. Color-coded ≥ 55% green, ≥ 45% yellow, else red.
— Avg R : average realized R-multiple per closed trade.
— BE Saves : wins that closed because BE-stop fired (diagnostic).
— Flips : trades closed by opposite signal mid-position.
💡 Beginner trading workflow:
1. Start with the Balanced preset and HTF Bias Filter ON .
2. Only take A-grade or B-grade signals — set Min Quality Score to 55.
3. Skip every signal flagged with ⚠ (choppy regime) until you understand the regime engine — or enable Hard-skip Choppy .
4. Use the Premium Indigo trail scheme — the muted colors keep your focus on the SL/TP levels, not the trail itself.
5. Always partition position 1/3 at each TP — that's what the R-multiple math assumes.
6. After 30–50 trades, review the Statistics section: if Avg R is positive, the setup works. If BE Saves > 30% of wins, consider tightening TP3.
🔧 Tuning guide:
— Too many signals: increase Min Quality Score to 75 (A-grade only), enable Hard-skip Choppy.
— Too few signals: lower Min Quality to 0, turn off HTF filter, switch from Balanced to Aggressive preset.
— Stops too tight: switch to Conservative preset (SL 2.5 × ATR).
— Stops too wide: switch to Scalping preset (SL 0.8 × ATR).
— BE stopping you out too often: disable Break-Even After TP1.
— Trail too jumpy: increase Trail EMA Length from 21 to 34, enable Ratchet.
— Trail too sluggish: decrease Trail EMA Length to 13, decrease ATR Length to 8.
— Chart too busy: turn off Double Trail Line and Regime Background, set Trail History Bars to 50.
⚙️ KEY SETTINGS REFERENCE
⚙️ Main Settings:
— ATR Length (default 13): ATR period for volatility band.
— Base ATR Multiplier (default 1.618 — golden ratio): base band width.
— Trail EMA Length (default 21): EMA period for trail center.
— Adaptive Volatility Multiplier (default off): auto-scale multiplier by 100-bar ATR percentile.
— Ratchet Trail (default on): trail only tightens in position direction.
🔍 Signal Filters:
— Min Quality Score (default 0): hide signals below threshold (0 = all, 55 = B+, 75 = A only).
— Hard-skip Choppy Signals (default off): fully suppress signals in choppy regime.
— Use HTF Bias Filter (default on): Quality Score bonus for HTF-aligned signals.
— HTF for Bias (default empty = auto 4×): higher timeframe for bias check.
— Use Volume Confirmation (default off): bonus when volume > 20-SMA × threshold.
— Volume Threshold (default 1.3): volume × SMA20 to count as confirmation.
🌊 Market Regime:
— ADX Length (default 14)
— Choppiness Length (default 14)
— R² Regression Length (default 50)
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— Custom SL × ATR (default 1.5)
— Custom TP1/TP2/TP3 × Risk (default 1.0 / 2.0 / 3.0)
— Break-Even After TP1 (default on): move SL to entry on TP1.
— Show SL/TP Lines / Labels / % Distance : all on by default.
— Entry / SL / TP Line Styles : Dotted / Solid / Dashed defaults.
🎨 Visual:
— Theme (default Auto)
— Trail Color Scheme (default Adaptive Bull/Bear) — try Premium Indigo for a financial-terminal look.
— Trail Line Width (default 2)
— Trail History Bars (default 0 = all)
— Double Trail Line (default on)
— Double Trail Offset × ATR (default 0.25)
— Show Buy/Sell Labels / Grade / Regime Background / Watermark
📊 Dashboard:
— Show Dashboard (default on) — master toggle
— Position (default Top Right) — 6 positions available
— Trade / Market / Statistics Section toggles
🔔 Alerts:
— Webhook JSON Format (default off): plain text or structured JSON.
— Alert on TP Hits (default off)
— Alert on SL Hit (default on)
— Alert on Position Flip (default on)
🔔 ALERTS
— 🟢 BUY — ticker, TF, price, SL, TP1/TP2/TP3, R:R, grade, quality score, regime, choppy flag, flip flag
— 🔴 SELL — same payload
— 🔄 POSITION FLIP — from-direction, to-direction, prior entry, new entry
— 🛑 SL HIT — entry, SL price, time
— 🛡️ BE STOP-OUT — fires instead of regular SL when break-even was active
— 🎯 TP1 / TP2 / TP3 HIT — first-touch only, no duplicate fires
— 🛡️ BREAK-EVEN — fires the bar TP1 is reached and SL moves to entry
All alerts support plain text and JSON webhook format. All fire bar-close confirmed (alert.freq_once_per_bar_close).
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. Alerts fire once per bar close. The HTF security() call uses the canonical non-repaint pattern (close + ema with lookahead_on), reading the closed HTF bar without future leakage.
— 📐 The trail flip is the raw signal source; quality score and filters only suppress, never invent signals. Same-bar SL+TP1 always resolves as a LOSS (conservative bias toward stop).
— 📐 Statistics counters are session-scoped — they reset on script reload, input change, or by incrementing the "Reset Stats Counter" input. The Stats section is descriptive, not predictive: past behavior on a chart does not guarantee future behavior on the same chart.
— ⚖️ Win = TP1 reached (regardless of how the trade ultimately closed). Avg R assumes 1/3 position partitioned at each TP. These are conventions; your live execution may differ.
— 🛠️ This is an analysis tool, not an automated trading bot. It detects trail flips, scores quality, projects SL/TP zones, and tracks outcomes — trade decisions and execution remain yours.
— 🌐 Works on all markets and timeframes. Volume-based filters auto-bypass on instruments without volume data (FX). Adaptive multiplier and regime engine scale naturally across symbols.
— 📜 Fully open-source Pine v6. Read the code, fork it, adapt it. Feedback and forks welcome. Indicator

Liquidity Pools Pro [WillyAlgoTrader]💧 Liquidity Pools Pro is a fully free overlay indicator that automatically detects liquidity zones (equal highs and equal lows), scores them on a 4-factor strength model, catches sweeps (liquidity grabs) with reversal confirmation, and instantly delivers a complete trade plan: entry, stop-loss, three take-profits, and automatic break-even on TP1.
It unifies into a single coherent engine what traders usually have to assemble from 5–7 separate scripts: an adaptive pivot detector, a 4-factor pool scoring system (touches + recency + volume + HTF), sweep detection with close-back confirmation, an ATR-based risk calculator, risk presets, and an informative dashboard.
Works on any instrument (BTC, EURUSD, stocks, indices, futures) and any timeframe without retuning — every threshold is scaled through ATR.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A simple pivot detector just plots dots. A simple sweep signal fires on every wick. A plain ATR stop-loss ignores context. Individually these are noise. Combined, they form a complete mechanism for identifying zones where smart money harvests liquidity, and trading the reversal from them.
Integration chain:
Adaptive Pivot Detection → ATR-based Equality Tolerance → Pool Matching & Clustering → 4-Factor Strength Scoring → HTF Confluence Boost → Sweep Detection (wick + close-back) → Risk Engine (SL/TP/BE) → Position Lock + State Machine → Dashboard + Alerts
— The pivot detector adapts to volatility: length grows when ATR is high (less noise on crypto) and shrinks when ATR is low (faster reaction on forex).
— Tolerance in ATR units lets the engine treat highs/lows as "equal" on any instrument — no manual tick configuration.
— Matching clusters pivots into pools (multiple touches at one zone = thicker liquidity).
— Scoring filters out weak pools and highlights exactly the ones price returns to for stop-runs.
— HTF Confluence adds +20 to strength when a pivot on the higher timeframe aligns — a filter against lower-timeframe traps.
— Sweep is identified as a wick beyond the level + close back inside (classic failed breakout / liquidity grab).
— The risk engine builds a complete trade plan for each signal and trails the stop to break-even after TP1.
— Position Lock prevents opposite signals from silently overwriting the SL/TP of an open position.
Remove any one link and the chain breaks. Sweeps without scoring = noise. Scoring without sweeps = pretty boxes that never trigger. Risk engine without position lock = silent overwrite of an open trade. This pipeline solves all three problems.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Adaptive Pivot Length — pivot length that adjusts itself to the market.
Most indicators use a fixed pivot length (5, 10, 20). That works on one timeframe of one instrument — and breaks on anything else.
Here the length is computed dynamically:
— volRatio = ATR(14) / ATR(50)
— adaptiveLen = round( clamp( 10 / max(0.5, volRatio), 4, 16 ) )
In high-volatility regimes (volRatio > 1) length shrinks to 4–6 bars — the indicator reacts faster. In low-volatility regimes (volRatio < 1) length grows to 14–16 bars — small noise is filtered out. Can be disabled and set manually (default 8 when Adaptive is OFF).
2️⃣ ATR Equality Tolerance — scale-invariant definition of "equal" levels.
Two pivots are treated as touches of the same liquidity zone if the distance between them ≤ ATR × tolerance (default 0.25).
— 0.15 = strict (tight pools, fewer matches)
— 0.25 = balanced (recommended)
— 0.50 = loose (wider pools, more matches)
This solves a fundamental problem: on BTCUSD, "equal within $50" is normal; on EURUSD the same value is huge. ATR-based tolerance gives one setting that works across all instruments.
3️⃣ 4-factor Strength Score — pool weight on a 0–100 scale.
Every pool is scored as the sum of four components, clamped to 0–100:
— 🎯 Touches (up to 35 points) : (touchCount − 1) × 9, capped at 35. One pivot = 0, two = 9, three = 18, four = 27, five+ = 35.
— ⏳ Recency (up to 35 points) : 35 × 0.5^(ageBars / halfLife). Fresh pool = 35, after one half-life = 17.5, after two = 8.75. Default halfLife = 150 bars.
— 📊 Volume (up to 20 points) : log(max(1, cumVol / median)) × 8, capped at 20. Accumulated on every bar that touches the zone — not just the pivot bar.
— 🔭 HTF Confluence (+20 bonus) : if a higher-timeframe pivot exists within tolerance × 1.5 — +20 added to the total.
Examples:
— Fresh 1-touch pool, no volume, no HTF: 0 + 35 + 0 + 0 = 35
— Fresh 2-touch pool: 9 + 35 + 0 + 0 = 44
— Fresh 3-touch pool with 2× median volume: 18 + 35 + 5.5 + 0 = 58.5
— Old (1 half-life) 2-touch pool: 9 + 17.5 + 0 + 0 = 26.5
4️⃣ Sweep Detection with close-back confirmation — real liquidity grabs, not false wicks.
Pool state transitions follow strict logic:
— STATE_ACTIVE → STATE_SWEPT: wick pierced the level but bar closed beyond it (this is a breakout, not a reversal)
— STATE_ACTIVE → STATE_MITIGATED: wick pierced AND bar closed back inside (real liquidity sweep)
The default signal (Require Body Reversal = ON) only fires on MITIGATED. This is classic SMC "fakeout → reversal" logic. Disable it and any wick sweep will fire (more aggressive, more noise).
5️⃣ Volume-at-Level Accumulation — real volume at the level, not just at the pivot.
Most indicators count volume only on the pivot bar. That's misleading — true liquidity accumulates across all the touches.
Here, on every confirmed bar the engine checks for a zone touch (high or low inside levelBot–levelTop), and if found, adds the bar's volume to the pool's cumVol. Across 40 active pools this is O(P) per bar — fast.
6️⃣ HTF Confluence Engine — higher-timeframe pivots as a filter.
When enabled, pivots from the configured HTF (default 4H) are requested via request.security with lookahead_on on a closed bar (no repaint). If a pool aligns with an HTF pivot within tolerance × 1.5 — +20 is added to its score.
Used to filter signals: HTF-confluent pools cross the strength threshold faster.
7️⃣ 5 Risk Presets + Custom — ready-made SL/TP per trading style.
— Conservative: SL 2.5×ATR, TP 1R/2R/4R
— Balanced: SL 1.5×ATR, TP 1R/2R/3R (default)
— Aggressive: SL 1.0×ATR, TP 1.5R/2.5R/4R
— Scalping: SL 0.8×ATR, TP 0.8R/1.5R/2R
— Custom: manual multipliers
Calculation:
— slDistance = ATR(14) × slMult
— entry = close on the signal bar
— SL = entry ∓ slDistance
— TP1/2/3 = entry ± slDistance × tpMult
8️⃣ Automatic Break-Even after TP1 — stop trails to entry on its own.
After TP1 is touched (and SL didn't fire on the same bar), the active SL is moved to entry. From that point on, any pullback to entry = break-even exit. TP2/TP3 logic continues to track.
Edge case is handled: if both TP1 and SL fire on the same bar, the stop is evaluated against the ORIGINAL value (effectiveSL captured before the BE update). No "magic" loss-saving.
9️⃣ Position Lock — protection against silent trade overwrites.
While a trade is active (activeDir ≠ 0), new signals are blocked. Exception: if the current bar is closing the position (SL or TP3 hit), it's treated as "closing now" and an opposite signal is allowed through.
Without this protection, a fresh signal would silently overwrite the SL/TP of an open position — critical for both manual trading and webhook-based autotrading.
🔟 Pro-style visuals with adaptive contrast.
— Liquidity zones: colored boxes with transparency tied to strength (transparency = 88 − strength × 0.33)
— Mid-line: dotted line through the center of each zone
— Pool labels: SSL/BSL × touch count volume
— SL: solid red line (dims when BE activates)
— Entry: dotted blue
— TP1/2/3: dashed green (turn cyan + ✓ when hit)
— Themes: Auto/Dark/Light with WCAG AA contrast on every background
1️⃣1️⃣ Full alert suite for autotrading — JSON or plain text.
Every signal and trade event triggers alert() in one of two formats:
— Plain text: "🟢 SWEEP BUY | TICKER | TF | Price: X | Pool: 58/100 | SL: ... | TP1: ... | TP2: ... | TP3: ... | R:R: 1.0"
— JSON for webhooks: {"action":"buy","ticker":...,"tf":...,"price":...,"sl":...,"tp1":...,"tp2":...,"tp3":...,"rr":...,"pool_strength":...}
All alerts use alert.freq_once_per_bar_close (no intra-bar duplicates).
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Pivot detection: on each bar, ta.pivothigh and ta.pivotlow are evaluated with the dynamic left length (adaptiveLen) and the configured right confirmation.
Step 2 — Matching: each new pivot is compared against all active pools of the same type (high/low). If distance ≤ tolerance AND age ≤ maxLookback, it's added as a new touch (level is recalculated as a weighted average).
Step 3 — Pool creation: if no match is found, a new pool is created with touchCount = 1 and the current volume. The HTF bonus is applied if confluent.
Step 4 — Volume accumulation: on each confirmed bar, if high or low touches an active zone, the bar's volume is added to that pool's cumVol.
Step 5 — Strength compute: on demand (lazy), the final strength is calculated using the 4-factor formula.
Step 6 — Sweep check: for every active pool, wickSweep (wick beyond the level) and closeBack (close back inside) are evaluated. State becomes MITIGATED if both true; SWEPT if only wickSweep.
Step 7 — Signal generation: if pool strength ≥ minStrengthSignal AND mitigation is confirmed (or Body Reversal is OFF) AND signals are enabled — a BUY/SELL fires.
Step 8 — Risk setup: on a confirmed signal, entry/SL/TP1/TP2/TP3 are constructed, position lock is engaged, and lines + labels are drawn.
Step 9 — Trade tracking: every bar, SL/TP1/TP2/TP3 hits are evaluated with same-bar-misfire protection (justOpened flag).
Step 10 — Break-even: on TP1 first touch (without simultaneous SL hit), SL is moved to entry, the original SL line dims, and the ENTRY label gets a "→ SL (BE)" suffix.
Step 11 — Auto-reset: on SL hit or TP3 hit, all trade-state variables reset, lines are deleted, position = FLAT.
Step 12 — Pruning: when active pools > maxActivePools (default 40), the oldest swept pool is removed first, then the weakest active pool.
📖 HOW TO USE — STEP-BY-STEP FOR NEWCOMERS
🎯 Quick start (5 minutes):
1. Add the indicator to any instrument and any timeframe.
2. Wait 50–100 bars for the warmup period — the indicator needs to accumulate ATR and pivot history.
3. Keep the dashboard ON (default position: Top Right) — it shows how many pools are tracked.
4. Pick a Risk Preset for your style: Scalping for M1–M5, Balanced for M15–H1, Conservative for H4–D1.
5. Create an alert: right-click on the chart → Add alert → Condition: Liquidity Pools Pro → Any alert() function call → Frequency: Once per bar close.
👁️ Reading the chart:
— 🔴 Red box = Sell-Side Liquidity (SSL) = equal highs where long stops sit. Price tends to wick into them to harvest stops.
— 🟢 Green box = Buy-Side Liquidity (BSL) = equal lows where short stops sit.
— 🔢 Number in brackets = pool strength, 0–100. Higher = thicker liquidity.
— ✖ ×3, ×4 = number of touches at this zone. More touches = more reliable.
— 📊 2.5M, 850K = cumulative volume traded at the level.
— ⚪ Dimmed gray box = swept or mitigated pool (already triggered).
— 🟢 "Long" below the bar = buy signal (BSL sweep + reversal).
— 🔴 "Short" above the bar = sell signal (SSL sweep + reversal).
— 🔵 Blue dotted line = ENTRY.
— 🔴 Red solid line = SL (stop-loss).
— 🟢 Green dashed lines = TP1/TP2/TP3. Cyan with ✓ = already hit.
— 🟠 Amber ENTRY label with "→ SL (BE)" = stop has been moved to break-even.
📊 Dashboard fields:
— Symbol / TF: current instrument and timeframe.
— Pivot Len: pivot length (with "(adapt)" tag when Adaptive is ON).
— Active Pools: total active pools and side breakdown (↑ highs, ↓ lows).
— Strong SSL ↑ / Strong BSL ↓: price and strength of the strongest pool on each side.
— Nearest Above / Below: pools closest to current price.
— Stats: Mit:N Sig:M/T — number of mitigations, signals, total pools. If Sig = 0 — lower the sensitivity (see Tuning).
— Position: current trade state (LONG/SHORT/FLAT).
— SL / TP1 / TP2 / TP3: levels of the active trade. ✓ = hit. "BE @" = stop at break-even.
— Plan R:R: TP1 multiplier (1.0R, 1.5R, 2.0R, etc.).
— Risk %: percent risk from entry to SL.
🔧 Tuning guide — when something feels off:
— Too few signals (Stats Sig: 0/N): lower Min Pool Strength for Signal from 25 to 15. Or disable Require Body Reversal — pure wick sweeps will fire.
— Too many signals, lots of noise: raise Min Pool Strength to 40 (only 2-touch pools) or 60 (only strong multi-touch with volume). Enable HTF Confluence.
— Too many zones, chart is crowded: raise Min Strength to Display to 30–40 — weak pools will be hidden but still tracked internally.
— Zones too narrow, false equality: increase Equality Tolerance from 0.25 to 0.40.
— Zones too wide, catching everything: decrease Equality Tolerance to 0.15.
— Stops getting hit too often: switch from Balanced to Conservative (SL 2.5×ATR instead of 1.5×ATR).
— Signals appear but no position opens: a trade is already active (Position Lock). Check the Position row in the dashboard.
— Strange scoring on forex: disable Volume-Weighted Strength (forex often lacks reliable volume data).
💡 TRADING IDEAS
— Manual trading on signals: only take trades where pool strength ≥ 50 and HTF Confluence is enabled.
— Zones only, no signals: disable Enable Sweep Signals and use the indicator as a pure liquidity map for manual setups.
— Scalping setup: preset Scalping + M1–M5 + Min Strength 15 + Adaptive Pivot ON.
— Swing setup: preset Conservative + H4–D1 + Min Strength 50 + HTF Confluence ON (Daily HTF).
— Webhook autotrading: enable Webhook JSON Format + alert.freq_once_per_bar_close + connect a bot to the JSON payload.
— Confluence with other indicators: combine signals with a trend filter (EMA50, SuperTrend) — only longs above EMA50, only shorts below.
⚙️ KEY SETTINGS
🎯 Liquidity Detection:
— Adaptive Pivot Length (default ON): auto-adjust pivot length to volatility.
— Manual Pivot Length (8): used when Adaptive is OFF.
— Right Confirmation Bars (2): bars to the right needed to confirm a pivot.
— Equality Tolerance ×ATR (0.25): level equality threshold.
— Max Pivot Lookback (200): how far back to search for matches.
— Max Active Pools (40): hard cap on simultaneously tracked pools.
💪 Strength Scoring:
— Min Strength to Display (0): pools below this score are hidden (visual only).
— Strength Half-Life (150): bars after which the recency factor halves.
— Volume-Weighted Strength (ON): include the volume factor in scoring.
📡 Sweep Signals:
— Enable Sweep Signals (ON): generate BUY/SELL signals.
— Min Pool Strength for Signal (25): minimum pool strength to fire.
— Require Body Reversal (ON): require close-back inside the level (recommended).
🔭 HTF Confluence:
— Enable HTF Confluence (default OFF): use higher-timeframe pivots as a filter.
— Higher Timeframe (240 = 4H): which HTF to query.
🛡️ Risk Management:
— Risk Preset (Balanced): Conservative / Balanced / Aggressive / Scalping / Custom.
— ATR Length (Risk) (14): ATR period for SL distance.
— Custom SL/TP1/TP2/TP3 ×ATR / ×Risk : manual multipliers.
— Show SL/TP Lines & Labels (ON): draw trade levels on the chart.
— Break-Even After TP1 (ON): auto-trail stop to entry.
— Show % Distance on Labels (ON): append % from entry to SL/TP labels.
🎨 Visual:
— Theme (Auto): Auto / Dark / Light with adaptive contrast.
— Show Liquidity Zones / Strength Bar / Labels / Volume / Swept Zones / Buy-Sell Markers / Watermark : visual toggles.
— Label Font Size / Signal Marker Size : Tiny → Huge.
📊 Dashboard:
— Show Dashboard (ON), Position (Top Right): corner placement.
🔔 Alerts:
— Webhook JSON Format (OFF): JSON or plain text.
— Alert on SL Hit (ON), Alert on TP Hits & BE (OFF): alert toggles.
🎨 Colors:
— Bullish (Demand) Color / Bearish (Supply) Color : zone colors.
🔔 ALERTS
— 🟢 SWEEP BUY — BSL sweep + reversal, payload: ticker, tf, price, sl, tp1, tp2, tp3, rr, pool_strength
— 🔴 SWEEP SELL — SSL sweep + reversal, same payload structure
— 🛑 SL HIT — stop-loss triggered (or 🛡️ BE STOP-OUT when Break-Even is active)
— 🎯 TP1 HIT / 🎯 TP2 HIT / 🏆 TP3 HIT — take-profit hits (only fired when SL didn't trigger on the same bar)
— 🛡️ BREAK-EVEN — stop moved to entry
All alerts support both plain text and JSON webhook formats. All fire on alert.freq_once_per_bar_close — no intra-bar duplicates and no repaint.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Signals are generated only on barstate.isconfirmed (closed bar). Pivots are confirmed with a right window of rightConfirmInput bars (default 2) — meaning the actual swing point is in the past by N bars, but the indicator does not redraw already-drawn pools. HTF data via request.security uses lookahead_on on the offset bar — a standard non-repainting technique.
— 📐 Warmup period: the first 50+ bars (max(50, atrLenRisk + 10)) the indicator does not generate signals — it accumulates ATR and pivot history.
— ⚖️ Position Lock is not absolute against opposite signals: if the active trade closes on the current bar (SL or TP3 hit), an opposite signal will pass. This is by design — instant two-way blocking is impossible.
— 📊 Volume factor is optional: on forex instruments without reliable volume, disable Volume-Weighted Strength.
— 🛠️ This is an analysis tool, not a trading bot. The indicator detects liquidity zones, scores them, identifies sweeps, and proposes a trade plan — but the decision to open a position is yours. Past performance does not guarantee future results. Test on demo before trading live.
— 🌐 Universal compatibility: works on any instrument (crypto, forex, stocks, indices, futures) and any timeframe (M1 → M).
Version v1.1.5. Fully free. Open-source. Indicator

Trendline Retest Planner [AGPro Series]Trendline Retest Planner
🧠 Core Idea
Is the active trendline retest constructive enough to keep the setup under review, or is it starting to fail?
📌 Overview / What it does
Trendline Retest Planner is a chart-first decision tool for traders who review price behavior around active support and resistance trendline retests.
Instead of drawing many trendlines or flagging every break, the script focuses on one active trendline retest context at a time. It measures line age, touch count, retest depth, close response, and volume support, then converts that evidence into a 0-100 Retest Score and a clear next-action state.
The script produces an active trendline, retest pocket, hold/fail labels, invalidation edge, target path, alerts, and a compact AGPro planning panel. It does not predict price movement, automate execution, or provide guaranteed outcomes.
🎯 Purpose & Design Philosophy
This script was built to fill the gap between auto-trendline drawing and practical retest planning.
Many tools can draw diagonals or detect a break. The harder question is what to do after price returns to the line: is the retest holding, weakening, failing, or still waiting for confirmation?
Trendline Retest Planner supports a decision workflow: identify the active retest, read the score, locate the invalidation edge, compare the target path, and decide what deserves review next.
⚡ Why This Script Is Different
Most trendline tools focus on drawing many lines, ranking confluence, or detecting trendline breaks.
This script does NOT clone Auto Trendline Break Quality, Auto Trendlines MTF - Break/Retest, Trendline Confluence Map, Break-Retest Quality, Structure Retest Planner, Swing Retest Quality, or a generic support/resistance zone map.
Instead, it narrows the workflow to one active support or resistance trendline retest and evaluates whether that retest is constructive or failing. The main output is not a buy or sell signal. It is a decision state: READY, MONITOR, FAILING, INVALIDATED, WATCH, WAIT, or SCAN.
⚙️ Methodology
1. Context Detection
The script builds the latest support and resistance trendline candidates from confirmed swing pivots, then selects the nearest valid retest context.
2. Reference Mapping
It maps the active trendline, a retest pocket around the line, an invalidation edge, and a forward target path.
3. Reaction Evaluation
The 0-100 model scores line age, touch count, retest depth, close response, and volume support.
4. Visual Output
The chart shows the active planning objects, compact state labels, and a clean AGPro decision panel.
🗺️ How to Read the Chart
Trendline = the active support or resistance line being evaluated.
Retest Pocket = the ATR-based area around the trendline where a retest is considered active.
Invalidation Edge = the planning reference where the active retest context is considered broken.
Target Path = a forward guide based on the trendline-to-risk distance.
Labels = compact TEST, READY, MONITOR, WEAK, INVALID, PATH, and sparse context labels.
Colors = teal marks support-side retest context, pink marks resistance-side retest context, amber marks caution, indigo marks monitoring/follow-through, and red marks invalidation.
Panel = the AGPro panel summarizes Trendline Side, Retest Score, Hold State, Risk Edge, and Action.
🚦 Signals & States
• READY → the retest is active, holding on the correct side, and the score is strong enough for structured review.
• MONITOR → the retest is developing, but confirmation or score quality is still incomplete.
• FAILING → price touched the pocket, but the response is weak or on the wrong side.
• INVALIDATED → price crossed the invalidation edge and the active context should be rebuilt.
• WATCH → price is approaching the trendline pocket.
• WAIT → a valid trendline exists, but price is not close enough for useful retest review.
• SCAN → no valid trendline context is active yet.
🔔 Alerts Logic
Alerts trigger when price touches the active retest pocket, when READY state appears, when MONITOR state appears, when a failing retest is detected, when the invalidation edge is crossed, and when follow-through appears after an active retest.
Alerts are attention markers only. They are not trade instructions, automated strategy commands, or outcome promises.
🧩 Confluence Logic
The strongest context appears when the active line is fresh enough, has enough touches, retests with controlled depth, closes back on the correct side, and receives supportive relative volume.
When these components conflict, the panel moves toward MONITOR, FAILING, WATCH, WAIT, or INVALIDATED.
📊 When to Use
• Trendline support retests during constructive pullbacks
• Trendline resistance retests during bearish continuation attempts
• Price-action review after a diagonal support or resistance line is already visible
• Retest planning where invalidation and target path matter
• Liquid markets where pivots, candles, and volume behavior are readable
⚠️ When NOT to Use
• Very low-liquidity symbols with irregular candles
• Extremely noisy micro-timeframes
• News-driven spikes where trendline geometry becomes distorted
• Markets where swing pivots are too compressed to form useful lines
• Situations where the user expects a signal-only or auto-trading tool
🎛️ Key Inputs
• Trendline Side → selects Auto, Support Retest, or Resistance Retest.
• Trendline Pivot Length → controls how confirmed swing anchors are detected.
• Max Trendline Age → controls how old a trendline can be before it is ignored.
• Touch Count Lookback → controls how extra line touches are counted.
• Sensitivity → adjusts retest pocket width and activation distance.
• READY Score → sets the score threshold for stronger review states.
• Label and Panel Font Size → controls chart-label and panel readability.
• Panel Location and Theme → adjusts the AGPro panel layout.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first and decision-led.
The active trendline is the main reference. The retest pocket is drawn around that line with centered text so the chart stays readable. The invalidation edge and target path explain where the planning context weakens and what forward room is being mapped.
The AGPro panel uses a merged blue title row and five compact rows so the user can read side, score, hold state, risk edge, and action quickly.
🧪 Practical Usage Workflow
1. Read the panel state and Retest Score.
2. Check whether price is approaching or touching the retest pocket.
3. Compare current price with the invalidation edge.
4. Review whether the label says TEST, READY, MONITOR, WEAK, INVALID, or PATH.
5. Confirm the broader market context before making any decision.
🔍 Interpretation Guidelines
Think in terms of retest quality, not prediction.
A higher score means multiple retest components align inside the script's rule set. A weaker score means the line may be too old, the retest may be too shallow, too deep, missing a constructive close, or lacking participation.
The script helps organize the review process. It does not replace judgment.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not a guaranteed signal tool
• Not a broad auto-trendline map
• Not a trendline confluence scanner
• Not a break-and-retest scanner
• Not a generic support/resistance zone map
• Not an order block, FVG, or supply/demand tool
⚠️ Limitations & Transparency
• Pivot-based trendlines appear only after pivots are confirmed.
• Scores can vary across symbols, sessions, and timeframes.
• Volume scoring depends on exchange-provided volume data.
• Fast volatility can cross a trendline before a clean retest can be measured.
• In Live Updating mode, active-bar values can change before the bar closes.
🧠 Market Context Notes
Trendline retests are easiest to interpret when liquidity, volatility, and swing structure are readable.
A trendline touch is not enough by itself. Line quality, response, invalidation distance, and target path all matter.
🧾 Use Case Examples
When price returns to an upward support trendline and closes back above the pocket with a high score, the panel may move toward READY.
When price touches a downward resistance trendline but cannot close back below it, the planner may move toward FAILING or INVALIDATED.
When price is near the line but has not touched the pocket yet, the panel can stay in WATCH or WAIT.
🧱 System Philosophy
Trendline Retest Planner follows the AGPro decision-engine approach: identify context, score quality, map risk, show the next action, and keep the chart readable.
It is designed to help traders evaluate a specific planning question instead of adding another generic signal layer.
🔐 Non-Promise Statement
No score, label, alert, or chart object guarantees any market outcome.
The script organizes retest context and highlights conditions for review. It does not provide certainty.
📉 Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions, position sizing, execution, and risk management.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use the planner as a structured reading layer: trendline context first, retest quality second, invalidation and target path third, broader market context always.
Indicator

Target Path Quality [AGPro Series]Target Path Quality
🧠 Core Idea
Is the path toward the next practical target reference clean, blocked, or too risky to review?
📌 Overview / What it does
Target Path Quality is a chart-first target path planning tool built to evaluate the route between current price and a practical target reference.
Instead of drawing a target and implying certainty, the script studies the path itself. It maps a forward path corridor, recent structure blockers, target room, invalidation context, a 0-100 Path Quality score, state labels, alerts, and a clean AGPro decision panel.
It does not predict that a target will be reached, automate execution, print buy/sell commands, or replace broader market context. Its purpose is to help traders judge whether the route toward a target is clean enough to deserve attention.
🎯 Purpose & Design Philosophy
This script was built for traders who already have a directional idea but need a cleaner way to evaluate the target path before focusing on execution.
Many tools draw target levels, projection zones, or take-profit ladders. Those visuals can be useful, but they often skip the more important question: what is between current price and the target?
Target Path Quality fills that gap by converting path cleanliness, blockers, risk edge, target room, volatility fit, and reaction history into one readable decision workflow.
⚡ Why This Script Is Different
Most tools focus on where price could go.
This script does NOT promise a target hit, build a take-profit ladder, or behave like a projection suite.
Instead, it asks whether the route toward the target reference is structurally clean, blocked by recent pivots, too close to justify attention, or too exposed to invalidation risk.
⚙️ Methodology
1. Context Detection
The engine identifies the active path side using EMA context or the user-selected directional mode.
2. Reference Mapping
The script maps a practical target reference, an invalidation review rail, and a forward path corridor.
3. Reaction Evaluation
It evaluates structure blockers, target-room distance, risk edge, trend support, volatility fit, and recent directional reaction history.
4. Visual Output
The result is shown through a centered path corridor label, blocker markers, target/invalidation rails, compact event labels, deterministic alerts, and a premium AGPro panel.
🗺️ How to Read the Chart
Path Corridor = the active review route between current price and the practical target reference. Its label is centered inside the corridor.
Blocker Markers = recent confirmed pivots sitting inside the path. These represent possible structural obstacles.
Target Rail = the practical target reference used for path-quality review. It is not a guaranteed destination.
Invalidation Rail = the risk edge behind the active path. It is an analytical reference, not a stop recommendation.
Labels = compact state markers such as PATH READY, WATCH PATH, BLOCKED PATH, TARGET REVIEW, or INVALID REVIEW.
Colors = teal supports cleaner long-side path quality, pink supports short-side or risk context, amber marks blocker/review states, and indigo marks target-reference context.
Panel = summarizes Path Quality, Blockers, Target Room, Risk Edge, and Action.
🚦 Signals & States
• PATH READY → the path quality score is strong, target room is acceptable, and blockers are limited.
• WATCH PATH → the route is improving but does not meet the strongest review conditions.
• BLOCKED PATH → one or more structure blockers reduce route cleanliness.
• TARGET REVIEW → price has reached the active target reference area and context should be reviewed.
• INVALID REVIEW → price crossed the active invalidation rail and the path should be reassessed.
• WAIT → the current route does not provide enough path quality for active review.
🔔 Alerts Logic
Alerts can trigger when the path becomes ready, enters watch mode, becomes blocked, reaches the target reference review area, or crosses the invalidation review rail.
Each alert is an attention marker. Alerts are not trade instructions, entry commands, exit commands, or automated strategy rules.
🧩 Confluence Logic
Path quality improves when target room is practical, blockers are limited, EMA context supports the active side, volatility is neither too quiet nor overheated, and recent candles show directional reaction history.
When these elements align, the route becomes cleaner. When blockers or invalidation risk rise, the route becomes weaker.
📊 When to Use
• When reviewing a directional setup that already has a target idea
• During breakout continuation review
• During pullback continuation planning
• When comparing whether target room is clean or structurally blocked
• When a trader wants target context without a promise-based target tool
⚠️ When NOT to Use
• Extremely low-liquidity symbols
• Very noisy ranges where pivots form too frequently
• News-driven volatility spikes
• Markets where target references are too close to current price
• Situations where broader context contradicts the active path
🎛️ Key Inputs
• Path Side → controls whether the script evaluates Auto, Long Path, or Short Path context.
• Sensitivity → changes pivot strictness and blocker selectivity.
• Target Path Lookback → controls how far back the script searches for target references and blockers.
• Minimum / Ideal / Maximum Target Room ATR → controls how target room affects the score.
• Max Clean Path Blockers → defines how many blockers are tolerated before the path becomes blocked.
• Label and panel settings → control visibility, location, theme, and font sizes.
🖥️ Interface & Visual Design
The panel follows the AGPro public-release standard with one merged blue header row containing only the panel title.
The chart is designed to stay active without becoming crowded. It uses one main path corridor, up to three blocker markers, target and invalidation rails, and controlled state labels.
Label and panel font sizes are adjustable, with Normal as the default.
🧪 Practical Usage Workflow
1. Read the panel Path Quality score.
2. Check whether blockers appear inside the path corridor.
3. Compare target room against the invalidation rail.
4. Review whether the action state says Path review, Track path, Clear blockers, Review target, or Review risk.
5. Confirm the broader market context before making any independent decision.
🔍 Interpretation Guidelines
A clean path does not mean price must reach the target reference.
A blocked path does not mean price cannot continue.
The script is best read as a route-quality filter. It helps organize whether the path is clean, obstructed, risky, or ready for review.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto trading system
• Not guaranteed signals
• Not a take-profit ladder
• Not a promise that price will reach any target
⚠️ Limitations & Transparency
Target path quality can change quickly when volatility expands, pivots update, or price crosses a key reference.
Different timeframes may produce different blocker structures and target-room readings.
Low-liquidity or high-noise markets can create unstable path evaluations.
🧠 Market Context Notes
Target path analysis is strongest when combined with liquidity, structure, volatility, and trend context.
A route can look attractive by distance but still become lower quality when recent pivots block the path or the invalidation rail is too exposed.
🧾 Use Case Examples
When price trends upward and the path to the next swing reference is open, the script may show PATH READY.
When a recent pivot high sits between current price and the target reference, the script may show BLOCKED PATH.
When price reaches the target reference rail, the script may show TARGET REVIEW.
When price crosses the invalidation rail behind the path, the script may show INVALID REVIEW.
🧱 System Philosophy
AGPro Series tools are designed to support structured decision review, not emotional signal chasing.
Target Path Quality follows that philosophy by focusing on route cleanliness, blocker context, risk edge, and next-action state instead of a simple directional signal.
🔐 Non-Promise Statement
No target reference is certain.
No path score guarantees continuation.
No alert should be treated as a trade instruction.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own decisions, position sizing, risk controls, and market interpretation.
This script is for educational and analytical use only and does not provide financial advice.
📚 Educational Note
Use this tool to study how target path quality changes as blockers appear, target room expands or contracts, and invalidation risk shifts.
The strongest value comes from comparing the path corridor, blocker markers, risk rail, and broader market context together.
Indicator

Trend Re-Entry Planner [AGPro Series]Trend Re-Entry Planner
🧠 Core Idea
Is an active trend pullback creating a clean re-entry planning context, or is the reset becoming too risky?
📌 Overview / What it does
Trend Re-Entry Planner is a chart-first trend continuation planning tool designed to evaluate pullbacks inside an active trend structure. The default profile is tuned for 1H charts, where re-entry pockets, trigger candles, invalidation edges, and target-room context usually remain more readable.
The script builds a re-entry pocket from the current impulse range, scores the quality of the pullback, maps a trend defense line, shows an invalidation edge, and estimates target-room context. The goal is to help users judge whether a pullback is becoming organized enough for review or whether the trend context should be rebuilt.
It does not predict price, automate entries, or turn every pullback into a signal. It is a rule-based planning framework for evaluating trend re-entry structure.
🎯 Purpose & Design Philosophy
This script was built for traders who already track trend continuation but want a cleaner way to decide whether a pullback is worth attention.
Many trend tools show direction. Many pullback tools mark a reaction. This script focuses on the planning layer between those two ideas: trend side, pullback depth, reset quality, trigger behavior, target room, risk edge, and next action.
The design supports a disciplined workflow: evaluate context first, then decide whether the setup is ready, confirmed, invalidated, or still waiting.
⚡ Why This Script Is Different
Most tools focus on trend direction, moving average crosses, or broad pullback labels.
This script does NOT clone SuperTrend pullback grading, generic trend continuation signals, or low-volume pullback zones.
Instead, it uses an EMA trend stack and impulse-based re-entry pocket to build a planning view around the current pullback. The output is not just a marker. It is a decision panel with a 0-100 re-entry score, pullback depth, risk edge, target-room context, and next-action state.
⚙️ Methodology
1. Context Detection
The script identifies active bullish or bearish trend structure using an EMA stack and directional slope.
2. Reference Mapping
It maps the current impulse range and builds a concept-native re-entry pocket from that range.
3. Reaction Evaluation
The engine scores trend slope, pullback depth, reset quality near the mid EMA, trigger candle behavior, and target-room availability.
4. Visual Output
The script displays the re-entry pocket, invalidation edge, target-room guide, event labels, sparse context labels, and a premium AG Pro planning panel.
🗺️ How to Read the Chart
Zones = the re-entry pocket and target-room area used for planning context.
Labels = READY, CONFIRMED, INVALIDATED, FOLLOW-THROUGH, and sparse context states.
Colors = teal for bullish continuation context, pink for bearish or invalidation context, yellow for watch/review states, and indigo for target-room or follow-through emphasis.
Panel = the compact decision dashboard showing trend side, re-entry score, pullback depth, risk edge, and action.
🚦 Signals & States
• WATCH → the pullback is developing but still needs confirmation or cleaner structure.
• READY → the re-entry context has enough quality for closer review.
• CONFIRMED → a qualifying trigger candle appears after the pullback context improves.
• FOLLOW-THROUGH → the confirmed context produces a stronger continuation marker.
• INVALIDATED → price crosses the active invalidation edge and the plan should be rebuilt.
🔔 Alerts Logic
Alerts trigger when the script detects READY, CONFIRMED, INVALIDATED, or FOLLOW-THROUGH states.
Each alert is an attention marker tied to the rule-based state engine. Alerts are not trade instructions and do not guarantee that continuation will occur.
🧩 Confluence Logic
The context becomes stronger when trend slope, pullback depth, mid-EMA reset quality, trigger candle behavior, and target-room availability align.
The script intentionally requires multiple conditions instead of labeling every trend pullback as meaningful.
📊 When to Use
• 1H charts with active directional structure
• Directional markets with clear trend structure
• Pullbacks after a visible impulse move
• Continuation review workflows
• Trend-following plans where risk edge and target room matter
⚠️ When NOT to Use
• Low-liquidity symbols with unreliable price movement
• Extremely choppy markets with frequent trend-stack flips
• News-driven volatility where pullback structure changes too quickly
• Markets where the active impulse range is stale or unclear
🎛️ Key Inputs
• Sensitivity → adjusts how selective the re-entry score model is.
• Planning Profile → keeps the default behavior tuned for hourly re-entry planning or allows manual/higher-timeframe adjustment.
• Impulse Lookback → controls the range used to build the re-entry pocket.
• Re-Entry Depth settings → define the shallow, ideal, and deep areas of the pocket.
• Thresholds → control WATCH, READY, and CONFIRMED state requirements.
• Visual settings → control zones, EMA stack, labels, panel theme, panel location, and font sizes.
🖥️ Interface & Visual Design
The interface is built around a clean AG Pro panel and chart-first planning visuals.
The re-entry pocket and target-room guide are intentionally restrained so price remains readable. Labels are limited and spaced to keep the chart informative without becoming crowded.
The first panel row uses the standard AGPro merged blue header format.
🧪 Practical Usage Workflow
1. Read the panel to identify trend side and current action.
2. Check whether price is interacting with the re-entry pocket.
3. Evaluate the score, pullback depth, and risk edge.
4. Wait for READY or CONFIRMED state before treating the context as review-worthy.
5. Rebuild the plan if the invalidation edge is crossed.
🔍 Interpretation Guidelines
Think in terms of planning quality, not certainty.
A higher score means the current pullback has more constructive re-entry characteristics according to the script's rule set. A lower score means the pullback is less organized, has poor target room, lacks a clear trigger, or has moved too close to invalidation.
Use the script as a structure-reading tool within broader market context.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not guaranteed signals
• Not a SuperTrend pullback clone
• Not a generic support/resistance zone map
⚠️ Limitations & Transparency
The script is rule-based and depends on visible chart data.
Timeframe differences, volatility shifts, low liquidity, and sudden news events can change how re-entry structure appears.
The score reflects the internal model only. It does not know future order flow, future liquidity, or future market intent.
🧠 Market Context Notes
Trend re-entry quality is usually clearer when a market has directional structure, a readable impulse, and enough room before nearby obstacles.
When a trend is mature, overly extended, or choppy, the same pullback behavior may carry less useful information.
🧾 Use Case Examples
When price pulls into the re-entry pocket during a bullish EMA stack and then prints a constructive trigger candle, the script may shift from WATCH to READY or CONFIRMED.
When price crosses the invalidation edge, the script marks the context as INVALIDATED so the user can rebuild the plan instead of forcing the old structure.
🧱 System Philosophy
AGPro planning tools are designed to turn chart structure into a clearer decision workflow.
This script follows that philosophy by focusing on context, readiness, risk edge, and next action rather than simple signal output.
🔐 Non-Promise Statement
No script can guarantee continuation, reversal, profit, or accuracy.
This tool provides structured context only. Users should combine it with their own analysis, timeframe review, and risk management process.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own decisions, position sizing, trade management, and risk control.
This script does not provide financial advice and does not guarantee trading outcomes.
📚 Educational Note
Trend Re-Entry Planner is intended to help users study how pullbacks behave inside active trend structure and how planning context can be organized more clearly.
Indicator

Retest Defense Planner [AGPro Series]Retest Defense Planner
🧠 Core Idea
Is a retested level still being defended strongly enough to keep the planning context alive?
📌 Overview / What it does
Retest Defense Planner is a chart-first decision tool built for traders who review how price behaves after returning to an active defense shelf.
Instead of treating every level touch as meaningful, the script evaluates whether the shelf is actually being protected. It measures retest depth, wick defense, close response, time at level, volume support, target room, and risk-edge distance, then converts that evidence into a 0-100 Retest Score and a clear next-action state.
The default view is tuned for clear 4H-style retest review, where shelf defense, reaction quality, and short-term follow-through are usually easier to read than on very compressed timeframes. The script still works across timeframes, but users should adjust shelf age, projection bars, and sensitivity when changing market rhythm.
The script produces a defense zone, active defense rail, risk edge, target-room guide, follow-through guide, compact chart labels, alerts, and a clean AGPro planning panel. It does not predict price movement, automate execution, or provide guaranteed outcomes.
🎯 Purpose & Design Philosophy
This script was built to fill the gap between simple level plotting and full structure scanners.
Many traders can identify that price has returned to a level, but the harder question is whether the level is still being defended cleanly enough to deserve attention. Retest Defense Planner focuses on that decision layer.
The design supports a planning mindset: read the defense state, check the score, locate the risk edge, compare target room, and decide what deserves review next.
⚡ Why This Script Is Different
Most retest tools focus on structure breaks, swing-leg pullbacks, support/resistance maps, or broad breakout retest signals.
This script does NOT clone Structure Retest Planner, Swing Retest Quality, Breakout Retest Readiness, Break-Retest Quality, Breaker Block Engine, or a generic S/R zone map.
Instead, it evaluates one active defense shelf and asks whether the shelf is surviving the retest. The main output is not a signal. It is a decision state: DEFENDED, WATCH, WEAK RETEST, APPROACH, DEFENSE LOST, WAIT, or SCAN.
⚙️ Methodology
1. Context Detection
The script identifies fresh support-side or resistance-side defense shelves using confirmed pivot behavior and optional automatic side selection.
2. Reference Mapping
It maps one active defense zone, a shelf rail, a risk edge, and a target-room guide. These are planning references, not trade instructions.
3. Reaction Evaluation
The 0-100 model scores retest depth, wick defense, close response, time at level, and volume support.
4. Visual Output
The chart shows the active defense zone with centered text, event labels, guide lines, and the AGPro decision panel.
🗺️ How to Read the Chart
Defense Zone = the active shelf area being evaluated after price returns to it.
Defense Rail = the exact reference shelf the model is monitoring.
Risk Edge = the planning line where the active defense context is considered lost.
Target-Room Guide = a forward context guide based on the current shelf-to-risk distance.
Labels = compact TEST, DEFENDED, WATCH, WEAK, LOST, and context labels.
Colors = teal marks bullish support-defense context, pink marks bearish resistance-defense context, amber marks caution/review, indigo marks watch/transition, and red marks lost defense.
Panel = the AGPro panel summarizes Defense State, Retest Score, Reaction Quality, Risk Edge, and Action.
🚦 Signals & States
• DEFENDED → the shelf has been retested and the defense score is strong enough for structured review.
• WATCH → the response is developing, but confirmation or room is still incomplete.
• WEAK RETEST → price touched the shelf, but response quality is not strong enough.
• APPROACH → price is near the active defense shelf and a retest review may be forming.
• DEFENSE LOST → price crossed the risk edge and the active shelf context should be rebuilt.
• WAIT → an active shelf exists, but price is not close enough for a useful review.
• SCAN → no fresh defense shelf is active yet.
🔔 Alerts Logic
Alerts trigger when price touches the active defense zone, when a defended retest appears, when watch context appears, when a weak retest is detected, and when the risk edge is crossed.
Alerts are attention markers only. They are not trade instructions, automated strategy commands, or outcome promises.
🧩 Confluence Logic
The strongest context appears when a controlled retest probe, visible wick defense, constructive close response, enough hold time, supportive relative volume, and usable target room align.
When those components conflict, the panel moves toward WATCH, WEAK RETEST, RISK REVIEW, or DEFENSE LOST.
📊 When to Use
• Pullbacks into a defended support shelf
• Retests of a resistance shelf after bearish pressure
• 4H retest reviews where shelf defense and reaction candles are visually readable
• Continuation planning where the level has already been identified by price action
• Risk planning where invalidation and target room matter
• Liquid markets where candles, pivots, and volume behavior are readable
⚠️ When NOT to Use
• Very low-liquidity symbols with irregular candles
• Extremely noisy micro-timeframes
• News-driven spikes where shelf behavior becomes distorted
• Markets where pivot structure is too compressed to form useful shelves
• Situations where the user expects a signal-only tool
🎛️ Key Inputs
• Defense Side → selects Auto, Bullish Defense, or Bearish Defense.
• Defense Pivot Length → controls how confirmed shelves are detected.
• Max Shelf Age → controls how long a shelf remains eligible.
• Sensitivity → adjusts activation distance and zone tolerance.
• Response Window Bars → controls how long the retest response remains active.
• Risk Edge ATR → controls the planning risk edge behind the shelf.
• DEFENDED Score → sets the score threshold for stronger review states.
• Label and Panel Font Size → controls chart-label and panel readability.
• Panel Location and Theme → adjusts the AGPro panel layout.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first and decision-led.
The defense zone is the main visual object. The centered label keeps the zone readable without adding extra floating text. The risk edge and target guide explain where the planning context weakens and how much room remains.
The AGPro panel uses a merged blue title row and five compact rows so the user can read state, score, reaction quality, risk, and next action quickly.
🧪 Practical Usage Workflow
1. Read the panel state and Retest Score.
2. Check whether price is approaching or touching the defense zone.
3. Compare the shelf rail with the risk edge.
4. Review whether the label says TEST, DEFENDED, WATCH, WEAK, or LOST.
5. Confirm the broader market context before making any decision.
🔍 Interpretation Guidelines
Think in terms of defense quality, not prediction.
A higher score means multiple defense components align inside the script's rule set. A weaker score means the retest may be too shallow, too deep, too fast, too noisy, or missing a constructive close response.
The script helps organize the review process. It does not replace judgment.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not a guaranteed signal tool
• Not a BOS / CHOCH scanner
• Not a breakout retest scanner
• Not a swing-leg retest tool
• Not an order block, FVG, or supply/demand map
• Not a generic support/resistance zone map
⚠️ Limitations & Transparency
• Pivot-based shelf references appear only after pivots are confirmed.
• Scores can vary across symbols, sessions, and timeframes.
• Volume scoring depends on exchange-provided volume data.
• Fast volatility can cross a shelf before a clean defense can be measured.
• In Live Updating mode, active-bar values can change before the bar closes.
🧠 Market Context Notes
Retest defense is easiest to interpret when liquidity, volatility, and trend context are readable.
A defended shelf is not enough by itself. The reaction, close location, hold time, risk edge, and target room all matter.
🧾 Use Case Examples
When price returns to a support shelf, probes the defense zone, forms a visible lower wick, and closes back above the shelf with enough target room, the planner may mark DEFENDED.
When price touches the shelf but closes weakly with poor reaction quality, the planner may show WEAK RETEST or WATCH.
When price crosses the risk edge, DEFENSE LOST indicates that the active context should be rebuilt.
🧱 System Philosophy
Retest Defense Planner follows the AGPro decision-engine approach: map the context, score the quality, show the risk reference, show the target room, and summarize the next action without issuing trade commands.
🔐 Non-Promise Statement
No indicator can provide certainty.
The script does not guarantee that a retest will hold, continue, reverse, or produce any specific outcome.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, risk management, and trading decisions.
This script is provided for educational and analytical purposes only and does not constitute financial advice.
📚 Educational Note
Use the script as a structured retest-defense review framework. The best results come from combining the panel, zones, labels, and alerts with broader chart context and disciplined risk evaluation.
Indicator

Range Rejection Planner [AGPro Series]Range Rejection Planner
🧠 Core Idea
Is price rejecting a range edge with enough quality to monitor back toward the midline?
📌 Overview / What it does
Range Rejection Planner is a chart-first range reaction decision engine built to evaluate whether price is rejecting the active range edge with enough structure to deserve attention.
The script maps one relevant range edge, a focused edge-reaction zone, wick rejection behavior, close-back-inside quality, midline room, invalidation shelf, failure risk, event labels, alerts, and a clean AGPro planning panel. These components are converted into a 0-100 Rejection Score and a clear next-action state.
It does not predict price movement, automate trades, draw a full support/resistance library, or guarantee that a range edge will hold. Its purpose is to organize the range-edge rejection review process with practical risk and midline context.
🎯 Purpose & Design Philosophy
This script was built for traders who want to evaluate range-edge reactions without turning the chart into a crowded level map.
Many range tools show boundaries, fills, or breakout markers, but they often stop before answering the practical planning question: did price actually reject the edge, is there room back to the midline, and where does the idea fail?
The design philosophy is simple: a range-edge rejection is only useful when the edge interaction, wick response, close-back-inside behavior, midline room, and failure shelf can be read together.
⚡ Why This Script Is Different
Most tools focus on drawing support/resistance zones, marking every range touch, or highlighting breakouts.
This script does NOT clone Support Resistance Reaction Map, does not build a multi-level S/R inventory, and does not act as a broad breakout or break-retest scanner.
Instead, it focuses on one active range and one active edge. The main output is not a buy/sell signal. It is a planning state that helps users decide whether the edge rejection deserves review, whether midline room exists, and whether failure risk is rising.
⚙️ Methodology
1. Context Detection
The script builds an active range from previous bars and identifies whether price is interacting with the upper or lower edge.
2. Reference Mapping
It maps the relevant edge zone, the range midline, and an invalidation shelf beyond the rejected edge.
3. Reaction Evaluation
The model scores edge proximity, wick rejection, close-back-inside quality, relative volume response, midline room, and active range quality.
4. Visual Output
The result appears as a centered range-edge zone, a midline review path, guide lines, compact state labels, alerts, and a premium AGPro panel.
🗺️ How to Read the Chart
Zones = the active range-edge zone shows the relevant upper or lower boundary being evaluated. The zone label is centered inside the shape.
Midline Path = the projected review area between the rejected edge and the range midline. It helps show whether there is enough room for interpretation.
Labels = compact markers show EDGE WATCH, REJECT READY, MIDLINE REVIEW, MIDLINE HIT, or FAILURE RISK context.
Colors = teal supports lower-edge rejection context, pink supports upper-edge rejection context, amber highlights review states, and indigo marks midline references.
Panel = the panel summarizes Range Edge, Rejection Score, Midline Room, Failure Risk, and Action.
🚦 Signals & States
• EDGE WATCH → price is probing a range edge and early rejection conditions are developing.
• REJECT READY → range-edge rejection quality reached the selected score threshold.
• MIDLINE REVIEW → an active rejection context is being monitored toward the range midline.
• MIDLINE HIT → price reached the active range midline after a rejection context.
• FAILURE RISK → price crossed the invalidation shelf beyond the rejected edge.
• RANGE WAIT → a range exists, but the edge interaction is not strong enough yet.
🔔 Alerts Logic
Alerts trigger when the planner enters EDGE WATCH, REJECT READY, MIDLINE REVIEW, MIDLINE HIT, or FAILURE RISK.
Each alert is an attention marker. Alerts are not trade instructions, entry commands, exit commands, or automated strategy rules.
🧩 Confluence Logic
The strongest context appears when several conditions align:
Range edge probe + strong rejection wick + close back inside the range + supportive relative volume + meaningful room back to the midline + a clear invalidation shelf.
When these components weaken, the planner can stay in EDGE WATCH, return to RANGE WAIT, or shift into FAILURE RISK.
📊 When to Use
• During range-bound markets where edge reactions matter
• When price probes the upper or lower boundary of a recent range
• When evaluating whether an edge rejection has enough midline room
• When a trader wants risk and invalidation context around a range reaction
• On liquid symbols where wicks, volume, and range boundaries are readable
⚠️ When NOT to Use
• Extremely low-liquidity symbols with unreliable wicks or volume
• Very noisy micro-timeframes where range edges shift too often
• News-driven volatility spikes that distort normal range behavior
• Strong trend expansion where range rejection is no longer the main context
• Situations where the user expects automatic buy/sell signals
🎛️ Key Inputs
• Range Edge Mode → chooses Auto, Upper Edge Rejection, or Lower Edge Rejection.
• Active Range Lookback → controls the previous-bar range used for edge evaluation.
• Range Edge Zone ATR → controls the width of the focused edge-reaction zone.
• Close-Back-Inside ATR → defines how much price should close back inside after probing an edge.
• Invalidation Shelf ATR → controls the failure-risk reference beyond the rejected edge.
• REJECT READY Threshold → sets the minimum 0-100 score for the strongest rejection state.
• Label and Panel Font Size → controls visual readability.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first.
The active edge zone gives the main visual reference. The midline path shows the review area. The invalidation shelf defines where the rejection context becomes weaker. The panel provides a compact decision summary without replacing the chart.
The AGPro panel follows the standard first row format: one merged blue title row containing only the script name.
🧪 Practical Usage Workflow
1. Read the panel state and Rejection Score.
2. Check which range edge is active.
3. Review the wick rejection and close-back-inside context.
4. Compare the midline room with the invalidation shelf.
5. Treat alerts as attention markers, then evaluate broader market context.
🔍 Interpretation Guidelines
Think in terms of rejection quality, not prediction.
A stronger score means multiple range-reaction conditions are aligned. A weaker score means the edge interaction may be early, noisy, too close to the midline, or vulnerable to failure.
Failure Risk does not forecast a breakout. It means the active rejection context has crossed its rule-based failure shelf and should be reviewed.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not a guaranteed signal tool
• Not a generic support/resistance map
• Not a full range breakout scanner
⚠️ Limitations & Transparency
The script is rule-based and depends on recent price, range, wick, volatility, and volume behavior.
Timeframe changes can alter the active range, score, edge zone, midline room, and invalidation shelf. Volatility spikes can temporarily distort range boundaries. Symbols with unreliable volume may produce weaker participation readings.
Outputs should always be interpreted with broader market structure, liquidity conditions, and independent risk planning.
🧠 Market Context Notes
Range-edge rejection is most useful when the market is respecting a bounded structure and still has meaningful space toward the middle of the range.
If price starts expanding beyond the edge, this tool intentionally shifts attention from rejection quality toward failure risk instead of calling continuation or reversal with certainty.
🧾 Use Case Examples
When price probes above the active range high, prints a strong upper wick, closes back inside, and still has clear room toward the midline, the planner may classify the context as REJECT READY.
When price touches the lower edge but closes weakly, lacks wick response, or sits too close to the midline, the planner may remain in EDGE WATCH or RANGE WAIT.
When price crosses the invalidation shelf beyond the rejected edge, the planner marks FAILURE RISK for review.
🧱 System Philosophy
AGPro planning tools are designed to help traders make a decision, not simply see another signal.
This script follows that philosophy by turning range rejection into a practical decision question:
Is the edge interaction valid?
How strong is the rejection?
Where is the midline reference?
Where is the failure shelf?
What should I review now?
🔐 Non-Promise Statement
No script can remove uncertainty.
No state, score, label, zone, line, or alert guarantees a future market outcome.
📉 Risk Disclosure
Trading involves risk. Market conditions can change quickly, and no script can eliminate uncertainty.
Users are responsible for their own analysis, risk management, and decisions.
This script is for educational and analytical use only and does not provide financial advice.
📚 Educational Note
Use the planner to study how range edges behave across different markets and timeframes. The most useful reading comes from comparing the edge zone, wick response, midline room, failure shelf, panel state, and broader market context together.
Indicator

Stop Run Continuation Planner [AGPro Series]Stop Run Continuation Planner
🧠 Core Idea
Did the stop run fuel continuation instead of reversal?
📌 Overview / What it does
Stop Run Continuation Planner is a chart-first liquidity continuation tool built around a specific post-sweep question: after price runs stops beyond a recent high or low, is the market reclaiming back inside for reversal, or accepting beyond the swept edge for continuation?
The script maps stop-run zones, continuation references, invalidation edges, target corridors, compact state labels, alerts, a 0-100 Continuation Score, and a Reversal Risk reading. It is designed to organize observable stop-run behavior into a structured planning workflow.
It does not predict future price, automate execution, or issue buy and sell commands. It is an analytical and visualization tool built for structured review.
🎯 Purpose & Design Philosophy
This script was built for the cases where a stop run does not turn into a reversal. Many liquidity tools focus on the sweep itself. This script focuses on what happens after the sweep.
The design supports a planner mindset: identify the stop run, measure continuation acceptance, locate invalidation, estimate target room, judge reversal risk, and decide what deserves attention next.
⚡ Why This Script Is Different
Most stop-run tools focus on reversal reclaim behavior, generic liquidity grabs, or broad SMC-style mapping.
This script does NOT treat every sweep as a reversal event.
Instead, it evaluates whether price is accepting beyond the swept edge with enough quality, target room, and controlled reversal risk to justify a continuation review.
⚙ Methodology
1. Context Detection
Recent high and low references are defined with a configurable lookback.
2. Reference Mapping
When price sweeps beyond a reference, the script maps the swept edge, continuation side, invalidation edge, and forward target corridor.
3. Reaction Evaluation
Continuation Score blends sweep depth, close acceptance, volume participation, trend-side support, and target room. Reversal Risk tracks rejection, weak acceptance, and context conflict.
4. Visual Output
Qualified states produce stop-run boxes, target corridors, compact labels, alerts, and a clean AG Pro panel.
🗺 How to Read the Chart
Zones = the active stop-run area between the swept reference and the sweep extreme.
Corridors = the forward review area used for target room assessment.
Labels = watch or continuation state markers.
Colors = teal for bullish continuation context, pink for bearish continuation context, and red for invalidation pressure.
Panel = Stop Run, Continuation Score, Reversal Risk, Target Room, and Action.
🚦 Signals & States
• Upper Run Watch → price swept a recent high, but continuation acceptance still needs confirmation.
• Lower Run Watch → price swept a recent low, but continuation acceptance still needs confirmation.
• Bull Continuation Ready → bullish post-sweep continuation quality is strong enough for review.
• Bear Continuation Ready → bearish post-sweep continuation quality is strong enough for review.
• Invalidation Review → price has moved through the active invalidation edge.
• Target Review → price is testing the active target corridor.
• Reversal Risk Elevated → rejection risk is growing and continuation quality is weakening.
🔔 Alerts Logic
Alerts trigger when bullish or bearish continuation reaches ready state, when a watch condition appears, when invalidation review is triggered, when price tests the target corridor, or when reversal risk becomes elevated.
Important: alerts are attention markers, not trade instructions.
🧩 Confluence Logic
When sweep depth, close acceptance, volume participation, trend support, and clean target room align, the continuation context becomes stronger.
When price closes back inside the swept edge or rejection grows, Reversal Risk rises and the continuation plan weakens.
📊 When to Use
• After price runs above recent highs or below recent lows
• During breakout continuation attempts after a liquidity sweep
• In trending or expanding markets
• When traders need risk, target, and next-action context after a fast sweep event
⚠️ When NOT to Use
• Extremely low-liquidity markets
• Very noisy micro-timeframes
• News-driven candles with abnormal spread or slippage
• Markets where volume data is unreliable
• Situations where the user expects automated entries or guaranteed outcomes
🎛️ Key Inputs
• Continuation Side → evaluates bullish events, bearish events, or both
• Sensitivity → changes how strict the continuation requirements are
• Stop-Run Reference Lookback → defines the sweep reference levels
• Confirmation Mode → changes how much confirmation is required
• Minimum Continuation Score → sets the ready threshold
• Watch Score → controls earlier watch-state visibility
• Invalidation Edge Buffer → adjusts the wrong-side planning edge
• Target Corridor R Multiple → controls target-corridor projection
• Visual settings → control zones, labels, font size, panel location, and render limits
🖥️ Interface & Visual Design
The script is chart-first and decision-focused. The chart carries the zones, corridors, and labels. The panel provides a compact state summary without turning the script into a crowded dashboard.
The first panel row follows the AGPro standard: one merged blue header row containing only the script name.
🧪 Practical Usage Workflow
1. Read the panel state and Continuation Score.
2. Check whether price swept above a recent high or below a recent low.
3. Review whether price is accepting beyond the swept edge.
4. Compare Reversal Risk with the invalidation edge.
5. Review target room before treating continuation as stronger context.
🔍 Interpretation Guidelines
A high Continuation Score means the stop run is showing stronger continuation behavior under the script rules. It does not mean continuation must happen.
The invalidation edge and target corridor are planning references, not guaranteed levels.
The best use is to compare the planner state with broader market structure, liquidity, volatility, and personal risk process.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a generic support/resistance map
• Not an order-block or FVG scanner
• Not a stop-run reversal tool
⚠️ Limitations & Transparency
Stop-run behavior changes across symbols, sessions, and timeframes.
High volatility can widen risk and target references.
Low liquidity can distort sweep quality, volume response, and label timing.
No rule-based script can fully account for news, spread changes, slippage, or sudden liquidity shifts.
🧠 Market Context Notes
Stop runs often happen near visible highs, lows, session extremes, or recent structure.
A sweep becomes more useful for continuation planning when the market accepts beyond the swept edge instead of reclaiming back inside.
🧾 Use Case Examples
When price sweeps above a recent high, closes beyond the swept edge, and the Continuation Score improves, the planner may show bullish continuation readiness.
When price sweeps below a recent low and continues accepting below that edge, the planner may show bearish continuation readiness.
When price sweeps but closes back inside with stronger rejection, Reversal Risk can rise and the panel may shift to caution.
🧱 System Philosophy
AGProLabs tools are built around structured interpretation. The goal is not to add another raw signal. The goal is to turn market behavior into a cleaner review process with score, state, risk, target, and next action.
🔐 Non-Promise Statement
No indicator can remove uncertainty.
No score can guarantee continuation.
No zone, label, panel row, alert, or corridor should be interpreted as a guaranteed outcome.
📉 Risk Disclosure
Trading involves risk.
This script is provided for educational and analytical use only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own analysis, risk management, and execution.
Indicator

Opening Pullback Planner [AGPro Series]Opening Pullback Planner
🧠 Core Idea
Is the first pullback after the open constructive, failing, or too stale to plan around?
📌 Overview / What it does
Opening Pullback Planner is a session pullback decision tool built around the first meaningful retracement after the opening drive. Instead of treating the open as only a breakout moment, it waits for the drive reference to lock, then maps the pullback area where continuation quality can be evaluated.
The script produces an opening pullback box, continuation trigger, failure line, target-room guide, 0-100 continuation score, risk-edge reading, compact event labels, alerts, and a clean AG Pro planning panel.
It does not predict price direction, automate trades, or mark every opening range breakout. Its purpose is to organize the pullback phase after the opening drive so traders can judge whether the first reset is constructive, failing, invalidated, or no longer worth attention.
🎯 Purpose & Design Philosophy
Many session tools focus on the first opening break, the opening range, or the first impulse. The problem is that a strong open often becomes difficult to plan only after price pulls back.
Opening Pullback Planner was built to fill that gap. It helps traders who study intraday continuation, first-pullback behavior, session execution, and risk-defined planning after the initial move.
The design philosophy is simple: lock the opening drive, map the first pullback box, evaluate recovery quality, define the failure line, and keep the next action readable without turning the chart into a crowded signal board.
⚡ Why This Script Is Different
Most tools focus on opening range breakouts, first-drive strength, fixed session boxes, or generic pullback signals.
This script does NOT clone Opening Drive Quality, does NOT act as an ORB breakout tool, and does NOT draw generic support/resistance zones.
Instead, it focuses on the first pullback after the opening drive. It asks whether the pullback is deep enough to matter, shallow enough to preserve structure, recovering with acceptable close quality, holding a measurable failure line, and offering enough target room for continued review.
⚙️ Methodology
1. Context Detection
The script builds an opening reference from either a fixed session window or the first bars of the day. This creates the drive structure that the pullback plan will use.
2. Reference Mapping
After the opening reference locks, the script maps a drive-native pullback box, continuation trigger, failure line, and target-room guide.
3. Reaction Evaluation
The engine evaluates pullback depth, close recovery, relative volume, volatility fit, room-to-risk, and drive quality to create a 0-100 continuation score.
4. Visual Output
The chart shows the pullback box with centered text, continuation and failure references, target-room guide, compact event labels, optional markers, and the AG Pro panel.
🗺️ How to Read the Chart
Opening Pullback Box = the first pullback review area derived from the locked opening drive.
Continuation Trigger = the level price must reclaim or break after the pullback for continuation context to strengthen.
Failure Line = the invalidation reference where the active pullback plan loses structural integrity.
Target Guide = a projected target-room reference based on the opening drive range.
Labels = event markers for drive retain, pullback test, constructive recovery, trigger readiness, pullback risk, failure line, stale plan, and target check.
Colors = teal for bullish continuation context, pink for bearish or invalid context, amber for caution, and indigo for structural emphasis.
Panel = the decision layer showing Pullback State, Drive Side, Continuation Score, Risk Edge, and Action.
🚦 Signals & States
• DRIVE RETAIN → the opening drive quality is strong enough to map a pullback plan.
• PULLBACK TEST → price has entered the opening pullback box.
• CONSTRUCTIVE → pullback depth and recovery quality are acceptable inside the model.
• TRIGGER READY → price has moved through the continuation trigger after a valid pullback.
• PULLBACK RISK → the pullback is becoming too deep, slow, or weak for clean continuation review.
• FAILURE LINE → the active pullback plan has lost structural integrity.
• PULLBACK STALE → the first pullback plan did not resolve inside the review window.
• TARGET CHECK → price reached the projected target-room guide.
🔔 Alerts Logic
The script includes alerts for:
• Opening Pullback Plan Armed → a qualified opening drive mapped the first pullback plan.
• Opening Pullback Test → price is testing the pullback box.
• Constructive Opening Pullback → the pullback is recovering constructively.
• Opening Pullback Continuation Trigger → the continuation trigger is active after the pullback.
• Opening Pullback Failure Line Broken → the plan has broken its failure reference.
• Opening Pullback Plan Expired → the first pullback plan became stale before confirmation.
• Opening Pullback Target Check → price reached the target-room guide.
Alerts are attention markers. They are not trade instructions.
🧩 Confluence Logic
The context becomes stronger when the opening drive has acceptable quality, the first pullback reaches the planned box without violating the failure line, recovery closes improve, volume does not collapse during recovery, and target room remains clean.
The context becomes weaker when the pullback is too deep, recovery is poor, the plan takes too long to resolve, or price violates the failure line.
📊 When to Use
• Intraday session planning after the opening move.
• First-pullback continuation review.
• Daily chart review when the higher-timeframe fallback is enabled.
• Markets where the opening drive often creates a useful early reference.
• Stocks, indices, futures, crypto, or FX charts where the selected opening session is meaningful.
• Review workflows where risk edge and target room need to be visible.
⚠️ When NOT to Use
• Very low-liquidity markets.
• Extremely noisy opens with unstable spreads.
• News-driven bars that distort the opening reference.
• Higher timeframes where session pullback structure is not meaningful.
• Markets where the selected opening window does not represent real participation.
🎛️ Key Inputs
• Opening Reference Mode → chooses between a fixed session window and first bars of day.
• Opening Drive Window → defines the drive reference used before pullback mapping begins.
• Higher Timeframe Fallback → keeps daily, weekly, and monthly charts visually useful by mapping broader opening references.
• Sensitivity → adjusts how strict the planner is with pullback recovery and score requirements.
• Constructive Score Threshold → controls when constructive pullback labels can appear.
• Pullback Box Shallow / Ideal / Deep → define the preferred retracement area.
• Continuation Trigger Buffer ATR → adjusts the trigger line beyond the drive extreme.
• Failure Line Buffer ATR → adjusts the invalidation reference beyond the pullback box.
• Target Guide Range Multiple → controls the projected target-room guide.
• Visual settings → control box, lines, labels, markers, projection, label limits, and font size.
• Panel settings → control panel visibility, location, theme, and font size.
🖥️ Interface & Visual Design
The interface is chart-first and decision-focused. The main visual object is one opening pullback box with centered state text, supported by a continuation trigger, failure line, and target guide.
The panel follows the AGPro public-release standard with one merged blue header row containing only the script name. The five panel rows are Pullback State, Drive Side, Continuation Score, Risk Edge, and Action.
Labels are compact, capped, and offset away from candles so the chart stays active without becoming crowded.
🧪 Practical Usage Workflow
1. Let the opening reference lock.
2. Read the panel to see whether the drive retained enough quality.
3. Watch whether price tests the opening pullback box.
4. Evaluate the continuation score, recovery state, risk edge, and failure line.
5. Treat alerts and labels as review prompts, not instructions.
🔍 Interpretation Guidelines
A strong continuation score means the pullback is controlled, recovering cleanly, preserving the failure line, and keeping useful room to the projected target guide.
A constructive label means the first pullback is behaving better inside the model. It does not mean continuation must occur.
A failure-line label means the plan has lost the structure it needed for this specific pullback framework.
The best use comes from combining the panel state with broader market context, liquidity, volatility, higher-timeframe structure, and personal risk rules.
🚫 What This Script Is NOT
• Not a prediction engine.
• Not financial advice.
• Not auto trading.
• Not guaranteed signals.
• Not a generic support/resistance map.
• Not an order block or FVG scanner.
• Not an Opening Drive Quality clone.
• Not a full opening range breakout system.
⚠️ Limitations & Transparency
Timeframe selection affects the opening reference and the pullback box. A 5-minute chart and a 15-minute chart can produce different plans.
Session definitions matter. The selected opening window should match the asset and market being studied.
Higher-timeframe fallback mode is a broader chart-reference layer. It should be read as a weekly, monthly, or yearly opening-pullback framework rather than a literal intraday open.
Volatility changes can expand or compress risk, target, and pullback behavior.
Low liquidity, abnormal spreads, and high-impact news can reduce the usefulness of any opening pullback model.
🧠 Market Context Notes
The first pullback after the open can be useful because it tests whether the opening move still has sponsorship. A shallow pullback may show strength but offer limited risk clarity. A deep pullback may offer a better reset but also higher failure risk.
This script keeps that decision visible by separating drive retention, pullback quality, continuation trigger, failure line, and target room.
🧾 Use Case Examples
When price locks a bullish opening drive, pulls back into the mapped box, holds above the failure line, and recovers toward the continuation trigger, the panel may shift toward a constructive or ready state.
When price enters the pullback box but keeps closing weakly or pushes beyond the deep boundary, the planner may mark pullback risk.
When price breaks the failure line, the opening pullback plan is no longer structurally intact inside this model.
🧱 System Philosophy
Opening Pullback Planner follows the AGPro Series decision-engine approach: a script should help the trader evaluate validity, strength, risk, target room, and next action instead of only printing another signal.
The tool is built to make one session behavior easier to read: the first pullback after the opening drive.
🔐 Non-Promise Statement
No script can provide certainty.
No opening pullback model can guarantee continuation, reversal, or profitability.
This script provides structured context only.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own decisions.
This script does not provide financial advice, investment advice, or guaranteed trading outcomes.
📚 Educational Note
Use this script as an educational planning and visualization tool. The strongest use comes from reading the first opening pullback together with broader market structure, liquidity, volatility, and personal risk rules.
Indicator

Pullback Acceptance Planner [AGPro Series]Pullback Acceptance Planner
🧠 Core Idea
Is the current trend pullback being accepted as continuation, or rejected as failure?
📌 Overview / What it does
Pullback Acceptance Planner is a public-free PulseWire planner built to evaluate one specific decision point: the moment price pulls back into a trend-support area and the trader needs to know whether the retracement is being accepted or rejected.
The script maps a live pullback acceptance pocket, accepted/rejected state labels, an invalidation risk shelf, a target-room band, and a clean AGPro decision panel. It converts pullback depth, close acceptance, trend support, volume behavior, invalidation distance, and target room into a 0-100 Acceptance Score.
It does not predict price direction, automate entries, or label every small retracement. Its purpose is to make the pullback review process cleaner, more visual, and more decision-focused.
🎯 Purpose & Design Philosophy
This script was built because many pullback tools stop at showing where price touched a moving average, trend line, or generic zone. That is not enough for a trader who needs to decide whether the pullback is still constructive.
Pullback Acceptance Planner fills that gap by focusing on acceptance behavior after the pullback reaches the planning pocket. It helps traders review trend-side support, close quality, participation, risk distance, and remaining room in one structured view.
The mindset is practical: do not chase every pullback, and do not treat every retracement as a signal. Wait for the pullback to show whether it is being accepted or rejected.
⚡ Why This Script Is Different
Most pullback tools focus on moving-average touches, simple continuation markers, or generic trend-risk labels.
This script does NOT clone Low Volume Pullback Zones, Trend Pullback Risk Planner, Opening Drive Quality, SuperTrend pullback tools, or broad continuation dashboards.
Instead, it answers a narrower question: after price enters a general trend pullback pocket, is the close behavior strong enough to call the pullback accepted, or is the invalidation shelf being lost?
That acceptance-first framing is the core identity of the script.
⚙️ Methodology
1. Context Detection
The engine reads EMA stack alignment, base EMA slope, ATR structure, and the selected planning side to determine whether a bullish or bearish pullback context is active.
2. Reference Mapping
The script builds a pullback acceptance pocket around the base EMA, then maps an invalidation risk shelf behind the pocket and a target-room band toward the nearest prior obstruction.
3. Reaction Evaluation
The 0-100 Acceptance Score evaluates pullback depth, close acceptance beyond the pocket edge, trend support, volume behavior, invalidation distance, and target room.
4. Visual Output
The chart displays the acceptance pocket, risk shelf, target-room band, compact state labels, alerts, and a five-row AGPro planner panel.
🗺️ How to Read the Chart
Zones = the pullback acceptance pocket, invalidation risk shelf, and target-room band.
Labels = current state changes such as PB ACCEPTED, PB REJECTED, ACCEPT WATCH, ROOM REVIEW, or PB FORMING.
Colors = bullish acceptance uses teal, bearish acceptance uses pink, watch/room review uses yellow or indigo, and rejection uses red.
Panel = the decision summary: Pullback State, Acceptance Score, Risk Edge, Room, and Action.
🚦 Signals & States
• PB ACCEPTED → price closed beyond the active pullback pocket with enough score quality.
• ACCEPT WATCH → pullback context is improving but still needs cleaner confirmation.
• ROOM REVIEW → acceptance quality exists, but nearby obstruction leaves limited target room.
• PB FORMING → price is inside or near the pocket and the planner is still building context.
• PB REJECTED → price crossed the invalidation shelf and the active pullback context failed.
• TREND WAIT / NO PULLBACK → there is no active pullback acceptance context to review.
🔔 Alerts Logic
Alerts trigger when a bullish or bearish pullback reaches accepted state, when acceptance watch appears, when target room needs review, when the pullback is rejected, or when a major follow-through event appears after acceptance.
Alerts are attention markers. They are not trade instructions.
🧩 Confluence Logic
The context becomes stronger when trend side, clean pullback depth, constructive close acceptance, controlled or recovering volume, reasonable invalidation distance, and sufficient target room align at the same time.
The score is intentionally multi-factor so a single moving-average touch cannot create a high-quality state by itself.
📊 When to Use
• Trending markets with clean retracements
• Swing or intraday continuation review
• Markets where pullback behavior matters more than raw trend direction
• Crypto, forex, stocks, indices, and commodities with enough liquidity
• Situations where a trader wants an invalidation reference and target-room read before acting
⚠️ When NOT to Use
• Very low-liquidity symbols
• Extremely noisy sideways chop
• News-driven spikes where ATR and trend structure distort quickly
• Ultra-low timeframes with unstable spread or poor execution quality
• Markets where price repeatedly crosses the base EMA without directional structure
🎛️ Key Inputs
• Planning Side → chooses Auto, Bullish Pullback, or Bearish Pullback.
• Sensitivity → changes trend strictness and scoring behavior.
• EMA Lengths → define the trend stack and acceptance pocket anchor.
• ATR Length → normalizes pocket width, labels, risk shelf, and target room.
• Pullback Review Window → controls how long a pocket touch remains active.
• ACCEPTED Threshold → sets the minimum score for accepted-state labels.
• Label / Panel Settings → control visibility, location, theme, font size, label size, and label density.
🖥️ Interface & Visual Design
The interface is chart-first. The main chart objects are the acceptance pocket, risk shelf, and target-room band, each with centered text when displayed.
The panel uses the AGPro standard: one merged blue header row containing only the script name, followed by five decision rows. The layout is intentionally compact so the chart stays premium, readable, and useful on first glance.
🧪 Practical Usage Workflow
1. Read the panel to identify Pullback State and Acceptance Score.
2. Check whether price is inside, above, or below the acceptance pocket.
3. Review the invalidation risk shelf before interpreting an accepted state.
4. Check the target-room band to see whether the path is open or obstructed.
5. Treat labels and alerts as review markers, not automatic trade decisions.
🔍 Interpretation Guidelines
A higher score means the pullback has cleaner depth, stronger close behavior, better trend support, healthier volume behavior, more reasonable invalidation distance, and better room.
An accepted label means the pullback has met the script's rule-based acceptance conditions. It does not mean price must continue.
A rejected label means the pullback context failed according to the invalidation shelf. It does not mean the market must reverse.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a generic support/resistance zone tool
• Not an order block, FVG, or broad SMC map
⚠️ Limitations & Transparency
• Timeframe differences can change how clean the pocket and score appear.
• Volatility expansion can widen risk and distort close acceptance.
• Low-liquidity markets can make volume behavior less reliable.
• Strong news candles can cross both pocket and target references too quickly.
• The script uses rule-based approximations, not future knowledge.
🧠 Market Context Notes
Pullback acceptance often depends on whether price can return toward trend support without losing structure. A constructive pullback usually keeps risk contained, avoids aggressive countertrend volume, and then shows acceptance through the pocket edge.
This script turns that process into a visual planner so the user can review risk, room, and state in one place.
🧾 Use Case Examples
When a bullish trend pulls back into the acceptance pocket, the script may print ACCEPT WATCH first. If price later closes above the pocket edge with enough score quality, the state can shift to PB ACCEPTED.
When a bearish trend rallies into the pocket but then closes back below the acceptance edge, the script can mark bearish acceptance. If price crosses the invalidation shelf instead, the state shifts toward rejection.
🧱 System Philosophy
Pullback Acceptance Planner follows the AGPro planner-style direction: the chart should not only show another signal. It should help the trader evaluate setup validity, strength, risk, target room, and next action.
🔐 Non-Promise Statement
No script can provide certainty.
No score can guarantee outcome.
This tool is designed for structured review and educational analysis.
📉 Risk Disclosure
Trading involves risk. Market conditions can change quickly, and historical or rule-based signals do not guarantee future results.
Users are responsible for their own analysis, risk management, and decisions.
This script does not provide financial advice.
📚 Educational Note
Use the script to study how pullbacks behave around trend support, invalidation shelves, and target-room constraints. The best value comes from comparing the planner state with broader market context.
Indicator

Failed Pullback Reversal Planner [AGPro Series]Failed Pullback Reversal Planner
🧠 Core Idea
Did the pullback fail to recover, and is it now creating a reversal-warning context?
📌 Overview / What it does
Failed Pullback Reversal Planner is a chart-first reversal risk planner built for one specific situation: a pullback inside an existing trend stops behaving like a healthy retracement and begins losing control.
The script maps a failed pullback pocket, control-loss rail, invalidation reference, target-room guide, compact state labels, alerts, and a clean AG Pro panel. It converts pullback depth, failed recovery, close behavior, volume response, and follow-through into a 0-100 Failure Score.
It does not predict future price movement, automate entries, or issue guaranteed buy/sell signals. Its role is to organize failed-pullback context into a clearer decision framework.
🎯 Purpose & Design Philosophy
This script was built because many pullback tools only focus on continuation quality. They often ask whether the pullback is healthy enough to resume the original trend.
Failed Pullback Reversal Planner focuses on the opposite decision layer. It asks whether the pullback failed to recover, lost the control reference, and now deserves reversal-risk review.
The design supports traders who want cleaner structure, risk location, target-room context, and next-action guidance without turning every candle into a signal.
⚡ Why This Script Is Different
Most tools focus on pullback continuation, moving-average bounces, or generic reversal markers.
This script does NOT clone Pullback Acceptance Planner, Low Volume Pullback Zones, Trend Continuation Quality, or a generic reversal signal indicator.
Instead, it treats failed pullbacks as a planning problem. Price must first enter a pullback context, then fail recovery around a control rail, then show enough close quality, volume response, and follow-through to raise reversal-risk state.
⚙️ Methodology
1. Context Detection
The script identifies former bullish or bearish trend context using fast, base, and slow EMA alignment.
2. Reference Mapping
It builds a failed pullback pocket, control-loss rail, invalidation reference, and target-room guide using ATR-normalized logic.
3. Reaction Evaluation
It scores pullback depth, failed recovery, close against the former trend, volume response, and nearby follow-through.
4. Visual Output
It displays concept-native zones, centered zone labels, compact event labels, guide rails, alerts, and a premium AG Pro planning panel.
🗺️ How to Read the Chart
Zones = the failed pullback pocket and reversal-risk zone.
Labels = pullback test, control-loss, reversal-risk, or reset markers.
Colors = teal shows bullish reversal-risk context, pink shows bearish reversal-risk context, amber shows watch context, red shows control-loss or risk context, and indigo shows reset/recovery context.
Panel = a compact decision dashboard showing Pullback State, Failure Score, Reversal Risk, Invalidation, and Action.
🚦 Signals & States
• PB TEST → a recent pullback is being monitored for failed-recovery behavior.
• CTRL LOST → price has lost the control reference but has not fully qualified the warning state.
• REV RISK → failed pullback context has enough score to deserve reversal-risk review.
• RESET → optional marker showing that price reclaimed the invalidation reference and the failed-pullback plan should be reset.
• NO SETUP → no active failed-pullback context is present.
🔔 Alerts Logic
Alerts trigger when the planner detects a monitored failed-pullback setup, a reversal-risk warning, invalidation/reset behavior, or meaningful follow-through after control loss.
Alerts are attention markers only. They are not trade instructions.
🧩 Confluence Logic
The strongest failed-pullback context appears when pullback depth is meaningful, price loses the control rail, the candle closes against the former trend, volume supports the shift, and follow-through begins beyond nearby structure.
When these components align, the Failure Score rises and the panel moves from watch context toward reversal-risk review.
📊 When to Use
• Trend pullbacks that start losing recovery quality
• Potential reversal transitions after a failed retracement
• Markets where a prior trend is weakening around a control reference
• Situations where invalidation and target-room context matter
⚠️ When NOT to Use
• Very low liquidity markets
• Extremely noisy sideways conditions
• News-driven volatility spikes
• Markets with no clean prior trend context
• Symbols where volume behavior is unreliable
🎛️ Key Inputs
• Sensitivity → controls how strict the failed-pullback model is.
• Former Trend Side → restricts evaluation to bullish-trend or bearish-trend failures when needed.
• Failure Window Bars → defines how long after a pullback touch control-loss behavior can qualify.
• Control-Loss Buffer ATR → adjusts the rail used to mark failed recovery.
• Invalidation Buffer ATR → controls the reset reference beyond the fast trend anchor.
• Label and Panel Settings → control panel location, theme, font size, label size, label spacing, and visible label count.
🖥️ Interface & Visual Design
The interface is built around a clean AG Pro decision panel and chart-first planning visuals.
The first panel row uses the AG Pro merged blue header standard with only the script name. The remaining rows focus on the active decision: pullback state, failure score, reversal risk, invalidation, and action.
The chart uses a focused failed pullback pocket, a reversal-risk zone, guide rails, and compact labels. The goal is a premium planning view without crowded generic signals.
🧪 Practical Usage Workflow
1. Read the panel state.
2. Check whether a pullback test is active.
3. Watch whether price loses the control rail.
4. Review the Failure Score and reversal-risk label.
5. Compare the invalidation reference and target-room guide before interpreting the context.
🔍 Interpretation Guidelines
Think in terms of failed recovery quality, not prediction.
A higher Failure Score means the current pullback has stronger failed-recovery characteristics across depth, control loss, close behavior, volume, and follow-through.
A control-loss state means the setup is weakening but may still need more confirmation.
A reset state means the failed-pullback idea has been reclaimed and should be reassessed.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a generic pullback continuation indicator
⚠️ Limitations & Transparency
• Timeframe differences can change how pullback depth and failure windows appear.
• High volatility can distort ATR-normalized rails.
• Low-volume instruments may reduce the reliability of the volume component.
• Sideways markets can create repeated failed-pullback noise.
• Outputs should be interpreted with broader market structure.
🧠 Market Context Notes
Failed pullbacks often matter when a market was expected to recover in the direction of the prior trend but instead loses the control reference.
The script does not assume that every failed recovery becomes a full reversal. It simply marks when the context is strong enough to deserve review.
🧾 Use Case Examples
When a bullish trend pulls back toward the fast/base EMA area, fails to recover, and closes below the control rail with stronger participation, the planner may raise bearish reversal-risk context.
When a bearish trend pulls back upward, fails to reject lower, and closes above the control rail with follow-through, the planner may raise bullish reversal-risk context.
🧱 System Philosophy
The script is built around decision quality. It does not try to add another signal layer. It asks whether a specific market behavior is valid, how strong it is, where it is invalidated, and what should be reviewed next.
🔐 Non-Promise Statement
No guarantees.
No certainty.
The script organizes observable market behavior into a structured analytical view.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, risk management, and decisions.
This script does not provide financial advice or guaranteed trading outcomes.
📚 Educational Note
Use the planner as an educational framework for studying failed pullbacks, recovery quality, control loss, and reversal-risk context.
Indicator

Expansion Failure Planner [AGPro Series]Expansion Failure Planner
🧠 Core Idea
Did volatility expansion create real travel, or did it fail back inside the prior structure?
📌 Overview / What it does
Expansion Failure Planner is a public-free PulseWire indicator built to evaluate failed volatility expansion attempts. It detects when price expands beyond a recent range edge, then tracks whether the move produces meaningful travel or quickly loses the edge.
The script produces a failed expansion corridor, expansion-edge guide, risk shelf, return-to-range target guide, compact state labels, alerts, and a clean AG Pro planning panel. It does not predict future price direction or automate trade decisions.
🎯 Purpose & Design Philosophy
This script was built for traders who do not only want to see that volatility expanded. They want to know whether the expansion still has quality, whether failure risk is rising, and what context should be reviewed next.
The design supports a decision-first workflow: identify the expansion attempt, measure failure risk, review target room, and decide whether the context deserves attention.
⚡ Why This Script Is Different
Most volatility tools focus on expansion, squeeze release, or breakout continuation.
This script does NOT act as a generic breakout signal, generic S/R zone, or continuation-only volatility map.
Instead, it focuses on one narrow question: did the expansion fail before producing real travel?
⚙️ Methodology
1. Context Detection
The script defines a prior range and watches for a volatility expansion attempt beyond that range edge.
2. Reference Mapping
It stores the expansion edge, expansion extreme, prior range midpoint, and return-to-range target area.
3. Reaction Evaluation
The planner scores failed travel using ATR expansion, close-back-inside behavior, missing follow-through, volume response, and range re-entry quality.
4. Visual Output
It draws the failed expansion corridor, expansion edge, risk shelf, return target, compact labels, and a premium AG Pro panel.
🗺️ How to Read the Chart
Zones = the failed expansion corridor between the original edge and the expansion extreme.
Labels = expansion attempts, failure-ready states, watch states, hold states, and reset context.
Colors = teal for upside expansion attempts, pink for downside expansion attempts, yellow for watch context, and indigo for edge/hold review.
Panel = the preferred viewing timeframe, current expansion state, 0-100 failure risk, reclaim status, target room, and next action.
🚦 Signals & States
• UP EXP / DN EXP → a volatility expansion attempt has been detected.
• UP FAIL / DN FAIL → the expansion failed back inside the prior structure with enough score.
• WATCH → failure risk is developing but confirmation is incomplete.
• HOLD → expansion is still holding beyond the edge.
• RESET / NO FAIL → the active failure window expired or real travel invalidated the failure context.
🔔 Alerts Logic
Alerts trigger when expansion failure reaches ready status, when watch context develops, when expansion holds beyond the edge, or when the failure window resets.
Alerts are attention markers only. They are not trade instructions.
🧩 Confluence Logic
The strongest context appears when ATR expansion, edge loss, missing follow-through, range re-entry, and participation align. When these components agree, the failure risk score increases.
📊 When to Use
• After volatility expansion attempts
• Around range-edge probes
• During breakout failure review
• When a move expands but does not travel
• When price quickly returns inside prior structure
⚠️ When NOT to Use
• Extremely low-liquidity symbols
• Very noisy micro ranges
• News-driven candles with abnormal gaps
• Markets where volume data is unreliable
• Charts where the prior range is not structurally meaningful
🎛️ Key Inputs
• Sensitivity → changes how strict the failure model is.
• Prior Range Lookback → defines the structure used for expansion reference.
• Expansion Bar ATR → controls how large a candle must be to qualify.
• Required Real Travel ATR → defines how much progress the expansion should produce.
• Confirmation Mode → controls close/volume/strict confirmation.
• Visual Settings → control corridor, guides, labels, projection, and label size.
• Panel Settings → control panel visibility, location, theme, font size, and best-viewed timeframe guidance.
🖥️ Interface & Visual Design
The panel is designed as a compact planning cockpit. The first row uses the AGPro merged blue header standard, while the remaining rows show best-viewed timeframe guidance, state, score, reclaim status, target room, and action.
The visual hierarchy keeps the chart readable: one active corridor, clear guide lines, and controlled labels.
🧪 Practical Usage Workflow
1. Read the panel state.
2. Check whether price is above or below the expansion edge.
3. Review the failed expansion corridor.
4. Compare failure risk with target room.
5. Use alerts as attention markers, not decisions.
🔍 Interpretation Guidelines
Think in terms of failed travel, not prediction. A high score means the script detected stronger failure characteristics. A low score means expansion may still be holding, or failure evidence is not strong enough.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a generic breakout indicator
• Not a generic support/resistance zone map
⚠️ Limitations & Transparency
• Timeframe differences can change expansion and failure structure.
• Volatility spikes can distort ATR-based scoring.
• Volume quality varies by market.
• Fast markets can move beyond the corridor before confirmation.
• Outputs should be interpreted within broader market context.
🧠 Market Context Notes
Expansion failure often matters when volatility appears strong but cannot create distance. This script focuses on that transition point between momentum attempt and failed travel.
🧾 Use Case Examples
When price expands above a range, stalls quickly, closes back inside the edge, and fails to build distance, the planner can mark an upside expansion failure.
When price expands below a range, loses downside follow-through, and re-enters the structure, the planner can mark a downside expansion failure.
🧱 System Philosophy
AGPro tools are built to reduce chart ambiguity by turning raw market events into structured decision context.
🔐 Non-Promise Statement
No indicator can provide certainty. This script provides rule-based context only.
📉 Risk Disclosure
Trading involves risk. Users are responsible for their own decisions. This script does not provide financial advice or guaranteed trading outcomes.
📚 Educational Note
Use the script as a structured learning and review tool for expansion failure behavior, failed travel, and volatility response.
Indicator

Momentum Pullback Continuation [AGPro Series]Momentum Pullback Continuation
🧠 Core Idea
Is a momentum pullback resetting cleanly for continuation, or is the move losing its execution quality?
📌 Overview / What it does
Momentum Pullback Continuation is a chart-first continuation planner built for traders who review momentum-driven trends after a controlled pullback.
The script maps a momentum reset pocket, continuation trigger line, invalidation rail, target-room corridor, state labels, alerts, and a clean AGPro planning panel. It converts trend support, momentum slope, pullback depth, close recovery, volume behavior, and target room into a 0-100 Continuation Score.
The default publication preset is 1H-focused. Higher timeframes can be tested from the inputs, but the strongest intended use case is hourly momentum pullback review.
It does not predict price, automate entries, or turn every trend pullback into a signal. It is a structured decision tool for evaluating whether the current momentum reset deserves closer review.
🎯 Purpose & Design Philosophy
This script was built to fill the gap between basic momentum readings and practical continuation planning.
Many traders can see that momentum exists, but the harder question is whether the pullback is resetting in a controlled way or damaging the continuation structure. This planner focuses on that decision layer.
The design supports a disciplined workflow: identify the active momentum side, inspect the reset pocket, evaluate the score, locate the invalidation rail, compare target room, and read the next-action state.
⚡ Why This Script Is Different
Most tools focus on momentum oscillators, moving-average direction, divergence events, or generic continuation labels.
This script does NOT clone Hidden Divergence Continuation Zones, Trend Continuation Quality, Structural Momentum Oscillator, ROC Momentum Shift Map, or a generic pullback signal map.
Instead, it treats the pullback as a planning event. The main output is not a buy/sell marker. It is a momentum reset decision state with score, risk edge, target-room context, and action guidance.
⚙️ Methodology
1. Context Detection
The script identifies bullish or bearish momentum context using an EMA stack, normalized trend slope, and smoothed rate-of-change pressure.
2. Reference Mapping
It builds a concept-native Momentum Reset Pocket around the active trend support area, then maps a continuation trigger line, invalidation rail, and target-room guide.
3. Reaction Evaluation
The score model evaluates momentum slope, pullback depth, trend support, close recovery, volume behavior, and available target room.
4. Visual Output
The chart shows the reset pocket, target-room corridor, trigger and risk guides, compact event labels, sparse context labels, alerts, and a premium AGPro panel.
🗺️ How to Read the Chart
Reset Pocket = the area where a momentum pullback is expected to stabilize before continuation can be reviewed.
Trigger Line = the fast continuation reference that price needs to recover after the reset.
Invalidation Rail = the planning line where the active reset context is considered lost.
Target-Room Corridor = the forward planning area between current price and the target-room guide.
Labels = RESET, WATCH, READY, WEAK, and INVALID attention markers.
Colors = teal marks bullish continuation context, pink marks bearish continuation context, amber marks weak or caution states, indigo marks watch/target-room context, and red marks invalidation.
Panel = summarizes Momentum State, Pullback Quality, Continuation Score, Risk Edge, and Action.
🚦 Signals & States
• RESET → price has interacted with the momentum reset pocket.
• WATCH → the reset is developing, but recovery or score quality is not complete.
• READY → momentum, pullback depth, recovery, volume context, and target room align strongly enough for structured review.
• WEAK → the pullback is too deep, low quality, or not recovering well enough.
• INVALID → price has crossed the invalidation rail and the active reset context should be rebuilt.
🔔 Alerts Logic
Alerts trigger when READY, WATCH, WEAK RESET, or INVALID states appear.
Each alert is an attention marker tied to the rule-based state engine. Alerts are not trade instructions and do not guarantee that continuation will occur.
🧩 Confluence Logic
The continuation context becomes stronger when trend support, positive momentum slope, controlled pullback depth, clean close recovery, acceptable volume behavior, and target-room availability align.
The script intentionally requires multiple conditions instead of labeling every pullback inside a trend as meaningful.
📊 When to Use
• Directional markets with visible momentum pressure
• 1H charts and nearby intraday momentum review
• Trend continuation review workflows
• Pullbacks after a clear momentum impulse
• Situations where risk edge and target room matter before acting
• Markets where volume and close behavior are readable enough to support context
⚠️ When NOT to Use
• Low-liquidity symbols with unreliable candles or volume
• Extremely choppy markets with frequent trend-side flips
• News-driven volatility where reset structure changes too quickly
• Very flat markets where momentum pressure is absent
• Instruments where the active pullback is far beyond the mapped risk edge
🎛️ Key Inputs
• Continuation Side → selects Auto, Bullish Only, or Bearish Only evaluation.
• Timeframe Profile → keeps the default script behavior focused on 1H charts, with optional broader intraday or all-timeframe testing.
• Sensitivity → adjusts how strict the momentum reset model is.
• EMA settings → define trigger, reset, and support references.
• Momentum ROC settings → control the internal momentum pressure reading.
• Reset Pocket Width → changes how wide the reset area is around trend support.
• READY / WATCH Score → sets state thresholds.
• Visual settings → control zones, guide lines, labels, panel theme, panel location, and font sizes.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first and practical.
The reset pocket and target-room corridor provide the main visual planning structure. Labels are compact and spaced with cooldown controls. The AGPro panel uses a single merged blue header row and focuses only on the core decision fields.
🧪 Practical Usage Workflow
1. Read the panel Momentum State.
2. Check whether price is interacting with the Momentum Reset Pocket.
3. Compare Pullback Quality and Continuation Score.
4. Locate the Risk Edge and Target-Room Corridor.
5. Use the Action row to decide whether the context is READY, still WATCH, weak, invalid, or only worth scanning.
🔍 Interpretation Guidelines
Think of the script as a continuation readiness map, not a command system.
A higher score means the active momentum pullback matches the script's internal definition of cleaner continuation structure. A lower score means one or more components are missing, such as trend support, recovery quality, volume context, or target room.
The invalidation rail is a planning boundary for the active context. It is not a guaranteed stop level and should not replace the user's own risk process.
🚫 What This Script Is NOT
This script is not a prediction engine.
This script is not financial advice.
This script is not an auto-trading system.
This script does not provide guaranteed signals.
This script does not replace independent confirmation, position sizing, or risk management.
⚠️ Limitations & Transparency
Momentum continuation behavior changes across symbols, sessions, and timeframes.
The default 1H Focus profile intentionally suppresses active labels, zones, and alerts outside the intended hourly review window.
Low-liquidity markets can distort volume behavior and reset quality.
High volatility can widen risk edges and reduce target-room clarity.
Sideways conditions can create repeated resets without clean continuation.
No rule-based script can fully account for sudden news, spread changes, slippage, or discretionary execution constraints.
🧠 Market Context Notes
Momentum pullbacks are often more useful when the broader trend remains intact, the pullback is controlled rather than impulsive against trend, and the recovery candle shows clear close quality.
The best reads usually come from alignment between structure, momentum, volume, volatility, and clean forward room.
🧾 Use Case Examples
When price pulls into the reset pocket during bullish momentum and then recovers the trigger line with a stronger score, the script can mark READY for continuation review.
When price enters the pocket but momentum slope fades and pullback depth becomes excessive, the script can mark WEAK RESET.
When price crosses the invalidation rail, the active reset context is treated as lost and should be rebuilt.
🧱 System Philosophy
AGPro tools are built around structured interpretation.
The goal is not to create more chart noise. The goal is to turn visible market behavior into a cleaner decision framework: context, quality, risk, target room, and next action.
🔐 Non-Promise Statement
No script can provide certainty.
No score guarantees continuation.
The output should be interpreted as structured context, not as a promise of future price movement.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, confirmation, position sizing, and decisions.
This script is for educational and analytical use only and does not provide financial advice.
📚 Educational Note
Use the planner to study how momentum resets behave across different symbols and timeframes. Over time, compare READY, WATCH, WEAK RESET, and INVALID states to understand which environments produce cleaner continuation structure.
Indicator

Volatility Cooldown Planner [AGPro Series]Volatility Cooldown Planner
🧠 Core Idea
Has volatility cooled down enough to read the chart again?
📌 Overview / What it does
Volatility Cooldown Planner is a chart-first volatility risk and readiness tool built for the period after a sharp ATR spike, wide-range candle, or large wick event.
Instead of printing another directional signal, the script asks whether the market is still unstable, cooling, ready for review, or readable again. It produces a spike box, a forward cooldown band, spike rails, unsafe volatility warnings, readiness labels, alerts, and a clean AGPro planning panel.
The script does not predict news events, identify hidden catalysts, automate decisions, or tell users what to buy or sell. Its role is to organize post-spike volatility context into a readable decision workflow.
🎯 Purpose & Design Philosophy
This script was built for traders who often face the same problem after sudden volatility: the chart is active, but not always readable.
Many tools focus on volatility expansion, squeeze release, regime classification, or breakout confirmation. Those can be useful, but they do not always answer the practical question that appears after a spike: should the trader keep reading this structure now, or wait until volatility load normalizes?
The design philosophy is simple: after unstable volatility, the first decision is not direction. The first decision is whether the chart is clean enough to evaluate.
⚡ Why This Script Is Different
Most volatility tools focus on detecting expansion, squeeze release, high ATR regimes, or dramatic candles.
This script does NOT try to detect news events, does not clone a volatility expansion planner, does not act as a stop-run model, and does not classify broad volatility cycles.
Instead, it studies the cooling process after the spike. The main output is a 0-100 Cooldown Score and a next-action state that separates UNSAFE, TOO EARLY, COOLING, READINESS REVIEW, and CHART READABLE conditions.
⚙️ Methodology
1. Spike Detection
The engine identifies spike context using ATR Load, single-bar range expansion, and dominant wick size.
2. Cooldown Mapping
When a spike appears, the script draws a spike box and a forward cooldown band. The band becomes the active review area for post-spike readability.
3. Readiness Evaluation
The model scores ATR load normalization, range contraction, time decay, close-to-close stability, and wick pressure.
4. Visual Output
The planner displays the active state through labels, rails, band color, alert conditions, and a compact AGPro panel.
🗺️ How to Read the Chart
Spike Box = the original volatility shock area.
Cooldown Band = the forward review window where the script evaluates whether volatility is becoming readable again.
Spike Rails = the upper and lower reference boundaries from the spike event. They are volatility context rails, not entry or stop instructions.
Readability Trail = an optional lightweight dot layer for users who want extra chart presence between major labels. It is disabled by default for a cleaner publication preset.
Unsafe Label = volatility has reloaded before cooldown completed.
Ready / Readable Labels = the cooldown score has reached a stronger review state.
Panel = a compact decision view showing Spike State, Cooldown Score, Volatility Load, Readiness, Action, and Best View.
🚦 Signals & States
• SPIKE → a new volatility shock has been registered.
• UNSAFE → volatility reloaded before the cooldown process became stable.
• TOO EARLY → not enough bars have passed after the spike.
• COOLING → volatility is improving, but readiness is not strong enough yet.
• READINESS REVIEW → conditions are strong enough to review the chart again.
• CHART READABLE → ATR load has normalized and the cooldown score is strong.
🔔 Alerts Logic
Volatility Spike Registered triggers when ATR load, range expansion, or wick pressure qualifies as a spike event.
Unsafe Volatility Reload triggers when volatility expands again during the active cooldown window.
Cooldown Readiness Review triggers when the cooldown score reaches the readiness threshold.
Chart Readable After Cooldown triggers when volatility load and cooldown quality both reach the strongest readable state.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The strongest cooldown state appears when multiple conditions align:
ATR load falls toward the target area, recent ranges contract, close-to-close movement stabilizes, wick pressure fades, and enough time has passed after the spike.
When these conditions align, the chart becomes more readable under the script's rules. This does not create certainty or directional prediction.
📊 When to Use
• After sharp ATR spikes
• After wide-range candles
• After large wick events
• After fast liquidation-style movement
• During post-event stabilization
• When the chart feels too unstable to interpret cleanly
• Best visual fit: 4H charts and intraday-swing volatility review
• Daily charts can work for broader context, but they may look more sparse because fewer cooldown events appear
⚠️ When NOT to Use
• Very low-liquidity markets
• Illiquid sessions with unreliable candle structure
• Extreme news volatility where conditions keep changing quickly
• Symbols with irregular gaps or poor feed quality
• As a standalone directional entry system
🎛️ Key Inputs
• Sensitivity → controls how demanding spike detection is.
• ATR Length → normalizes spike size and label offsets.
• ATR Baseline Length → defines the local volatility baseline.
• Cooldown Review Window → controls how long the spike remains under review.
• Cooldown Target ATR Load → defines the internal volatility load target for readability.
• Readiness Score Threshold → defines when the panel can mark readiness review.
• Visual settings → control spike boxes, cooldown bands, rails, markers, and background warnings.
• Readability Trail → optional subtle chart presence during active cooldown or elevated volatility.
• Label and Panel Font Size → control chart labels and panel readability.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first.
The spike box explains where the instability started. The cooldown band shows the active review window. The centered band label gives the current state without forcing the user into a lower-pane dashboard.
The default visual preset keeps the chart calmer by hiding standalone spike event labels, sparse context labels, label scores, readable-upgrade follow-up labels, and the optional readability trail. Users can enable those layers when they want a denser visual review.
The AGPro panel follows the public-release standard with one merged blue header row containing only the panel title. The remaining rows focus on decision context rather than raw data overload, including a Best View row that points users toward the 4H chart when needed.
🧪 Practical Usage Workflow
1. Read the panel Readiness and Action fields.
2. Start with a 4H chart when preparing a visual review or publication screenshot.
3. Check whether the chart is still inside an active cooldown band.
4. Watch Volatility Load and Cooldown Score.
5. Treat UNSAFE as a warning that the chart may still be unstable.
6. Treat READINESS REVIEW or CHART READABLE as a prompt to evaluate broader structure, not as an automatic trade command.
🔍 Interpretation Guidelines
A high cooldown score means volatility has normalized under the script's rule set.
It does not mean price must continue, reverse, or respect the spike rails.
The best use is as a readability filter after unstable movement. It helps the trader decide whether the market is still too hot, cooling, or clean enough to study again.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a news-event detector
• Not a volatility expansion breakout tool
• Not a stop-run or liquidity-sweep model
⚠️ Limitations & Transparency
This script uses standard PulseWire OHLCV data and ATR-based measurements.
It cannot identify the real-world cause of volatility. It cannot know whether a spike came from news, liquidation, session flow, thin liquidity, or normal order flow.
Timeframe selection, symbol liquidity, session structure, and volatility regime can affect how quickly cooldown states appear. The default preset is visually best suited to 4H charts; lower timeframes may require stricter inputs, while Daily charts may naturally show fewer events.
🧠 Market Context Notes
Volatility often becomes hardest to interpret immediately after a sharp event.
Some spikes create clean follow-through. Others create unstable noise, whipsaw, or delayed normalization.
This planner focuses on the cooling process, not the directional outcome.
🧾 Use Case Examples
When a wide candle appears and the panel shows UNSAFE, the trader can wait for volatility load to normalize before interpreting follow-through.
When a spike box remains active but the score rises into READINESS REVIEW, the trader can compare the cooldown band with broader structure, trend, liquidity, and personal execution rules.
When the panel reaches CHART READABLE, the market is no longer classified as overheated by the script, but the user still needs independent context.
🧱 System Philosophy
AGPro tools are designed to convert market structure into decision context.
This script follows that philosophy by turning post-spike volatility into a readable workflow: identify the shock, monitor the cooldown, evaluate the readiness state, and avoid treating every fast move as immediately actionable.
🔐 Non-Promise Statement
No script can remove uncertainty.
No cooldown state guarantees that the next move will be clean.
The output is a structured analytical context, not certainty.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, risk management, and decisions.
This script is for educational and analytical use only and does not provide financial advice.
📚 Educational Note
Use the planner to study how volatility behaves after spikes, how long different symbols take to normalize, and how readability changes across timeframes.
Indicator

Continuation Acceptance Planner [AGPro Series]Continuation Acceptance Planner
🧠 Core Idea
Is this continuation setup being accepted, delayed, or invalidated before the next decision point?
📌 Overview / What it does
Continuation Acceptance Planner is a chart-first continuation planning tool built to evaluate whether a pullback inside an active trend is producing real acceptance or only temporary hesitation.
The script builds a live continuation acceptance band around a trend base, scores the context from 0 to 100, maps the invalidation rail, checks target room against the nearest obstruction, and prints compact state labels such as ACCEPTED, DELAYED, PAUSED, WATCH, and INVALID.
It does not predict future price movement, automate entries, or produce guaranteed trade signals. Its role is to organize continuation context into a cleaner decision framework.
🎯 Purpose & Design Philosophy
This script was built for traders who want to judge continuation quality without turning every trend pullback into a signal.
Most continuation tools focus on bounce detection or trend strength only. This planner focuses on the decision layer: acceptance quality, pullback risk, target room, invalidation context, and the next action state.
The design supports a patient execution mindset. It helps the user ask whether the continuation is actually being accepted, still delayed, temporarily paused, too extended, or losing validity.
⚡ Why This Script Is Different
Most tools focus on generic trend continuation signals after a moving average touch or pullback bounce.
This script does NOT act as a simple buy/sell continuation indicator, and it does not clone a broad trend-continuation quality scanner.
Instead, it treats continuation as a planning problem: price must interact with an acceptance band, show a quality close, maintain enough room before obstruction, and stay above or below a clear invalidation rail.
⚙️ Methodology
1. Context Detection
The script identifies bullish or bearish continuation context using fast, base, and slow EMA alignment plus trend slope.
2. Reference Mapping
It creates a continuation acceptance band around the base EMA and maps the invalidation rail using the band edge, slow EMA, and ATR buffer.
3. Reaction Evaluation
It evaluates pullback depth, close acceptance, volume support, and whether price is delaying, accepting, extending, or moving toward invalidation.
4. Visual Output
The script displays a centered acceptance-band label, invalidation and target guides, compact state labels, and a premium AG Pro planning panel.
🗺️ How to Read the Chart
Zones = the live continuation acceptance band around the trend base.
Labels = accepted, delayed, invalidation, or watch-state markers with optional 0-100 score.
Colors = bullish continuation context uses teal, bearish continuation context uses pink, delayed context uses amber, and risk or invalidation context uses red.
Panel = a compact decision dashboard showing Continuation Score, Acceptance, Pullback Risk, Target Room, and Action.
🚦 Signals & States
• ACCEPTED → continuation context has a qualified acceptance close and enough score to review.
• DELAYED → price is interacting with the acceptance band but has not produced enough clean acceptance.
• PAUSED → the prior continuation side still matters, but the trend stack needs to rebuild before the setup becomes clean again.
• WATCH → continuation context exists, but the setup still needs clearer reaction.
• EXTENDED → price is away from the acceptance band and may be late for clean continuation planning.
• INVALID RISK → price is moving beyond the planner's invalidation rail.
🔔 Alerts Logic
Alerts trigger when continuation acceptance, delayed acceptance, invalidation risk, or blocked target room conditions appear.
Alerts are attention markers only. They are not trade instructions and should be interpreted with the broader chart context.
🧩 Confluence Logic
The strongest continuation context appears when trend alignment, controlled pullback depth, close acceptance, volume support, and clean target room align.
When these components align, the continuation score improves and the panel moves toward a clearer planning state.
📊 When to Use
• Primary timeframe: 1H
• Secondary timeframe: 4H
• Trending markets with structured pullbacks
• Continuation setups after a controlled pause
• Pullbacks into a moving trend base
• Situations where target room and invalidation clarity matter
⚠️ When NOT to Use
• When expecting dense signals on 1D or 1W charts
• Very low liquidity environments
• Extremely noisy sideways conditions
• High-volatility shock moves where trend anchors distort quickly
• Markets with no clean trend alignment
🎛️ Key Inputs
• Sensitivity → changes how strict the acceptance engine is.
• Target Obstruction Lookback → defines the prior obstruction used for target-room evaluation.
• Acceptance Band Width ATR → controls the width of the continuation band.
• Confirmation Mode → defines whether acceptance requires close behavior only, close plus volume, or stricter alignment.
• Label and Panel Settings → control visual density, font size, panel location, and theme.
🖥️ Interface & Visual Design
The panel is designed as a compact planning dashboard, not a data-heavy scanner.
The first row follows the AG Pro blue merged-header standard. The remaining rows focus only on the information needed for continuation planning: score, acceptance, pullback risk, target room, and action.
Chart visuals are intentionally controlled so the acceptance band, invalidation rail, target guide, and labels remain readable.
🧪 Practical Usage Workflow
1. Read the panel state.
2. Check whether price is interacting with the acceptance band.
3. Review the continuation score and pullback risk.
4. Compare target room with the invalidation rail.
5. Use labels and alerts as attention markers, not as automatic decisions.
🔍 Interpretation Guidelines
Think in terms of setup quality, not prediction.
A higher score means the current continuation context has stronger alignment across trend, pullback depth, close behavior, volume, and target room.
A delayed state means the idea is not necessarily invalid, but the chart has not yet produced clean acceptance.
A paused state means the prior continuation context is still nearby, but alignment weakened enough that patience matters more than chasing.
An invalidation-risk state means the continuation structure should be reassessed.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not a guaranteed signal generator
• Not a generic support/resistance or order-block map
• Not a gap continuation planner or breakout acceptance planner
⚠️ Limitations & Transparency
Timeframe differences can change how continuation bands and target-room references appear.
Volatility expansion can move the acceptance band and invalidation rail quickly.
Low-volume or synthetic symbols may reduce the usefulness of the volume component.
All outputs are rule-based and should be interpreted within broader market context.
🧠 Market Context Notes
Continuation planning depends on trend structure, liquidity, volatility, and obstruction distance.
The cleanest cases usually appear when pullbacks are controlled, the acceptance close is clear, and the next obstruction is not too close.
In the current public-release tuning, the script reads cleanest on 1H charts and remains usable on 4H. Daily and weekly charts can still provide context, but they are less expressive for the intended acceptance-versus-delay workflow.
🧾 Use Case Examples
When price pulls back into the acceptance band during a bullish trend and closes back above the base EMA with sufficient target room, the planner may shift toward ACCEPTED.
When price stays inside the band without a clean close, the planner may remain DELAYED.
When price closes beyond the invalidation rail, the planner flags INVALID RISK.
🧱 System Philosophy
The script follows the AGProLabs decision-engine approach: a useful public tool should help traders evaluate validity, strength, risk, target room, and the next action state.
It is built to guide interpretation, not to replace trader judgment.
🔐 Non-Promise Statement
No script can provide certainty.
No output from this script guarantees continuation, reversal, profit, or loss avoidance.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own decisions.
This script does not provide financial advice and should be used only as an educational and analytical tool.
📚 Educational Note
Use the planner to study how continuation acceptance develops across different symbols, sessions, volatility regimes, and timeframes.
Indicator

Structure Retest Planner [AGPro Series]Structure Retest Planner
🧠 Core Idea
Is the active structure retest being accepted, rejected, or invalidated?
📌 Overview / What it does
Structure Retest Planner is a structure-based trade planning overlay designed to help traders evaluate how price behaves when it returns to an important swing-derived structure rail.
The script maps the active support-side or resistance-side rail, draws a focused retest box around that rail, scores the retest from 0-100, and projects practical invalidation and target guides. The goal is to organize the retest decision process: structure state, score, acceptance, invalidation, and next action.
It does not predict the next move, does not automate trading, and does not turn every swing point into a generic support/resistance signal. It is a decision-support planner for reading acceptance and rejection around a live structure retest.
🎯 Purpose & Design Philosophy
This script was built for traders who use price structure but need a cleaner way to judge whether a retest deserves attention.
Most structure tools identify levels, breaks, or swing labels. Structure Retest Planner focuses on the next decision after a rail is present: is price responding cleanly enough, is invalidation nearby, and what should be reviewed next?
The design supports a planning mindset rather than a signal-chasing mindset. It is meant to make the chart easier to interpret while keeping the trader responsible for context and risk.
⚡ Why This Script Is Different
Most tools focus on plotting structure breaks, BOS / CHoCH labels, or broad support and resistance zones.
This script does NOT clone a BOS / CHoCH detector and does NOT duplicate a first-break retest grader.
Instead, it treats the active structure rail as a planning reference and evaluates acceptance, rejection, volatility fit, trend agreement, invalidation distance, and next-action state in one workflow.
⚙️ Methodology
1. Context Detection
The script confirms swing-derived structure rails using pivot logic and identifies whether the active planning side is support retest, resistance retest, or automatic nearest-rail context.
2. Reference Mapping
It draws a retest box around the active rail, plus an invalidation shelf and target guide. These are planning references, not guaranteed outcomes.
3. Reaction Evaluation
The 0-100 score combines level origin quality, retest response, close location, volatility fit, and trend agreement.
4. Visual Output
The script shows a centered retest-box label, compact event labels, rail/invalidation/target guides, alerts, and a premium AG Pro panel.
🗺️ How to Read the Chart
Zones = the active retest box around the selected structure rail.
Labels = watch, accepted, rejected, invalidated, or risk-review states with optional score and grade.
Colors = teal for support-side acceptance, pink for resistance-side or rejection pressure, yellow for review states, and indigo for planning context.
Panel = structure state, retest score, acceptance state, invalidation shelf, and next action.
🚦 Signals & States
• Retest Watch → price is close enough to the active rail and the score is improving.
• Accepted → price tested the rail and closed constructively on the expected side.
• Ready → acceptance is active and the score reached the ready threshold.
• Rejected → price tested the rail but did not show clean acceptance.
• Invalidated → price closed beyond the invalidation shelf.
• Risk Review → retest behavior exists, but volatility is too hot for clean reading.
🔔 Alerts Logic
Alerts trigger when the script detects a new watch state, accepted retest, high-quality retest review, rejected retest, or invalidation shelf break.
Alerts are attention markers. They are not trade instructions and should always be interpreted with broader market context.
🧩 Confluence Logic
The score improves when the active rail has a cleaner structural origin, price reacts near the rail, the close lands on the expected side, volatility is not overheated, and trend context agrees with the retest side.
When these factors align, the retest context becomes easier to review. When they conflict, the panel shifts toward waiting, context confirmation, risk review, or reset.
📊 When to Use
• Pullbacks toward confirmed swing structure
• Trend continuation retests
• Resistance retests after bearish structure pressure
• Support retests after bullish structure pressure
• Markets where structure rails are visible and not excessively noisy
⚠️ When NOT to Use
• Very low-liquidity symbols
• Extremely noisy sideways markets
• News-driven volatility spikes
• Markets where pivot structure is too compressed to provide useful rails
• Any situation where the user expects automated entry or exit instructions
🎛️ Key Inputs
• Retest Side → selects Auto, Support Retest, or Resistance Retest.
• Structure Pivot Length → controls how structure rails are confirmed.
• Sensitivity → changes retest-box width and activation behavior.
• Retest Ready Score → sets the minimum score for stronger review states.
• Invalidation Shelf ATR → adjusts the planning invalidation reference.
• Target Guide R Multiple → projects the forward target guide from planning risk.
• Label and Panel Font Size → controls visual readability.
• Panel Location and Theme → adjusts interface placement and style.
🖥️ Interface & Visual Design
The panel is built as a compact planning dashboard with one merged blue AG Pro header row and five decision rows.
The chart visuals are intentionally restrained: one active retest box, centered box text, structure rail, invalidation shelf, target guide, and controlled labels.
The design goal is to make the active retest decision readable without turning the chart into a dense support/resistance map.
🧪 Practical Usage Workflow
1. Read the panel to identify the active structure state.
2. Check whether price is approaching or testing the retest box.
3. Review the retest score and acceptance state.
4. Compare the invalidation shelf and target guide.
5. Use your own broader context before making any decision.
🔍 Interpretation Guidelines
A higher score means the retest is cleaner within the script's rule set. It does not mean price must continue.
Acceptance means the bar closed constructively relative to the rail. Rejection means the rail is not holding cleanly. Invalidation means the planning reference has been crossed and the setup should be reviewed again.
Use the script to organize thinking, not to outsource judgment.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not a BOS / CHoCH auto detector
• Not a generic support/resistance zone map
⚠️ Limitations & Transparency
The script uses pivot-based structure, so rails appear only after pivots are confirmed.
Timeframe choice, volatility, liquidity, and symbol behavior can materially change how retests appear.
Fast markets may pass through a rail before the retest can be evaluated cleanly. Sideways markets may create repeated low-quality tests.
🧠 Market Context Notes
Structure retests are easier to interpret when liquidity, trend context, and volatility are aligned.
A clean rail is not enough on its own. The reaction, close location, invalidation distance, and broader environment all matter.
🧾 Use Case Examples
When price returns to a prior support rail and closes back above it with a strong lower wick, the planner may shift from watch to accepted if the score is high enough.
When price tests resistance but closes back below the rail with volatility under control, the planner may mark a cleaner resistance-side review state.
When price closes beyond the invalidation shelf, the planner marks the context as invalidated and the plan should be reset.
🧱 System Philosophy
Structure Retest Planner is part of the AGPro Series decision-engine direction: tools should help traders answer what is valid, how strong it is, where risk is, and what should be reviewed next.
🔐 Non-Promise Statement
No signal from this script guarantees continuation, reversal, or profit.
The output is a structured analytical read, not certainty.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, risk management, and decisions.
This script does not provide financial advice and does not guarantee trading outcomes.
📚 Educational Note
Use the planner to study how structure retests behave across symbols and timeframes, especially how acceptance, rejection, volatility, and invalidation interact.
Indicator
