Liquidity Void Navigator [AGPro Series]Liquidity Void Navigator
🔹 OVERVIEW
Liquidity Void Navigator identifies impulsive price displacements that were produced with disproportionately low volume participation — the institutional footprint of a true liquidity void. Unlike geometric gap concepts that rely purely on wick-to-wick imbalance, this engine measures the efficiency of each impulsive bar: how much price moved relative to how much volume was transacted. When price travels faster than the order book justifies, a magnet zone is born. These zones frequently act as high-probability retest and mean-reversion targets for SMC and ICT traders.
🔹 UNIQUE EDGE
Most gap-based tools on PulseWire detect Fair Value Gaps using a 3-bar geometric pattern. This indicator uses a fundamentally different signature:
- Volume Efficiency Ratio (core innovation): efficiency = (volume / avgVol) / (range / ATR). Values below the threshold reveal bars where price displacement outpaced volume effort — the statistical definition of a liquidity void.
- Body-based zones, not wick-to-wick: the void box spans the impulsive candle body, excluding wicks that represent liquidity sweeps.
- Dynamic lifecycle management: zones are tracked from birth through mid-line mitigation, with configurable trigger modes (close cross, wick touch, or full fill).
- Strongest-void emphasis: the lowest-efficiency active void automatically receives a bold neutral-colored border, giving traders an at-a-glance view of the most reliable magnet on the chart.
🔹 METHODOLOGY
Each completed bar is evaluated against four quality filters:
1. Range Expansion — bar range must exceed ATR × configurable multiplier (default 1.3).
2. Volume Efficiency — the efficiency ratio must fall below the configurable cap (default 0.85).
3. Minimum Height — void must be at least a fraction of ATR to filter micro-noise (default 0.5×).
4. Body Dominance — the candle body must represent at least 50% of the total range, confirming directional conviction rather than indecision.
Qualifying bars create a directional void zone spanning the body. An optional next-bar gap confirmation adds stricter FVG-style filtering. Active zones are continuously evaluated against the selected mitigation mode and updated in real time. Oldest active voids are pruned when the per-side cap is exceeded, keeping the chart focused on recent, actionable structure.
🔹 SIGNALS & ALERTS
Four alert conditions are available:
- New Bullish Liquidity Void — an upward impulsive void is detected.
- New Bearish Liquidity Void — a downward impulsive void is detected.
- Bull Void Mitigated — closing price crosses the mid-line of an active bullish void from above.
- Bear Void Mitigated — closing price crosses the mid-line of an active bearish void from below.
Each alert fires only on bar close to eliminate repainting concerns. Alert messages include the ticker and timeframe for multi-chart workflows.
🔹 KEY INPUTS
Void Detection
- Volume Baseline Lookback — window for average volume and range calculations.
- Min Range Expansion (×ATR) — minimum impulsive bar size.
- Max Volume Efficiency Ratio — core void qualification threshold.
- Min Void Height (×ATR) — filters micro-voids.
- Require Gap with Next Bar — optional strict confirmation.
- Mitigation Trigger — choose between Close Cross (institutional default), Wick Touch (strict), or Full Fill (swing).
Lifecycle
- Max Active Voids per Side — visual cap to prevent chart clutter.
- Zone Right Extension — how far zones project to the right.
- Show Mitigated Voids — optionally display filled zones in gray.
Visuals
- Bullish / Bearish / Mitigated colors, mid-line toggle, projection arrow toggle, label size.
Panel
- Show / position / font size.
🔹 HOW TO USE
Trend-aligned reversion entries: When price returns to an unmitigated void in the direction of the higher-timeframe trend, watch for rejection at the mid-line or far edge as a potential long (bull void) or short (bear void) trigger.
Breakout continuation context: Newly formed voids in the direction of a breakout often indicate institutional participation. Waiting for a retest of the void zone can provide improved risk-to-reward compared to chasing the breakout bar.
Strongest-void bias: The yellow-bordered void on the chart represents the lowest-efficiency (statistically strongest) active zone. Traders can treat it as the highest-probability magnet for price revisits.
Fill Rate context: A persistently high fill rate on a given symbol or timeframe indicates that voids fill rapidly — more suitable for scalping. A lower fill rate suggests that unfilled voids accumulate meaningfully, offering swing-style opportunities.
Multi-timeframe workflow: Identify voids on a higher timeframe (4H or 1D) as strategic bias zones, then use a lower timeframe (15m or 1H) for tactical execution when price approaches those higher-timeframe voids.
🔹 LIMITATIONS & TRANSPARENCY
- This indicator is built for liquid markets with reliable volume data. Thinly traded symbols or instruments without accurate volume feeds (some spot FX, certain indices) will produce unreliable results.
- Not every detected void will be retested or filled. Voids are statistical zones of interest, not guarantees.
- The indicator is a visualization and analytical tool, not a trading strategy. It does not generate buy or sell recommendations.
- Fill rate statistics are computed over the visible history of active and mitigated voids and are approximate; they are intended as a relative gauge of symbol behavior, not as a backtested performance metric.
- Mitigation triggers are bar-close based to avoid repainting. Intrabar signals may appear and disappear until the bar confirms.
- Zones have a fixed right extension from their birth bar; the indicator does not extend zones infinitely.
🔹 RISK DISCLOSURE
Trading financial markets involves substantial risk of loss and is not suitable for all investors. Past performance of any technical indicator, including this one, is not indicative of future results. This tool is provided for educational and analytical purposes only and does not constitute financial advice, investment recommendations, or solicitation to trade. Users are solely responsible for their own trading decisions, risk management, and outcomes. Always conduct independent analysis and consult with a qualified financial advisor before making investment decisions. Indicator

Power of Three (AMD) Map [AGPro Series]Power of Three (AMD) Map
🔹 Overview
The Power of Three (AMD) Map visualizes ICT's foundational session-framework concept directly on the chart: Accumulation → Manipulation → Distribution. For each daily or weekly session, the indicator automatically segments the AMD phases, detects classic liquidity sweeps during Manipulation, and projects a distribution target based on the accumulation range. Built for ICT / Smart Money Concept traders who want session-aware bias, transparent sweep validation, and forward-looking expansion projections.
🔹 Unique Edge vs Other PO3 Scripts
Most PO3 indicators on PulseWire simply highlight time-based session blocks and leave liquidity detection to the user's eye. This implementation distinguishes itself through:
• Phase detection by bar count, not timestamps — ensuring consistent AMD ratios across every timeframe from 15m to 1D
• Adaptive sweep confirmation — accepts both same-bar ICT-strict sweeps (wick + close-back) and 2-bar delayed confirmations, significantly improving setup capture without sacrificing quality
• Dual-reference sweep logic — checks both the previous session's accumulation range AND the current session's accumulation range, capturing sweeps that single-reference scripts miss
• TF-adaptive target multiplier — Daily sessions project targets at 0.7× accumulation range, Weekly sessions at 0.3×, aligned with realistic crypto volatility profiles
• Transparent dual-KPI panel — separates Sweep Rate (how often valid sweeps occur) from Target Hit rate (how often the projected expansion completes), giving traders honest, verifiable performance metrics
🔹 Methodology
Each session is divided into three bar-count-based windows:
• Accumulation (first 33% of expected session bars) — tracks the initial range
• Manipulation (next 17%) — scans for liquidity sweeps against the previous session's accumulation high/low and the current accumulation extremes
• Distribution (remaining 50%) — the expected expansion phase, measured against the projected target
A valid Manipulation sweep requires a wick penetrating a reference level followed by a body close back inside (classic ICT definition). In Adaptive mode, sweeps can also confirm within a 2-bar window. The detected sweep direction determines the PO3 bias: sweeping a high produces a Bearish PO3 (expected downside distribution); sweeping a low produces a Bullish PO3 (expected upside distribution). A target price is projected from either the accumulation midpoint (default, symmetrical expansion) or the sweep extreme, multiplied by the configured ratio.
🔹 Signals & Alerts
Four built-in alert conditions:
• Manipulation phase started — Accumulation complete
• Bullish sweep detected — Low was swept, Bullish PO3 forming
• Bearish sweep detected — High was swept, Bearish PO3 forming
• Distribution target hit — Expansion reached projected level
🔹 Key Inputs
• Session Scope — Auto (TF-adaptive), Daily, or Weekly
• Accumulation / Manipulation window percentages (defaults 33% / 17%)
• Sweep Reference — Previous Accumulation, Current Accumulation, or Both (default)
• Sweep Confirmation — Strict (same-bar) or Adaptive (up to 2-bar, default)
• Target Projection Method — From Accumulation Mid (default) or From Sweep Extreme
• Multiplier Mode — Auto TF-adaptive (default) or Manual
• Historical sessions to display (default 5, max 10)
• Full visual customization — colors, label position, font size, panel position & theme
• Premium visuals — sweep triangle markers, target price label (toggleable)
🔹 How to Use
1. Add the indicator to any crypto or forex chart with timeframe 1H–4H (for Daily PO3) or 1D (for Weekly PO3)
2. Watch the Accumulation range form at the start of each session — this defines the sweep reference level
3. When Manipulation phase begins, monitor for a wick that sweeps the previous accumulation high/low with a body close-back (triangle marker appears on confirmed sweeps)
4. Once a sweep confirms, the panel displays the directional bias (Bullish/Bearish PO3), the projected target price, and a dashed target zone extends toward the session end
5. Use the Sweep Rate and Target Hit percentages in the panel to contextualize reliability on your chosen symbol and timeframe
6. The panel's Completion counter grows as new sessions close — give the script enough historical bars to build meaningful statistics
🔹 Limitations & Transparency
• AMD phase windows are bar-count approximations — real sessions do not cleanly segment into 33/17/50 splits. The indicator is a structural guide, not a timing oracle
• Sweep detection requires the chart timeframe to contain at least 4 bars per session. On 1D charts, use Weekly mode; on 1W charts, the indicator will display a warning
• The projected target is a statistical expectation based on the accumulation range. The Target Hit rate (shown in panel) reflects the historical frequency of this expectation being met on the current symbol/timeframe — typically 40–55% on crypto majors
• Sweep Rate shows the percentage of completed sessions where a valid Manipulation sweep was detected; sessions without sweeps produce no bias and no target
• Historical statistics accumulate from the first bar available on the chart and reset only when the chart reloads
🔹 Risk Disclosure
This indicator is a visualization and analysis tool. It does not generate trade signals, predict price movement, or guarantee outcomes. Past Sweep Rate and Target Hit statistics reflect historical behavior only and do not imply future performance. All trading decisions and risk management remain the responsibility of the user. Indicator

Silver Bullet Window Map [AGPro Series]Silver Bullet Window Map
🔹 Overview
Silver Bullet Window Map is a precision time-based tool that maps the three classic ICT "Silver Bullet" kill zones — compact 1-hour windows where institutional order flow is statistically concentrated — and automatically detects Fair Value Gap (FVG) imbalances formed inside each window. Instead of cluttering the chart with session-wide structures, the script isolates only the high-probability time periods ICT scalpers actually trade, rendering each window as a clean vertical zone with a live countdown, pulse highlight on the active window, and a lifecycle S/R zone for every FVG that prints during the window.
🔸 Unique Edge
Most Silver Bullet scripts either draw static colored backgrounds with no analytical value, or detect FVGs across the entire session and overwhelm the chart. This script does neither. It enforces a strict discipline: FVGs are only drawn if they form INSIDE an active Silver Bullet window. Outside-window price action is deliberately ignored. The result is a chart where every marked imbalance carries ICT-legitimate timing context — not noise. Each FVG becomes a horizontal lifecycle zone (bull or bear) that extends forward in time and is dimmed automatically when mitigated, giving you both a real-time map and a historical window-quality record in one view.
🔹 Methodology
The indicator evaluates the current bar's hour and minute in a user-selectable timezone (New York default, per ICT standard) and identifies three windows: London (03:00–04:00), AM (10:00–11:00), and PM (14:00–15:00). During each window, a three-bar FVG check is performed on confirmed bars: a bullish FVG requires the current bar's low to exceed the high two bars back; a bearish FVG requires the current bar's high to fall below the low two bars back. Gaps are filtered by a user-tunable ATR(14) multiplier to reject insignificant imbalances. Valid FVGs are rendered as time-anchored rectangular zones that extend a configurable number of bars into the future and are marked as mitigated the moment price revisits the opposite side of the gap.
A built-in timeframe guard disables rendering on timeframes of 1 hour and above, because Silver Bullet windows are exactly 1 hour long and cannot be resolved by bars equal to or larger than the window itself. On HTF charts, the panel displays a clean warning message instead of a broken visual.
🔸 Signals & Alerts
Four alert conditions are available: London window open, AM window open, PM window open, and window close. The script is designed for discretionary use — it does not issue buy/sell signals. Its purpose is to put the trader inside the correct time context with the correct structural references, and to let the trader read price action within that context.
🔹 Key Inputs
• Timezone: New York / London / UTC / Exchange
• Historical window depth: 1–30 days
• Individual toggles and custom colors for each of the three windows
• Active-window pulse effect (on/off)
• FVG detection (on/off), minimum size as ATR multiple, zone extension in bars
• Mitigation behavior: dim inactive zones or remove them
• Panel position, theme (Dark/Light), and font size
• Window labels and FVG labels: independently toggleable, font size configurable
🔸 How to Use
Best deployed on 1m–30m intraday charts where the 1-hour windows are visually meaningful. The AM window (10:00–11:00 NY) is historically the most actionable for US equities, indices, and major FX pairs. Wait for a window to open — the background lights up, the panel shows ● LIVE, and the window label appears above the opening candle. Look for a displacement candle creating an FVG inside the window. Use the FVG zone as a retest entry reference with risk defined beyond the gap. The panel's countdown and per-window FVG tally help you gauge window quality in real time. At the end of each day, the L / AM / PM tally shows which window produced the most imbalances — a quick read on session character.
🔹 Limitations & Transparency
This indicator does not predict direction. It does not backtest or display historical win rates — such figures on a time-window tool would be statistically misleading without an execution model. FVG detection uses the standard 3-bar definition; alternative definitions (implied fair value, BPR, inversion FVGs, etc.) are not covered by design. The tool is timezone-sensitive: if your data feed's timestamps drift from the selected timezone's DST boundaries, window alignment can shift by one bar around DST transitions. On timeframes equal to or greater than 1 hour, the script deliberately disables all rendering to avoid producing a misleading visual.
🔸 Risk Disclosure
This script is provided for educational and analytical purposes only. It does not constitute financial advice. Trading leveraged instruments carries substantial risk of loss. Past price behavior around kill zones does not guarantee future results. Use proper risk management and position sizing at all times. Indicator

Unicorn Model Detector [AGPro Series]Unicorn Model Detector
Overview
The Unicorn Model Detector identifies one of the most discussed setups in Inner Circle Trader (ICT) and Smart Money Concepts literature: the Unicorn Model. A Unicorn forms when a Breaker Block and a Fair Value Gap (FVG) overlap inside the same price zone — a pocket where prior swing liquidity has been swept and an unfilled imbalance still exists at the retest. The detector scans for these overlaps, tracks every occurrence through its full lifecycle, and reports aggregate statistics in a compact on-chart panel. It is a detection and bookkeeping tool, not a trading strategy.
Unique Edge
Most breaker and FVG scripts publish either zones in isolation or require the user to eyeball the overlap. This detector does the overlap match automatically and only draws a zone when both conditions are present on the same chart area with the same directional bias. A strict causality rule is enforced — the Breaker must form first (after liquidity sweep) and the FVG must appear during or after the retest, which matches the true ICT Unicorn definition. A pairing that consumes a given breaker and FVG is removed from future candidate pools, so the chart never stacks redundant zones from the same source structure. A Loose overlap mode is also provided for users who prefer an ATR-based proximity interpretation instead of strict geometric intersection.
Methodology
1. Swing pivots are detected with a configurable left/right length using ta.pivothigh and ta.pivotlow.
2. When a confirmed pivot forms, the body range of the pivot bar is stored as the potential Breaker source zone.
3. A Breaker Block is registered when price closes through the previous-bar swing level in the opposite direction.
4. A Fair Value Gap is registered when a 3-bar formation produces an unfilled imbalance (low > high for bullish, high < low for bearish) and the gap exceeds a user-defined ATR multiple.
5. A Unicorn is spawned when a same-direction Breaker zone and FVG zone overlap vertically AND the FVG formed at or after the Breaker (causality check).
6. A configurable cooldown prevents consecutive spawns from clustering, improving signal hygiene.
7. The overlap rectangle becomes the tracked zone. Zone mid is the reference entry, the stop is placed 0.4 times the zone height beyond the structure boundary, and the target is projected at the user-defined R-multiple.
Signals & Alerts
Four independent alert conditions are exposed:
- New Unicorn Detected — a fresh bullish or bearish Unicorn has just formed.
- Unicorn Triggered — price has entered the overlap zone of a pending Unicorn.
- Target Hit — a triggered Unicorn has reached its R-multiple target.
- Stop Hit — a triggered Unicorn has been invalidated at its stop level.
All alerts fire once per bar close and include the ticker and timeframe in the payload.
Key Inputs
- Swing Pivot Length (default 7) — left/right length used for pivot confirmation.
- Breaker Lookback (default 80 bars) — maximum age for a broken swing to remain a valid Breaker.
- FVG Minimum Size (default 0.25 x ATR) — noise filter for 3-bar imbalances.
- Overlap Mode (Strict / Loose) — geometric intersection vs ATR-tolerance match.
- Reward-to-Risk Target (default 2.0) — multiple used to project the target level.
- Max Active Pending Unicorns (default 3) — chart-cleanliness cap.
- Cooldown After Signal (default 30 bars) — minimum spacing between consecutive spawns.
- Invalidate on Close Through Zone (default off) — optional tighter invalidation rule.
- Visual controls — show/hide per lifecycle state, label size, zone opacity, max recent labels.
- Panel controls — show/hide, location (6 positions), theme (Dark/Light), text size.
How to Use
1. Add the indicator to any timeframe; higher timeframes (1H, 4H, 1D) tend to produce structurally more meaningful Unicorns.
2. Watch for a new Unicorn zone to appear. Pending zones are drawn in the directional state color with a bold border; triggered ones switch to the indigo accent color; TP / SL / Expired zones fade to their respective colors with a thinner border.
3. Each zone carries a tethered flag label outside the price axis — Bullish labels below, Bearish labels above — so they never overlap candles.
4. The panel reports running counts of pending and active Unicorns, historical win rate, average R per setup, and total completed.
5. Use the displayed entry / target / stop reference lines as a structural map for your own analysis. The tool does not place orders and does not recommend position sizing.
6. Combine with higher-timeframe bias (trend, session context, HTF structure) before acting on any zone.
Limitations & Transparency
- The detector is a structural scanner, not a forecasting engine. It reports what has formed, not what will happen.
- Swing detection depends on pivot length; shorter lengths generate more noise, longer lengths miss smaller structures.
- Statistics are calculated on-chart from historical bars loaded by PulseWire and will vary with timeframe, symbol and data range.
- Realtime behaviour: zones are drawn on confirmed events (bar close for breaks, 3-bar-complete for FVGs). Some invalidations are evaluated intrabar on wick touches of the stop level.
- The script is open-source under Mozilla Public License 2.0. Users are encouraged to inspect and adapt the methodology.
Risk Disclosure
This indicator is provided for educational and analytical purposes only. It is not financial advice, a trading signal service, or a strategy. Past structural patterns do not guarantee future outcomes. Trading involves substantial risk of loss; readers are solely responsible for their own decisions and risk management. Indicator

Swing Failure Pattern (SFP) Engine [AGPro Series]Swing Failure Pattern (SFP) Engine
────────────────────────────────────────────────────────────
OVERVIEW
────────────────────────────────────────────────────────────
Swing Failure Pattern (SFP) Engine detects high-probability liquidity sweep
events at prior swing highs and lows. An SFP occurs when price pierces a
recent swing level with a long wick but closes back inside the prior range,
signalling failed continuation and potential mean reversion. Each event is
scored on four components, drawn as a mid-sized support/resistance reaction
zone, and tracked through its live cycle — with panel statistics on MFE,
MAE, and hit rate. Designed for visual pattern reading and confluence;
not a buy/sell system.
────────────────────────────────────────────────────────────
UNIQUE EDGE
────────────────────────────────────────────────────────────
Most SFP indicators mark the sweep candle and stop there. This engine treats
each SFP as a living support/resistance band: the zone extends to the right
every bar and only freezes when the swept level is actually broken on close.
That preserves the SR context that traders use in real decisions, without
cluttering charts with zones that never die. A composite score (0-100),
confluence grouping of nearby events within 0.5 ATR, and live MFE/MAE
tracking in ATR units turn a common pattern into a measurable framework.
────────────────────────────────────────────────────────────
METHODOLOGY
────────────────────────────────────────────────────────────
Swing detection uses pivot highs and lows confirmed by a configurable
lookback. An SFP is confirmed on bar close when four conditions are met:
1. The bar wicks beyond a prior unswept swing high (bearish) or swing low
(bullish) within the active lookback window.
2. The close reclaims the prior range by at least the user-defined ATR
distance (default 0.25 ATR).
3. The sweep-side wick represents at least the minimum wick ratio of total
bar range (default 55 percent).
4. Bar volume exceeds its 20-period SMA by the configured multiplier
(optional, default 1.15x).
Composite score (0-100) weights wick ratio (40), reclaim distance in ATR
(30), volume confirmation (15), and swing age (15). Only events above the
minimum score threshold are drawn. Each confirmed SFP removes its swept
swing from the active array to prevent re-triggering on the same level.
Confluence grouping merges same-side events within 0.5 ATR into a single
labelled zone with an x2, x3 count.
────────────────────────────────────────────────────────────
SIGNALS & ALERTS
───────────────────────────────────────────────────────────
Visual signals on chart:
- State-coloured label at the sweep bar reading Bull SFP or Bear SFP with
the composite score (e.g., Bull SFP 74). Confluence-grouped events are
suffixed with the merge count (e.g., Bear SFP 81 x2).
- Rectangular zone spanning the swept level and the SFP close, with a
small ATR buffer. The zone extends right each bar while active and
freezes in neutral grey when the swept level breaks.
- Dotted horizontal line marking the swept swing level.
- Dashed projection line indicating the reversal direction.
Alert conditions:
- Bullish SFP: fires on the confirmation bar of a bullish event above
the score threshold.
- Bearish SFP: same, for bearish events.
- Zone Invalidation (optional): fires when an active zone's swept level
is broken on close.
────────────────────────────────────────────────────────────
KEY INPUTS
────────────────────────────────────────────────────────────
Detection:
- Swing Pivot Length - bars each side of a pivot (default 5).
- Swing Lookback - how far back active swings are tracked (default 120).
- Min Wick Ratio - minimum sweep wick as fraction of bar range (0.55).
- Min Reclaim Distance (ATR) - how far close must reclaim (0.25 ATR).
- Require Above-Average Volume and Volume Multiplier (default 1.15x).
- ATR Length (default 14).
Scoring & Filters:
- Min SFP Score (default 55 of 100).
- Max Active Zones retained on chart (default 8).
- Stats Timeout - bars after which an unresolved event is counted in
averages (default 30). Does not affect zone visibility.
Visuals:
- Zone transparency (default 80), confluence grouping distance (0.5 ATR),
label size, and toggles for zones, swing lines, and reversal projections.
Panel:
- Location (8 options), Dark/Light theme, text size.
Alerts:
- Independent toggles for bullish, bearish, and invalidation alerts.
────────────────────────────────────────────────────────────
HOW TO USE
────────────────────────────────────────────────────────────
Apply the indicator to any chart and timeframe. Higher timeframes (1h and
above) produce cleaner swings; lower timeframes require a higher Min Wick
Ratio and Min Score to filter noise.
Read SFPs as liquidity sweep events, not standalone entries. A bullish SFP
below a prior swing low indicates that sellers failed to extend the move —
often a location where larger participants accumulate. The score reflects
sweep quality; higher scores (70+) generally correspond to cleaner
rejections. Use the zone as a support/resistance reference until it is
invalidated.
Panel statistics describe the observed sample on the loaded chart, not a
backtested system. MFE Hit Rate is the percent of resolved zones that
reached 1 ATR in the SFP direction before the swept level broke — it is a
quality reference, not a win rate for any trading strategy.
────────────────────────────────────────────────────────────
LIMITATIONS & TRANSPARENCY
────────────────────────────────────────────────────────────
- Signals confirm on bar close; intrabar conditions may change until close.
- Pivot detection introduces a natural bars-of-right-context lag equal to
the Pivot Length. This is intrinsic to any pivot-based approach.
- Panel statistics reflect events visible on the current chart load and
will vary with timeframe, symbol, and bar range.
- MFE Hit Rate is not a profit expectation. It measures whether price
moved 1 ATR in the SFP direction before the swept level broke.
- Volume confirmation uses chart volume and may behave differently on
symbols with inconsistent volume data.
- The indicator uses standard Pine Script drawing objects. Chart reload
may reset ephemeral visual states of resolved zones.
────────────────────────────────────────────────────────────
RISK DISCLOSURE
────────────────────────────────────────────────────────────
This indicator is a visualisation and analysis tool. It is not a trading
system, not financial advice, and not a signal service. It does not
predict future price movement. All trading decisions carry risk of loss
and are the sole responsibility of the user. Historical pattern behaviour
does not guarantee future results. Test thoroughly on your instruments
and timeframes before making any decisions. Indicator

Judas Swing Detector [AGPro Series]Judas Swing Detector
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Judas Swing is a well-known intraday pattern in ICT (Inner Circle Trader)
methodology describing how price often makes a deceptive initial move at the
London or New York session open — pulling in participants in one direction —
before reversing to reveal the session's true directional bias.
Judas Swing Detector systematically identifies, visualizes, and tracks this
pattern across every London and New York session open. It shades the trap
zone, flags the reversal bar, highlights the true-direction bias, and maintains
a rolling 20-session performance log so users can assess how consistently the
pattern resolves on their chosen symbol and timeframe.
IMPORTANT — Timeframe requirement: This indicator is designed for intraday
charts of 1 hour or lower (1m, 5m, 15m, 30m, 1h). Session windows anchor the
entire logic, and a 1-hour Judas window cannot be resolved on 4-hour or higher
charts. The panel always shows an "Optimal TF: 1m - 1h" footer, and the TF
status row turns yellow with "use <=1h" if the current chart exceeds this
range.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
UNIQUE EDGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unlike generic session-open or breakout indicators, Judas Swing Detector is
built around a defined four-state lifecycle (Pending → Active → Forming →
Confirmed / Failed) with ATR-normalized thresholds, so detection remains
stable across different volatility regimes and asset classes.
Three design choices make it distinct:
1. Independent two-way extremum tracking inside the Judas window — both the
maximum upward and maximum downward excursion are recorded, and the larger
of the two is declared the fake move when the window closes. This removes
ambiguity in choppy openings.
2. Separate fake-move and reversal thresholds. The initial push must exceed
a minimum ATR-scaled size to qualify, and the reversal must travel a second
ATR-scaled distance beyond the session open — filtering out shallow round
trips that would otherwise inflate the signal count.
3. Rolling 20-session statistics panel reporting success rate, average fake
distance, and directional bias, giving discretionary traders an objective
view of how the pattern is behaving on their instrument before they act on
it.
4. Support/resistance-style invalidation zone drawn at the fake-move extremum
after confirmation. This gives a clear visual anchor: if price later
re-enters this zone from the opposite side during the session, the Judas
read is considered broken. The zone is a reference, not an automatic
signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
METHODOLOGY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Step 1 — Session anchoring
At the first bar of the configured London or New York window the script
records the session open price, resets the two-way extremum trackers, and
transitions to the Active state.
Step 2 — Fake-move accumulation
During the window the script tracks both the maximum high and minimum low
relative to the session open. Neither is committed as the fake move until the
window closes.
Step 3 — Window-close evaluation
When the window ends the larger excursion (up vs down) becomes the fake
direction. If its size reaches the user-defined ATR multiple it qualifies and
the script transitions to the Forming state; otherwise it resets to idle.
Step 4 — Reversal confirmation
In the Forming state the script waits for price to cross the session open in
the opposite direction of the fake move and travel at least the configured
ATR-scaled distance beyond it. When that happens the swing is Confirmed and
the true direction is drawn on the chart. If the reversal window expires
without confirmation the swing is recorded as Failed.
Step 5 — History log
Every confirmed and failed outcome is appended to a rolling 20-session log
used by the statistics panel.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNALS & ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
On-chart visuals:
• Dashed vertical line at session start (accent color)
• "LON" or "NY" label at the session anchor bar (Balanced / Detailed only)
• Shaded fake-move box from session open to fake extremum, colored opposite
to the true direction (a bearish trap is shaded in the bear tone because
the true direction is down — and vice versa)
• Optional "Fake" distance label at the extremum (Detailed density only)
• Reversal marker "X UP" or "X DOWN" at the confirmation bar, offset
from the candles for readability
• Horizontal support/resistance-style invalidation zone around the fake
extremum, extending 40 bars to the right — a visual reference for where
the Judas read would break down if price re-enters the zone
Alert conditions (toggle individually in settings):
• Judas Swing Forming — fake move has qualified, waiting for reversal
• Judas Swing Confirmed — reversal threshold crossed, true direction known
• Judas Swing Failed — reversal window expired without confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
KEY INPUTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session Windows
• Track London Open — toggle London session monitoring
• London Judas Window (NY time) — session string, default 0200-0300
• Track New York Open — toggle NY session monitoring
• NY Judas Window (NY time) — session string, default 0930-1030
• Session Timezone — timezone used to interpret the windows
• Reversal Window (minutes) — maximum time after window close in which a
valid reversal can still be recorded
Detection Logic
• Min Fake-Move Size (ATR mult) — minimum excursion required to qualify
• Reversal Confirmation (ATR mult) — distance beyond session open needed
to confirm the reversal
• ATR Length — lookback for threshold scaling
Visuals
• Show Session Start Line, Show Fake-Move Zone, Show Reversal Marker,
Show Invalidation Zone — individual visual toggles
• Label Density — Minimal / Balanced / Detailed
• Font Size — tiny / small / normal / large (applies to labels and panel)
• Theme — Dark / Light (panel only, chart candles unaffected)
Panel
• Show Info Panel — master toggle
• Panel Location — 6 chart positions
• Always displays: current session, state, true direction, fake distance,
rolling 20-session statistics (success rate, avg distance, bull/bear
bias), current TF status, and a footer reminding the optimal timeframe
range
Alerts — three individual toggles (Forming / Confirmed / Failed)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Supported timeframes: 1m, 5m, 15m, 30m, 1h. These resolve a session's early
structure cleanly while keeping enough bars inside each Judas window for the
extremum tracker to work with. Recommended default: 15m or 1h.
Not supported: 4h, 1D, 1W. On these timeframes a single bar exceeds the
session window, so nothing is detected. The panel will show a yellow "use
<=1h" hint if you accidentally switch to one of these.
Recommended instruments: FX majors (EURUSD, GBPUSD, USDJPY), index futures
(NQ, ES), liquid crypto (BTC, ETH). The ATR-normalized thresholds keep the
logic portable across these asset classes.
Workflow suggestion:
1. Apply the indicator and let it observe several sessions so the panel
populates a meaningful sample.
2. Review the 20-session success rate on your specific symbol and timeframe.
This is not a forecast — it is a descriptive statistic of how the pattern
has resolved in recent history on that chart.
3. Use the Forming alert as a heads-up, and the Confirmed alert as the main
event. The true-direction arrow marks the bias of the remaining session,
not a trade entry or exit.
4. Combine with your own structural context — higher timeframe bias, key
levels, liquidity pools — before acting on any signal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LIMITATIONS & TRANSPARENCY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Not a strategy. This is a discretionary analysis tool; it neither places
orders nor implies any specific trade setup.
• Intraday timeframes only. The logic requires 1h or lower charts to resolve
the session windows. On 4h, 1D or higher the indicator will not detect
anything and the panel will show a "use <=1h" notice.
• No forecasting. Displayed statistics describe past behavior on the current
chart only and do not imply future performance.
• Pattern-dependent. When price opens and trends cleanly in one direction
without a fake move, the pattern legitimately will not trigger. Low
signal count on such sessions is expected behavior, not a malfunction.
• Session boundary sensitivity. Results depend on the configured session
windows and timezone. Outside the major FX and equities session hours the
ICT framing may not translate cleanly.
• Extreme-volatility sessions. During very large gaps or news spikes the ATR
thresholds can be dominated by a single bar; users should review the
defaults in those conditions.
• Symbol coverage. Pip conversion handles forex and JPY pairs explicitly and
falls back to tick-based sizing for other asset types. Values are intended
as relative magnitudes, not broker-specific pip quotes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RISK DISCLOSURE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This indicator is provided for educational and analytical purposes only. It
does not constitute financial advice, a recommendation, or a solicitation to
buy or sell any instrument. Trading involves substantial risk of loss; past
pattern behavior is not indicative of future results. Users are responsible
for their own trading decisions and for verifying that any signal aligns with
their own methodology and risk management.
The source code is published under the Mozilla Public License 2.0. Feedback
and constructive suggestions are welcome. Indicator

Breaker Block Engine [AGPro Series]Breaker Block Engine
Overview
Breaker Block Engine is a dedicated detection and tracking tool for one of the
most misunderstood concepts in Smart Money trading: the Breaker Block. A
breaker block is an order block that has failed and flipped role — a bearish
order block broken upward now behaves as bullish support, and a bullish order
block broken downward now behaves as bearish resistance. The engine does not
just draw them; it validates each break with displacement strength, tracks
every retest, scores how well each breaker has held its role, and surfaces the
dominant bullish and bearish breakers through a clean info panel.
Unique Edge
Most breaker block scripts stop at drawing a flipped zone. This engine goes
further:
- Each break is validated using an ATR-scaled close-based displacement filter,
optionally combined with above-average volume confirmation, to reject weak
wick-based breaks.
- Every retest of a breaker is counted and evaluated as Held or Lost, and the
state label on the chart shows a live retest hold percentage for each
breaker (for example "Bull Breaker | Held x6 (100%)").
- An invalidation buffer prevents single-wick noise from prematurely killing
otherwise healthy breakers, while genuinely violated zones fade into a gray
"Lost" state and are removed from tracking shortly after.
- Intra-side and cross-side confluence grouping automatically clean up
overlapping labels so the chart stays readable even when several breakers
cluster within half an ATR.
- The info panel summarises the whole picture in one glance: dominant side,
active counts per side, nearest breaker distance in both price and ATR
multiples, and overall retest hold percentage.
Methodology
1. Swing Detection. Confirmed pivot highs and pivot lows are identified using
a configurable pivot length. These pivots anchor the search for order
block candidates.
2. Order Block Candidate. For each confirmed pivot high, the script walks
back up to ten bars looking for the last bearish candle — this is the
bearish order block candidate. The symmetrical process identifies bullish
order block candidates around pivot lows.
3. Break Validation. A candidate is promoted to a breaker only when price
closes past the opposite edge of the order block by at least a
user-defined ATR multiple (default 0.75 × ATR). An optional volume
confirmation filter can additionally require the break candle to trade
above its volume moving average.
4. Retest & Hold Scoring. After formation, each breaker is checked every bar.
If price re-enters the zone and the close respects the breaker's intended
direction, a Hold is recorded; otherwise the retest is counted but not
held. A minimum bar spacing prevents consecutive bars of a sustained
retest from inflating the counter.
5. Invalidation. If price closes past the far edge of the breaker by more
than the invalidation buffer (in ATR), the breaker is marked Lost,
visually faded, and removed from active tracking after a short grace
period.
6. Confluence Grouping. On the most recent bar, breakers whose mid-points
sit within max(0.5 × ATR, 0.5 % of price) of each other have their
overlapping state labels resolved: dead labels yield to alive labels,
older labels yield to newer ones. A cross-side pass prevents stale
opposite-side labels from sitting on top of active ones.
Signals & Alerts
The script provides three alert events:
- New Breaker: fires on the bar a bullish or bearish breaker is confirmed.
- Retest Hold: fires when price retests an active breaker and the close
respects the zone direction.
- Invalidation: fires when an active breaker is broken in the opposite
direction beyond the invalidation buffer.
On-chart signals include the zone itself (coloured by side), a small
directional triangle at the break point, and a dynamic state label on the
right edge showing the breaker's test count and hold percentage.
Key Inputs
- Swing Pivot Length: bars on each side used to confirm swings. Higher values
produce fewer but structurally stronger swings.
- Max Active Breakers per Side: hard cap on simultaneously tracked bullish
and bearish breakers; oldest are pruned when the limit is reached.
- Displacement Strength: ATR multiple required for a close-based break to
validate. Higher values produce fewer, stronger breakers.
- Require Volume Confirmation: when enabled, the break candle must trade
above its volume moving average.
- Invalidation Buffer: ATR buffer added beyond the breaker edge before the
breaker is considered invalidated. Prevents wick-based noise kills.
- Min Bars Between Retests: minimum bar spacing between consecutive retests
of the same breaker, keeping counters from inflating on sustained visits.
- Zone Transparency, Colours, Label & Panel Sizes: full visual control.
- Panel Location, Theme, Far Zone Threshold: the info panel can be placed in
any of six positions, switched between Dark and Light theme, and the
threshold for labelling distant zones as "Far" is user-configurable.
How to Use
- On mid-to-high timeframes (15m and up), leave the defaults. The engine is
tuned for 15m to 4h out of the box but works on any timeframe and
instrument.
- Use the state label hold percentage as a quality gauge. A breaker with a
long history of holds (for example "Held x6 (100%)") has demonstrated
institutional interest at that level; a breaker with mixed results deserves
more caution.
- Use the panel to orient quickly. If the dominant side is Bullish and the
nearest bullish breaker sits within a fraction of an ATR, the chart is in
a supportive regime for long bias; if both nearest values show "Far",
price is floating between structures and caution is warranted.
- Combine with higher-timeframe context. A bullish breaker on the 1h that
aligns with a bullish breaker on the 4h is a stronger zone than either
alone.
Limitations & Transparency
- This is an indicator, not a strategy. It draws zones and tracks their
behaviour; it does not generate buy or sell orders, manage positions, or
calculate performance statistics against a price series.
- Pivot-based detection is inherently lagging by the pivot length: a swing
is only confirmed once the configured number of bars have printed past it.
- Results depend on input choices. Different displacement multipliers, pivot
lengths, and retest gaps will produce different breaker sets. The defaults
are a starting point, not a recommendation.
- No indicator can guarantee future behaviour. A breaker that has held ten
times in the past can fail the next time it is tested.
Risk Disclosure
This script is provided for educational and research purposes only. It is not
financial advice and does not constitute a recommendation to buy, sell, or
hold any instrument. Trading carries substantial risk of loss. Users are
solely responsible for their own trading decisions and risk management. Past
behaviour of a breaker, or of any zone shown by this script, does not
guarantee future results. Indicator

Mitigation Block Quality [AGPro Series]OVERVIEW
Mitigation Block Quality grades every order-block retest as A, B, or C based on
the strength, speed, and follow-through of the bounce after price returns to
the block. Instead of just drawing order blocks and leaving you to guess
which ones matter, the script measures each mitigation objectively and keeps
a live scoreboard of how those reactions have been performing.
The result is an order block tool that tells you two things at once: where
the zones are, and how well price has historically respected them on the
symbol and timeframe you are looking at.
UNIQUE EDGE
Most order-block indicators end at detection. This one begins there. Each
time a block is mitigated, the script measures the reaction over a fixed
window and grades the bounce by its ATR-normalized magnitude. That grade
is then reflected everywhere: on the block border, in the on-chart label,
in the dashboard, and in the historical success-rate statistics.
You also get multi-timeframe context, confluence detection, streak tracking,
and a dynamic setup banner that describes the current price-block
relationship in plain English.
METHODOLOGY
1. Detection. Swing pivots are identified using a configurable pivot length.
The last opposite-colored candle before the pivot forms the order block.
2. Mitigation. A block is mitigated when price re-enters the zone.
3. Grading. After a fixed reaction window, the script measures the peak of
the bounce and normalizes it to ATR. Grade A is a strong bounce, B is
solid, C is weak.
4. Invalidation. A body close beyond the block marks it as invalidated.
Invalidated blocks can be hidden or shown as a dotted reference.
5. Retirement. Blocks retire by age, by distance from price, or when the
per-side cap is exceeded.
FEATURES
- A, B, or C grade assigned to every mitigation (ATR-normalized reaction)
- Reaction trail line on Grade A mitigations showing the bounce extent
- Entry marker (diamond) at the exact mitigation bar of Grade A bounces
- Confluence glow when two or more blocks overlap within 0.5 ATR
- Time-based opacity decay so older blocks recede and fresh ones pop
- Optional pulse animation on A/B blocks while price is inside them
- Price-scale labels tagging each active block's grade and side
- Higher-timeframe alignment check against a configurable HTF structural bias
- Dashboard panel with: active count, tested count, success (current),
nearest-block state (Inside / Touching / distance in ATR), all-time
success rate with stacked distribution bar, last-20 success, health
progress bar, current Win/Loss streak, HTF alignment, and a dynamic
setup banner
SIGNALS & ALERTS
Three alert conditions are provided:
- Grade A Mitigation — a premium-quality bounce has been detected
- Grade B Mitigation — a solid bounce has been detected
- Block Invalidation — an active block has been broken
These are alertconditions and can be configured from the PulseWire
Create Alert dialog in the usual way.
KEY INPUTS
- Pivot Length and Lookback: control how blocks are detected and how long
they stay on the chart
- Reaction Window and Grade Thresholds (A, B in ATR units): define what
counts as a premium, solid, or weak bounce
- Invalidation Mode: choose between body close or wick pierce
- Retire Block Beyond (xATR): automatic cleanup when price moves far away
- Max Active Blocks per Side and Max Visible Labels: keep the chart premium
- Premium Visuals toggles: Reaction Trail, Entry Marker, Confluence Glow,
Quality Heatmap row, Setup Banner, Pulse, Time Decay, Price Scale Labels,
HTF Alignment, Streak row
- HTF for Alignment: the higher timeframe used for multi-timeframe confluence
- Panel location and theme
HOW TO USE
1. Add the script to any chart and timeframe.
2. Read the panel top-down:
- Last 20 breakdown tells you the recent quality regime
- Nearest Block tells you how close the closest active zone is
- All-time and Last 20 success tell you how reliable those zones have been
- Streak gives you momentum context
- HTF Alignment tells you if the bigger picture agrees
- Setup banner describes what is happening right now
3. Look at the chart:
- A/B/C labels on mitigated blocks tell you how those tests resolved
- Reaction trails and diamonds highlight the premium Grade A mitigations
- Confluence glows mark zones where multiple blocks agree
4. Use alerts to get notified when a fresh Grade A or Grade B mitigation
occurs, or when an active block is invalidated.
The tool is designed to help with discretionary analysis. It is not a
trading system and does not generate buy or sell signals on its own.
LIMITATIONS & TRANSPARENCY
- Pivots are confirmed after the swing length completes, so block detection
has a small structural lag. This is inherent to any pivot-based method.
- Grades are assigned after the reaction window closes. A very fresh
mitigation will briefly show "Active" before its grade appears.
- HTF Alignment uses a 50-period simple moving average on the chosen higher
timeframe as a structural bias proxy. It is a context filter, not a
predictive signal.
- All metrics are computed from the visible historical data on the current
chart. Loading more bars will change the all-time statistics.
- The script uses Pine Script v6 drawing objects. Extremely long histories
on very low timeframes may hit PulseWire object limits; the built-in
per-side cap and distance-based retire keep this under control in normal
use.
RISK DISCLOSURE
This script is an analysis aid, not financial advice. It does not predict
future price movement and does not generate trade recommendations. Any
decision to enter or exit a position is the responsibility of the user.
Historical grade distributions are descriptive, not predictive. Past
mitigation behavior on a symbol does not guarantee future behavior.
Trade with risk capital you can afford to lose and use appropriate
position sizing and stop placement.
LICENSE
Released under the Mozilla Public License 2.0. The full source is available
on PulseWire via the Open-Source badge. You are free to study and modify
the code subject to the terms of the license. Indicator

AG Pro BOS & CHoCH Auto Detector [AGPro Series]AG Pro BOS & CHoCH Auto Detector
OVERVIEW / WHAT IT DOES
AG Pro BOS & CHoCH Auto Detector is a market structure overlay designed to organize swing-based price action into a more readable workflow. Instead of leaving the chart covered with disconnected pivot labels or generic break markers, this script tracks structural swing progression, identifies when prior highs or lows are broken, and classifies those breaks as either BOS (Break of Structure) or CHoCH (Change of Character). The goal is not to predict the next move, but to help traders read whether price is continuing an existing structure or beginning to challenge it.
The script monitors HH, HL, LH, and LL development using pivot logic, then uses those reference points to detect structural breaks. A break in the direction of the active structure is treated as BOS, while the first meaningful break against the prior directional structure is treated as CHoCH. This distinction matters because many charts show every break in the same visual language, even though continuation and character shift do not carry the same analytical meaning. Here, those events are separated clearly.
A second layer of usefulness comes from presentation discipline. This script is built to keep structural information visible without turning the chart into a wall of labels. Swing density can be reduced, major structures can be emphasized, and the higher timeframe overlay can remain active in the background to keep local execution aligned with broader structure. The result is a structure map that stays informative without becoming visually noisy.
This tool is intended for traders who already use price structure as part of their chart reading and want a cleaner way to monitor continuation versus transition. It can support discretionary workflows around trend continuation, pullback analysis, structure failure, and higher timeframe context, while still remaining transparent about how its signals are formed.
UNIQUE EDGE
Many market structure tools stop at plotting swing points or printing BOS / CHoCH text when a level is crossed. AG Pro BOS & CHoCH Auto Detector is built around a more organized structure engine approach.
Its edge is not based on trying to forecast direction or force trade entries. Its edge is based on classification, hierarchy, and chart readability:
- It separates continuation breaks from character-change breaks instead of treating all structural violations as equivalent.
- It preserves the swing chain context behind each event, so BOS and CHoCH are not isolated labels detached from surrounding structure.
- It allows confirmation mode selection, so the user can decide whether structure breaks require close confirmation or can react to intrabar violations.
- It includes higher timeframe structure context directly on the chart rather than forcing the user to reconstruct that context manually.
- It includes swing-density controls so the visual output can be kept clean even when structure is active.
This makes the script less like a simple labeling utility and more like a workflow layer for structure-based chart reading.
METHODOLOGY
1) Swing Structure Detection
The script uses pivot-based highs and lows to identify structural reference points. Those pivots are then classified into HH, HL, LH, and LL sequences, allowing the chart to reflect whether structure is strengthening, weakening, or transitioning.
2) BOS Logic
When price breaks a prior structural level in the direction of the active trend, the event is labeled as BOS. In practical terms, this represents structural continuation rather than directional reversal.
3) CHoCH Logic
When price breaks against the previously established directional structure, the event is labeled as CHoCH. This is treated as a possible character shift, not as a guaranteed reversal. It highlights that the prior structure has been challenged.
4) Confirmation Mode
Users can choose whether structure breaks are confirmed by candle close or by intrabar price action. Close mode is more conservative and can reduce noise. Intrabar mode is more responsive and may show earlier breaks.
5) Higher Timeframe Overlay
An optional MTF layer allows the script to bring higher timeframe structure context onto the active chart. This can help users avoid reading local swings in isolation when broader structure is still dominant.
6) Visual Hierarchy
The script uses horizontal structure levels, event labels, optional arrows, controlled swing density, and a compact information panel to keep key structure events readable. The design priority is to preserve analytical clarity.
SIGNALS & ALERTS
This script can generate structure-based alerts for the following event types:
- Bullish BOS
- Bearish BOS
- Bullish CHoCH
- Bearish CHoCH
- Any structure break
These alerts are event-driven and tied to the script's structural logic. They are intended to notify the user when a relevant break occurs according to the selected confirmation mode. They are not trade instructions and should be interpreted within the user's broader process.
KEY INPUTS
Swing Pivot Length
Controls pivot sensitivity. Lower values detect swings faster but may produce more noise. Higher values are more selective.
Confirmation Mode
Choose between Close and Intrabar logic for structure break confirmation.
Max Structures to Show
Limits how many structural events remain plotted on the chart.
Swing Label Density
Lets users choose between fuller swing annotation and a cleaner major-structure view.
Max Swing Labels on Chart
Helps prevent excessive label build-up in active market conditions.
Enable MTF Overlay
Adds higher timeframe structure context to the active chart.
MTF Timeframe
Defines which higher timeframe structure layer is projected onto the chart.
Label Size / Panel Font Size / Line Settings
Allow visual tuning without changing structural logic.
LIMITATIONS & TRANSPARENCY
This script uses pivot-based structure logic. That means swing points are confirmed only after the required pivot bars are completed. Because of this, the tool is confirmation-based by design and does not attempt to label unfinished pivots as confirmed structure.
BOS and CHoCH are structural events, not certainty statements. A CHoCH may signal that the prior directional structure is being challenged, but it does not guarantee a lasting reversal. Likewise, a BOS indicates continuation within the script's structural framework, but not guaranteed follow-through.
The higher timeframe overlay is designed to add context, not to replace direct higher timeframe chart review. Users should still interpret local and higher timeframe structure together rather than relying on a single signal state.
This script is best used as a structure-mapping tool within a broader analytical framework. It is not a standalone trading system, not a predictor, and not a substitute for risk management.
RISK DISCLOSURE
This indicator is for chart analysis and educational use. It does not provide financial advice, does not guarantee outcomes, and should not be treated as a complete trading methodology on its own. Market structure tools can help organize price action, but all trading decisions remain the responsibility of the user.
Indicator

AG Pro Fair Value Gap Engine [AGPro Series]AG Pro Fair Value Gap Engine
OVERVIEW / WHAT IT DOES
AG Pro Fair Value Gap Engine is a rules-based overlay built to detect 3-bar fair value gap structures and organize them as a living imbalance map on the chart.
The script identifies bullish fair value gaps when the current low is above the high from two bars earlier, and bearish fair value gaps when the current high is below the low from two bars earlier. Once detected, each zone is stored, rendered, tracked through time, and updated as price interacts with it.
Instead of stopping at basic FVG detection, this script continues to follow the structure after creation. It monitors whether the gap remains active, whether price returns into it, whether mitigation occurs, how old the structure has become, and how strong or weak that mitigation event appears relative to the gap itself.
The result is not just a visual list of imbalances. It is an FVG lifecycle model designed to help traders distinguish between fresh gaps, aging gaps, mitigated gaps, and higher-quality mitigation events.
UNIQUE EDGE
Many fair value gap tools simply highlight every detected gap and leave the user to interpret the rest.
This script is built around a different idea:
not all FVGs deserve the same attention, and not every mitigation event carries the same informational value.
AG Pro Fair Value Gap Engine separates itself by combining detection, aging, prioritization, mitigation tracking, and scoring in a single structured workflow. Gaps are not treated as static rectangles. They are treated as evolving chart objects with a lifecycle.
Within the AG Pro Series, this script is also distinct from breakout-quality, reclaim, rotation, pressure, or acceptance-style overlays. Those models focus on trend behavior, reclaim behavior, structural confirmation, momentum pressure, or price acceptance around a reference. This one is centered on imbalance structure itself: where the 3-bar gap formed, how long it stayed relevant, whether price returned, and how credible that mitigation looked once interaction happened.
In practical terms, the script is designed to answer questions such as:
Which FVGs are still active?
Which ones are becoming stale?
Which mitigation events happened with better quality?
Which visible zones are worth keeping in focus, and which are just legacy context?
That is the core difference. This is not a generic FVG highlighter. It is an imbalance-ranking and mitigation-quality engine.
METHODOLOGY
1) Detection Logic
The script scans for standard 3-bar fair value gap structures.
Bullish FVG:
current low > high from two bars back
Bearish FVG:
current high < low from two bars back
A minimum size filter relative to ATR is applied so that very small gaps can be ignored when desired.
2) Structure Tracking
After detection, each FVG is stored and tracked over time. The script keeps the zone on the chart, extends active zones forward when enabled, and updates their visual state as the market evolves.
This allows the chart to preserve the structural memory of imbalance zones instead of treating every new gap as an isolated event.
3) Aging and Visual Decay
Older gaps gradually lose visual priority through fade logic. This helps newer or more relevant structures stay readable while old zones move into the background.
Optional controls can also suppress distant legacy zones when they become both old and far from current price.
4) Mitigation Logic
The script monitors how deeply price returns into each gap. When the user-defined mitigation threshold is reached, the FVG is marked as mitigated.
Mitigated zones can remain visible as context or be hidden for a cleaner chart, depending on preference.
5) Quality Scoring
Mitigation is not treated as a simple yes/no event. The script evaluates mitigation quality using a weighted model that includes:
- Gap size relative to ATR
- Speed of return into the zone
- Relative volume during the mitigation event
- Return strength after contact with the gap
This produces a normalized score intended to help separate weaker fills from stronger, better-formed mitigation behavior.
6) Focus and Prioritization
To reduce chart noise, the script includes focused labeling, active-zone prioritization, top-zone filtering, and legacy suppression logic.
This means the visual output can be tuned away from “show everything” and toward “show what matters most.”
SIGNALS & ALERTS
This script provides alert conditions for:
- Newly detected bullish fair value gaps
- Newly detected bearish fair value gaps
- Bullish fair value gaps reaching mitigation
- Bearish fair value gaps reaching mitigation
These alerts are event-based and rules-based. They are not forecasts, predictions, or trade instructions.
The labels and panel are designed to summarize state, not to replace the user’s broader market process.
KEY INPUTS
Core Settings
- Minimum FVG Size (ATR)
- Mitigation Threshold (%)
- Maximum Tracked FVG Count
- Age Fade Length
- Extend Active FVG Boxes
Scoring Engine
- Speed Score Reference
- Volume Score SMA Length
- Volume Score Max Ratio
- Size Score Max ATR
Visual Settings
- Show FVG Labels
- Focused Label Mode
- Focused Label Minimum Score
- Active / Mitigated Label Age Limits
- Highlight Score Threshold
- Theme Preset
- Show Mitigated Zones
- Show Mitigated Zone Labels
- Label Horizontal Offset
- Hide Distant Legacy FVGs
- Legacy Hide Age
- Legacy Hide Distance
- Show Only Top Active Zones
- Top Active Zones Count
- Label Stack Spacing
Panel Settings
- Show Panel
- Panel Position
- Panel Font Size
These controls allow the same logic to be used in a more information-dense mode or in a much cleaner presentation mode, depending on the charting style of the user.
LIMITATIONS & TRANSPARENCY
This script detects and organizes 3-bar imbalance structures. It does not claim to identify every meaningful liquidity event, order-flow shift, or broader smart money context factor on its own.
A fair value gap can remain open for a long time, fail quickly, or be revisited multiple times. A high score does not guarantee a directional outcome. A low score does not automatically invalidate the zone as context.
The mitigation score is a structured ranking model, not an objective truth about future price behavior. It is designed to help compare events inside the framework of this script.
Because chart structure, volatility, timeframe, and instrument behavior vary, users should expect different FVG densities and different score distributions across markets.
This tool is best used as a market-organization layer for imbalance analysis, not as a standalone execution system.
RISK DISCLOSURE
AG Pro Fair Value Gap Engine is an analytical charting tool for educational and informational use.
It does not provide financial advice, does not promise outcomes, and should not be interpreted as a standalone buy or sell system. Fair value gaps, mitigation events, and score readings should be evaluated together with market structure, volatility, timeframe context, liquidity conditions, and the user’s own risk framework.
Trading involves risk. Past chart behavior does not guarantee future results.
Indicator

Advanced Fibonacci Confluence Matrix [MarkitTick]💡 The Advanced Fibonacci Confluence Matrix is a sophisticated multi-dimensional analytical tool designed for professional traders who demand precision in identifying high-probability institutional entry zones. By integrating Fibonacci retracement logic with multi-timeframe (MTF) confluence and Fair Value Gap (FVG) detection, this script identifies the "Optimal Trade Entry" (OTE) zones where various technical factors align. It serves as a comprehensive institutional-grade execution engine, providing not just visual zones, but also automated risk calculation and webhook-ready alert payloads for algorithmic execution.
● ✨ Originality and Utility
Traditional Fibonacci tools are often static and require manual adjustment, leading to subjective bias and missed opportunities during rapid price action. This indicator revolutionizes the process by:
• Dynamic Anchor Selection : It automatically identifies significant swing highs and lows to anchor Fibonacci levels, ensuring that the zones remain relevant to current market structure.
• Multi-Timeframe Confluence : It fetches Fibonacci data from higher timeframes (HTF), such as the Daily or 4-hour charts, and overlays them onto the local timeframe. This allows traders to see when a local OTE zone aligns with a major institutional level.
• FVG Integration : The script looks for Fair Value Gaps within the OTE zones. The presence of an FVG serves as a "magnet" or "trigger," increasing the probability that price will react within that specific area.
• Automated Alert Logic : Unlike simple price alerts, this script generates a structured JSON payload including Entry, Stop Loss, Take Profit, and calculated Position Size based on user-defined risk parameters.
● 🔬 Methodology and Concepts
The indicator is built upon the premise of Institutional Order Flow and the "Discount vs. Premium" market theory.
• Fibonacci Retracement Engine : The core logic calculates standard ratios (0.236, 0.382, 0.5, 0.618, 0.786). The "Optimal Trade Entry" is specifically defined as the zone between the 0.618 and 0.786 retracement levels.
• The Confluence Matrix : The script maintains an internal matrix of "hits." When price enters a zone where a local Fibonacci level, an HTF level, and a Prime FVG all overlap, the confluence score increases, and the visual intensity of the zone changes to alert the trader.
• Fair Value Gap (FVG) Logic : The script detects imbalances where the High of Bar N is lower than the Low of Bar N+2 (for bearish) or the Low of Bar N is higher than the High of Bar N+2 (for bullish). It specifically filters for "Prime FVGs" that reside within the OTE retracement area.
• Risk-Adjusted Position Sizing : It uses the distance between the Entry (usually the 0.618 level or FVG edge) and the Stop Loss (usually the swing anchor) to calculate how many units should be traded to risk exactly X% of the account balance.
● 🎨 Visual Guide
• The OTE Zone (The Golden Box) : A shaded rectangle appearing between the 0.618 and 0.786 Fibonacci levels. A Green box signifies a bullish discount zone, while a Red box signifies a bearish premium zone.
• HTF Confluence Lines : Horizontal dashed lines across the chart representing the 0.5 (Equilibrium) and 0.618 levels from a higher timeframe. These are typically colored Orange or Purple to distinguish them from local levels.
• Fair Value Gap (FVG) Rectangles : Small, semi-transparent boxes that mark price imbalances. When these appear inside the OTE Zone, they are highlighted with a thicker border to indicate a "High Probability Trigger."
• Swing Anchor Labels : Small "H" (High) and "L" (Low) labels appear at the points where the Fibonacci tool is anchored. These labels help the trader verify the current market structure context.
• Signal Labels : When a confluence event occurs, a "BUY" or "SELL" label appears above or below the candle. The label includes the calculated "Risk:Reward" ratio for that specific setup.
• Dashboard Table : A small UI element in the corner of the chart displaying the current HTF trend status, the distance to the nearest OTE zone, and the calculated position size for the next trade.
● 📖 How to Use
• Identifying a Setup : Wait for the script to define a new swing move. Once the "OTE Zone" box is drawn, monitor the price as it retraces toward that box.
• Confirming Confluence : The highest quality trades occur when the price enters the OTE zone and simultaneously touches an HTF dashed line or fills a Prime FVG.
• Execution : Look for the "Long Entry" or "Short Entry" signal. The script is optimized for "Bar Close" execution to avoid repainting issues.
• Automation : If using webhooks, ensure your execution platform is set to receive the JSON format. The "Action," "Ticker," and "Qty" fields are automatically populated based on the signal.
• Exit Strategy : The default Take Profit is set to the 0.0 Fibonacci level (the swing high/low), while the Stop Loss is placed just beyond the 1.0 anchor point.
● ⚙️ Inputs and Settings
• Fibonacci Sensitivity : Adjust the "Swing Lookback" to determine how significant a high or low must be to act as an anchor. Higher values result in more "Macro" zones.
• HTF Resolution : A dropdown allowing you to select which timeframe (e.g., 60m, 240m, Daily) the confluence lines should be pulled from.
• Zone Selection : Toggle switches to enable or disable specific levels (e.g., show only the 0.618 and 0.786).
• Risk Management : Input your "Account Size" and "Risk Percentage" (e.g., 1% or 0.5%) to calibrate the automated position sizing alerts.
• Alert Configuration : Options to enable specific JSON payloads for "Long Only," "Short Only," or "Both."
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The Advanced Fibonacci Confluence Matrix is grounded in the Golden Ratio Theory and the Efficient Market Hypothesis (EMH), specifically focusing on market inefficiencies.
• Mathematical Proportions : The indicator utilizes the irrational number Phi (approximately 1.618) and its inverse (0.618). These ratios are derived from the Fibonacci sequence, where each number is the sum of the two preceding ones. In financial markets, these ratios describe the recursive nature of price retracements and expansions.
• Statistical Mean Reversion : The use of the 0.5 level (Equilibrium) is based on the statistical principle of mean reversion, suggesting that price has a natural tendency to return to a central point of value before continuing a trend.
• Liquidity & Imbalance Theory : The Fair Value Gap detection is based on the "Information Asymmetry" model in economics. When a large institutional order enters the market, it creates a "gap" or "void" because the liquidity at certain price levels was consumed too quickly. Academically, these gaps represent "Inefficient Pricing" that the market seeks to "fill" to restore equilibrium.
• Confluence Probability : By applying the Law of Large Numbers and Multi-Factor Modeling, the script assumes that the intersection of independent variables (Local Fib + HTF Fib + FVG) reduces the "Noise-to-Signal" ratio, thereby increasing the statistical significance of the resulting trade signal.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

SMC Core Lite - Signals█ OVERVIEW
SMC Core Lite is a lightweight, performance-optimized Smart Money Concepts (SMC) indicator designed to help traders identify institutional trading patterns and generate high-probability trade signals.
This indicator combines the most essential SMC elements - Fair Value Gaps (FVG), Order Blocks (OB), and Break of Structure (BOS) - into a single, easy-to-use tool with automatic LONG/SHORT signal generation.
█ CONCEPTS
The indicator is built on the foundation of Smart Money Concepts, a trading methodology that focuses on understanding how institutional traders (banks, hedge funds, market makers) move the markets.
🔹 Break of Structure (BOS)
When price breaks above a swing high or below a swing low, it signals a potential continuation of the trend. This confirms the market's directional bias.
🔹 Change of Character (CHoCH)
When BOS occurs against the prevailing trend, it signals a potential trend reversal. This is a powerful early warning sign of shifting market sentiment.
🔹 Fair Value Gaps (FVG)
Also known as imbalances, FVGs are areas on the chart where price moved so quickly that it left a "gap" in the price action. These zones often act as magnets for price to return and fill.
🔹 Order Blocks (OB)
Order blocks represent the last opposing candle before a strong impulsive move. These zones mark areas where institutional orders were placed and often act as strong support/resistance levels.
█ FEATURES
• ✅ Break of Structure (BOS) Detection
• ✅ Change of Character (CHoCH) Detection
• ✅ Fair Value Gap (FVG) Identification
• ✅ Order Block (OB) Detection
• ✅ Automatic LONG/SHORT Signals
• ✅ Auto Stop Loss & Take Profit Levels
• ✅ Market Bias Dashboard
• ✅ Customizable Risk:Reward Ratio
• ✅ Signal Cooldown Filter
• ✅ Alert Conditions for All Events
• ✅ Lightweight & Fast Loading
█ HOW IT WORKS
The signal generation follows a confluence-based approach:
🟢 LONG SIGNAL CONDITIONS:
1. Price pulls back into a bullish zone (Bullish FVG or Bullish OB)
2. Recent Bullish BOS/CHoCH confirmed OR Market Bias is Bullish
3. Current candle closes bullish (confirmation)
4. Signal cooldown period has passed
🔴 SHORT SIGNAL CONDITIONS:
1. Price pulls back into a bearish zone (Bearish FVG or Bearish OB)
2. Recent Bearish BOS/CHoCH confirmed OR Market Bias is Bearish
3. Current candle closes bearish (confirmation)
4. Signal cooldown period has passed
█ HOW TO USE
1. Add the indicator to your chart
2. Wait for market structure to develop (BOS/CHoCH labels)
3. Observe the Market Bias in the dashboard (BULL 🐂 or BEAR 🐻)
4. Look for LONG signals in bullish bias, SHORT signals in bearish bias
5. Use the auto-generated SL/TP levels for trade management
6. Set alerts to get notified of new signals
█ SETTINGS
═══ SIGNALS ═══
• Show LONG/SHORT Signals → Enable/disable signal labels
• Show SL/TP Lines → Display stop loss and take profit levels
• Risk:Reward → Set your desired R:R ratio (1:1 to 1:5)
• Signal Cooldown → Minimum bars between signals (reduces noise)
═══ STRUCTURE ═══
• Show BOS/CHoCH → Display structure break labels
• Swing Length → Lookback period for swing point detection
═══ ZONES ═══
• Show FVG → Display Fair Value Gap boxes
• Show Order Blocks → Display Order Block boxes
• Zone Lookback → Historical bars to analyze
• OB Strength → ATR multiplier for impulse move detection
█ ALERTS
The indicator includes 4 alert conditions:
1. 🟢 LONG Signal → Triggered when a buy signal appears
2. 🔴 SHORT Signal → Triggered when a sell signal appears
3. 🟢 Bullish BOS → Triggered on bullish break of structure
4. 🔴 Bearish BOS → Triggered on bearish break of structure
To set alerts: Right-click on chart → Add Alert → Select this indicator → Choose condition
█ IMPORTANT NOTES
⚠️ This indicator is optimized for speed and performance. It stores only the most recent 10 FVGs and 10 Order Blocks to ensure fast loading times.
⚠️ Works best on higher timeframes (15m, 1H, 4H, Daily) where market structure is cleaner.
⚠️ Always use proper risk management. No indicator is 100% accurate.
█ BEST PRACTICES
✅ Trade in the direction of the higher timeframe bias
✅ Wait for price to pull back to zones before entering
✅ Use the 50% level of zones for optimal entries
✅ Combine with your own analysis for best results
✅ Backtest before using with real capital
█ DISCLAIMER
This indicator is for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. Always do your own research and consider your financial situation before making any trading decisions.
█ CREDITS
Inspired by the Smart Money Concepts trading methodology and ICT (Inner Circle Trader) concepts.
If you find this indicator helpful, please consider giving it a boost 🚀 and following for more trading tools!
█ VERSION HISTORY
v1.0 - Initial Release
• BOS/CHoCH Detection
• FVG & Order Block Identification
• LONG/SHORT Signal Generation
• Auto SL/TP Calculation
• Market Bias Dashboard
• Alert Conditions Indicator

[ A L P H A X ] Structure - Smart Money Concepts [SMC]AlphaX Structure — Smart Money Concepts: BOS, CHoCH, Order Blocks, FVG, Liquidity Sweeps, Equal H/L, Displacement & Live Dashboard
AlphaX Structure is a comprehensive Smart Money Concepts (SMC) and ICT-methodology visualization tool that automatically maps market structure, institutional order flow zones, imbalances, and liquidity levels on your chart. It detects Break of Structure, Change of Character, Order Blocks with touch tracking, Fair Value Gaps with real-time fill percentage, liquidity sweeps, equal highs and lows, displacement candles, premium and discount zones — all presented through a clean, professional interface with a live dashboard showing market context at a glance.
Built for traders who analyze markets through the lens of institutional order flow and smart money behavior.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 Market Structure — BOS & CHoCH
The foundation of smart money analysis is understanding where structure breaks and when character changes .
Break of Structure (BOS)
A BOS occurs when price breaks a swing high or swing low in the direction of the existing trend — confirming that the current trend is continuing. BOS is plotted as a dashed horizontal line at the broken level with a "BOS" label offset slightly above or below for clear visibility.
Bullish BOS — price closes above a prior swing high while the market is already in a bullish structure. This confirms buyers remain in control and the uptrend is intact.
Bearish BOS — price closes below a prior swing low while the market is already in a bearish structure. This confirms sellers remain dominant and the downtrend continues.
Change of Character (CHoCH)
A CHoCH occurs when price breaks a swing high or swing low against the direction of the existing trend — signaling a potential trend reversal. CHoCH is plotted as a dotted horizontal line (visually distinct from BOS) with a "CHoCH" label.
Bullish CHoCH — price closes above a swing high while the market was previously bearish. This is the first structural sign that sellers may have lost control and a bullish reversal is forming.
Bearish CHoCH — price closes below a swing low while the market was previously bullish. This warns that buyers may be exhausted and a bearish reversal could be underway.
CHoCH is the earliest structural reversal signal. When you see a CHoCH followed by a BOS in the new direction, the trend shift is confirmed.
The indicator tracks the internal market trend state automatically. Once a bullish CHoCH fires, all subsequent structure breaks in the same direction are classified as BOS (continuation) until a bearish CHoCH resets the trend — and vice versa.
Swing Classification
When swing point labels are enabled, each pivot is classified as:
HH — Higher High (bullish continuation)
HL — Higher Low (bullish continuation)
LH — Lower High (bearish continuation)
LL — Lower Low (bearish continuation)
This gives you the complete market structure sequence — HH + HL = uptrend, LH + LL = downtrend — at a glance without manually marking swings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Order Blocks (OB) — With Touch Tracking
Order Blocks are the last opposing candle before a strong move — the zone where institutional orders were placed. AlphaX Structure detects Order Blocks automatically using two methods:
Engulfing Pattern Detection — a candle that fully engulfs the prior candle's body, indicating aggressive institutional entry
Strong Displacement Detection — a candle that breaks through two prior bars' highs or lows, showing powerful directional commitment
Each Order Block is drawn as a filled box spanning the body of the origin candle. The box extends forward in time, remaining on the chart as a potential reaction zone.
What makes this unique — Touch Counting:
Most SMC indicators simply show or hide Order Blocks. AlphaX Structure tracks how many times price retests each Order Block and displays the count directly on the label:
OB — fresh, untested Order Block
OB ×1 — price has retested this zone once
OB ×2 — price has retested this zone twice
OB ×3+ — multiple retests — the zone is weakening
This is critical information. A fresh OB with zero touches is the highest probability reaction zone. An OB that has been tested 3 or more times is significantly weaker — institutional orders at that level have likely been filled, and the zone may fail on the next test.
Mitigation:
When price closes through an Order Block (beyond its far edge), the OB is considered mitigated . It grays out and stops extending — visually clearing the chart while preserving the historical record of where the zone existed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Fair Value Gaps (FVG) — With Fill Percentage
A Fair Value Gap is a three-candle imbalance where the wick of the first candle and the wick of the third candle do not overlap — creating a gap in price that represents inefficient price delivery. These gaps act as magnets that price tends to return to and fill.
Bullish FVG — gap between the high of candle 1 and the low of candle 3 (upward imbalance). Price tends to pull back down to fill this gap before continuing higher.
Bearish FVG — gap between the low of candle 1 and the high of candle 3 (downward imbalance). Price tends to push back up to fill this gap before continuing lower.
Each FVG is drawn as a dotted-border box with a midpoint line through the center. The midpoint represents the 50% level of the imbalance — often the precise level where price reacts.
What makes this unique — Real-Time Fill Percentage:
AlphaX Structure calculates and displays how much of each FVG has been filled as price returns to the zone:
FVG — unfilled gap, no price has entered the zone
FVG 35% — price has partially filled 35% of the gap
FVG 72% — price has filled most of the gap
FVG ✓ — gap has been fully mitigated (price closed through the entire zone)
This gives you precision that no standard FVG indicator provides. A gap that is 70% filled but holding at the midpoint is behaving differently than one that was filled in a single candle. The fill percentage helps you judge whether the imbalance has been respected (potential bounce) or is being aggressively closed (continuation through).
A minimum FVG size filter (in ticks) is available to remove insignificant micro-gaps that clutter the chart on lower timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💰 Liquidity Sweeps
Liquidity sweeps occur when price wicks beyond a recent high or low but closes back inside the range — indicating a stop hunt or liquidity grab by institutional players. This is one of the most important concepts in ICT methodology.
Buy-side Sweep — price wicks above the recent highest high (grabbing buy-stop liquidity) but closes back below with a bearish candle. This often precedes a reversal lower. Labeled as "$ sweep" above the bar.
Sell-side Sweep — price wicks below the recent lowest low (grabbing sell-stop liquidity) but closes back above with a bullish candle. This often precedes a reversal higher. Labeled as "$ sweep" below the bar.
The lookback period for defining "recent" highs and lows is configurable, allowing you to tune sensitivity from tight scalping sweeps to broader swing-level liquidity grabs.
Liquidity sweeps are most powerful when they occur at key levels — equal highs/lows, Order Block zones, or previous day/week extremes. When a sweep aligns with an OB or FVG, the probability of a reaction increases significantly.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚖ Equal Highs & Equal Lows (EQH / EQL)
When two consecutive swing highs or swing lows form at approximately the same price, they create a liquidity pool . Retail traders place stops just beyond these levels, and institutional players know exactly where those stops are clustered.
EQH (Equal Highs) — two swing highs at nearly identical prices. A dashed line extends forward marking this level as a target for buy-side liquidity sweeps. Market makers frequently drive price above equal highs to trigger stops before reversing.
EQL (Equal Lows) — two swing lows at nearly identical prices. A dashed line marks this as a sell-side liquidity target. Expect price to sweep below before potentially reversing.
The tolerance for what counts as "equal" is configurable as a percentage (default 0.02%). This prevents false matches while catching genuinely significant double-top and double-bottom liquidity formations.
Equal Highs and Equal Lows are prime targets — when you see price approaching an EQH from below or an EQL from above, be prepared for either a sweep-and-reverse or a clean breakout. The market structure context (BOS vs CHoCH) and the presence of nearby Order Blocks will help you determine which scenario is more likely.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔥 Displacement Candles
Displacement represents aggressive institutional commitment — a candle whose body is significantly larger than normal, showing that smart money entered with force. AlphaX Structure identifies displacement candles using two criteria:
The candle body must exceed the Average True Range (ATR) multiplied by a configurable factor (default 2.0×)
The body must occupy more than 60% of the total candle range (strong body-to-wick ratio — institutional candles close near their extreme, not in the middle)
Bullish displacement candles are marked with a diamond below the bar. Bearish displacement candles are marked with a diamond above the bar.
Displacement candles are the engine behind structure breaks . When a BOS or CHoCH is accompanied by a displacement candle, the move has genuine institutional backing. When structure breaks occur on weak, indecisive candles, the break is more likely to fail.
Additionally, displacement candles often create Fair Value Gaps . When you see a displacement diamond next to an FVG box, you know the imbalance was created by a powerful move — making that FVG a higher-probability reaction zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💪 Candle Strength Dots
An optional feature that marks individual candles based on their relative strength compared to the ATR:
Strong Bullish Candle — body exceeds 1.2× ATR with body ratio above 55%, bullish close. Dot appears below the bar.
Strong Bearish Candle — same criteria, bearish close. Dot appears above the bar.
This is a quick visual filter for identifying which candles represent genuine conviction versus noise. Disabled by default to keep the chart clean — enable it when you want granular candle-level analysis.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Premium & Discount Zones
The indicator calculates the current trading range using a configurable lookback period and divides it into:
Premium Zone — the upper 25% of the range, shaded with the bear color. In ICT methodology, the premium zone is where smart money sells. Buying in premium is inherently risky.
Discount Zone — the lower 25% of the range, shaded with the bull color. This is where smart money buys. Selling in discount is inherently risky.
Equilibrium (EQ) — the exact 50% midpoint of the range, marked with a dotted cross line. This is the fair value level. Price above EQ is in premium territory; price below EQ is in discount territory.
The Premium and Discount zones are drawn using boxes and lines that do not affect the chart's price scale — your candles will always display at their natural size regardless of the range lookback setting.
The dashboard displays your exact position within the range as a percentage: "DISCOUNT 18%" means price is in the lower 18% of the range — deep discount. "PREMIUM 85%" means price is in the upper portion — extended and vulnerable to pullback.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Live Dashboard
A comprehensive real-time reference panel that updates on every bar, providing complete market context without needing to scan the chart:
STRUCTURE — current market structure direction: ▲ BULLISH, ▼ BEARISH, or — NEUTRAL, based on the most recent BOS or CHoCH
EMA BIAS — longer-term directional bias based on price position relative to 50 and 200 EMA alignment
ZONE — whether price is currently in PREMIUM, UPPER EQ, LOWER EQ, or DISCOUNT territory, with exact percentage
EQ LEVEL — the exact price of the current range equilibrium, formatted to the instrument's tick size
RSI (14) — current RSI value, color-coded: green in oversold territory, red in overbought, neutral in the middle
VOLATILITY — current volatility regime (HIGH / NORMAL / LOW) based on ATR as a percentage of price, with the exact ATR value
VOLUME — current volume relative to the 20-period average: SPIKE (>2×), ABOVE AVG (>1.3×), NORMAL, or DRY (<0.7×)
ORDER BLOCKS — number of currently active (unmitigated) Order Blocks, broken down by bullish and bearish count
FAIR VALUE GAPS — number of currently active (unfilled) FVGs, broken down by bullish and bearish count
SWING HIGH — the most recent confirmed swing high price
SWING LOW — the most recent confirmed swing low price
The dashboard title "A L P H A X S T R U C T U R E" is displayed in the signature yellow-green theme color. All values are color-coded to match their significance — bullish values in yellow-green, bearish values in red, neutral in gray.
Dashboard position (Top Left, Top Right, Bottom Left, Bottom Right) and text size (Tiny, Small, Normal) are fully configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎨 Visual Design Philosophy
AlphaX Structure follows a strict dual-tone color theme for maximum clarity:
Yellow-Green (#c8e624) — all bullish elements: bullish BOS, bullish OBs, bullish FVGs, equal lows, discount zones, bullish displacement, sweep recoveries
Red (#ff1744) — all bearish elements: bearish BOS, bearish OBs, bearish FVGs, equal highs, premium zones, bearish displacement, sweep rejections
Gray (#555555) — neutral and mitigated elements: mitigated OBs and FVGs, equilibrium line, inactive zones
Structure labels (BOS, CHoCH, OB, FVG, EQH, EQL) are offset from their reference lines by a dynamic ATR-based spacing value. This ensures labels never sit directly on top of the lines they reference — maintaining readability at any zoom level and on any instrument.
All label sizes are configurable from a single setting (Tiny, Small, Normal, Large), and structure line widths for BOS and CHoCH are independently adjustable.
Mitigated zones are visually dimmed — OB and FVG boxes turn gray with increased transparency, clearly distinguishing active zones from historical ones without removing them from the chart entirely.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Read AlphaX Structure — Step by Step
Step 1 — Identify the Trend
Check the dashboard: what does STRUCTURE say? What does EMA BIAS say?
If both agree (both bullish or both bearish), you have a confirmed directional environment
If they disagree, the market may be in transition — wait for alignment
Step 2 — Locate Key Levels
Identify active Order Blocks — these are your primary reaction zones
Note any unfilled FVGs — price is likely to return to these imbalances
Check for Equal Highs or Equal Lows — these are liquidity targets
Step 3 — Determine Premium or Discount
Check the ZONE reading in the dashboard
In a bullish trend, look for entries in DISCOUNT or LOWER EQ
In a bearish trend, look for entries in PREMIUM or UPPER EQ
Avoid entering long in deep premium or short in deep discount — you are fighting the range
Step 4 — Wait for Confluence
The highest probability setups occur when multiple elements align at the same price level
Example: A bullish OB with zero touches sitting inside the discount zone, with an unfilled bullish FVG overlapping the same area, and a recent sell-side liquidity sweep just below — this is a textbook smart money long entry
Example: A bearish CHoCH forms at a premium zone equal high, followed by a displacement candle creating a bearish FVG — this is a high-probability short setup
Step 5 — Monitor Displacement
When structure breaks occur, check for displacement diamonds
BOS or CHoCH with displacement = high conviction move
BOS or CHoCH without displacement = weaker break, may fail or consolidate
Step 6 — Track FVG Fill Progress
As price returns to an FVG, watch the fill percentage update in real time
If price fills to 50% (the midpoint line) and rejects — the FVG is acting as support or resistance
If price fills beyond 70% — the imbalance is mostly resolved, the level is losing significance
If the label shows "FVG ✓" — the gap is fully mitigated, it is no longer a valid zone
Step 7 — Count OB Touches
Fresh OBs (zero touches) are the strongest — institutional orders are still there
OBs with 1–2 touches are still valid but weakening
OBs with 3+ touches — expect the zone to break on the next test. Consider trading the break rather than the bounce
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features Summary
📐 Automatic Break of Structure (BOS) and Change of Character (CHoCH) detection with proper trend state tracking
📦 Order Blocks with real-time touch counting — know exactly how many times each zone has been tested
⚡ Fair Value Gaps with live fill percentage — see partial fills update as price enters the zone
✓ FVG mitigation checkmark — clear visual confirmation when an imbalance is fully resolved
💰 Liquidity sweep detection — buy-side and sell-side stop hunts automatically identified
⚖ Equal Highs and Equal Lows — institutional liquidity pool targets marked with extension lines
🔥 Displacement candle detection — identify the high-conviction institutional candles behind structure breaks
💪 Optional candle strength dots — quick visual filter for strong vs weak bars
🎯 Premium and Discount zones with equilibrium line — know whether you are buying cheap or expensive
📋 12-row live dashboard — structure, EMA bias, zone, RSI, volatility, volume, active OB/FVG counts, swing levels
🏷 HH / HL / LH / LL swing classification labels — complete market structure sequence at a glance
🎨 Clean dual-tone color theme — yellow-green bullish, red bearish, gray neutral — no visual clutter
📏 ATR-based label spacing — labels never overlap their reference lines regardless of instrument or timeframe
⚙ Fully configurable — label size, line widths, max drawings, transparency, lookback periods, all from the settings panel
🔔 18 alert conditions covering every event type including combined alerts for multi-condition monitoring
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Structure
Swing Detection Length — number of bars on each side to confirm a pivot (default: 5)
Show Break of Structure — toggle BOS lines and labels
Show Change of Character — toggle CHoCH lines and labels
Show Swing Points — toggle HH/HL/LH/LL labels at pivots
Max Structure Lines — limit on total BOS/CHoCH drawings (default: 15)
Order Blocks
Show Order Blocks — toggle OB detection and drawing
Remove Mitigated OBs — gray out and stop extending OBs that price has closed through
Max Order Blocks — maximum active OB drawings (default: 8)
Bullish / Bearish OB Color — independent color pickers
OB Fill Transparency — control how transparent the OB fill appears (default: 88)
Fair Value Gaps
Show Fair Value Gaps — toggle FVG detection and drawing
Remove Mitigated FVGs — gray out and checkmark FVGs that price has fully closed through
Max FVG Boxes — maximum active FVG drawings (default: 10)
Bullish / Bearish FVG Color — independent color pickers
FVG Fill Transparency — control fill transparency (default: 90)
Min FVG Size (ticks) — filter out micro-gaps below this threshold
Liquidity
Show Liquidity Sweeps — toggle sweep detection labels
Liquidity Lookback — how many bars to look back for the recent high/low that defines the sweep level (default: 20)
Buy-side / Sell-side Sweep Color — independent color pickers
Equal H/L
Show Equal Highs / Lows — toggle EQH/EQL detection
Equal Level Tolerance % — how close two swing pivots must be to qualify as "equal" (default: 0.02%)
Equal Highs / Lows Color — independent color pickers
Premium & Discount
Show Premium/Discount — toggle zone boxes and equilibrium line
Range Lookback — how many bars to calculate the current range (default: 50)
Discount / Premium Zone Color — independent color pickers
Displacement
Show Displacement Candles — toggle displacement diamond markers
ATR Multiplier — how many times larger than ATR the candle body must be (default: 2.0)
ATR Period — the ATR calculation period (default: 14)
Bull / Bear Displacement Color — independent color pickers
Candle Strength
Show Candle Strength Dots — toggle strong candle markers (default: off)
Strength ATR Period — ATR period for strength comparison (default: 14)
Appearance
Label Size — Tiny, Small, Normal, or Large for all chart labels
Structure Line Width — thickness of BOS lines (default: 1)
CHoCH Line Width — thickness of CHoCH lines (default: 2)
Dashboard
Show Dashboard — toggle the information panel
Dashboard Position — Top Left, Top Right, Bottom Left, or Bottom Right
Dashboard Text Size — Tiny, Small, or Normal
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (18 Total)
Individual Alerts:
Bullish BOS — fires when a bullish Break of Structure is confirmed
Bearish BOS — fires when a bearish Break of Structure is confirmed
Bullish CHoCH — fires when a bullish Change of Character is detected
Bearish CHoCH — fires when a bearish Change of Character is detected
Buy-side Liquidity Sweep — fires when price sweeps above recent highs and closes back below
Sell-side Liquidity Sweep — fires when price sweeps below recent lows and closes back above
Bullish FVG Formed — fires when a new bullish Fair Value Gap is created
Bearish FVG Formed — fires when a new bearish Fair Value Gap is created
Bullish OB Formed — fires when a new bullish Order Block is detected
Bearish OB Formed — fires when a new bearish Order Block is detected
Bullish Displacement — fires when a bullish displacement candle is confirmed
Bearish Displacement — fires when a bearish displacement candle is confirmed
Combined Alerts:
Any Bullish Structure Break — fires on either bullish BOS or bullish CHoCH
Any Bearish Structure Break — fires on either bearish BOS or bearish CHoCH
Any Liquidity Sweep — fires on either buy-side or sell-side sweep
Any FVG Formed — fires on either bullish or bearish FVG
Any OB Formed — fires on either bullish or bearish Order Block
Any Displacement Candle — fires on either bullish or bearish displacement
All alert messages are prefixed with and include ticker, interval, and price for clean webhook and notification integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🧠 ICT and SMC traders — every core concept is mapped automatically: BOS, CHoCH, OB, FVG, liquidity sweeps, EQH/EQL, premium/discount, displacement
🥇 Gold (XAUUSD) traders — gold's price action is heavily driven by institutional order flow and liquidity sweeps; this tool maps exactly where those events occur
📉 Forex traders — applicable to all major and minor pairs; session-based liquidity sweeps are particularly effective on EURUSD, GBPUSD, and USDJPY
📊 Index traders — works on US30, NAS100, SPX500, DAX — Order Blocks and FVGs are core institutional concepts on indices
📈 Traders who want clean charts — every element uses the same dual-tone theme with proper spacing, mitigation graying, and configurable drawing limits. No clutter, no overlapping elements
⚠ Traders learning SMC methodology — the indicator maps every concept in real time, making it an excellent study tool for understanding how structure, order flow, and liquidity interact
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
Designed for intraday to swing timeframes — M1 through H4. Works on daily and weekly charts but intraday timeframes provide the best resolution for OB and FVG detection.
Premium and Discount zones are drawn using boxes and lines on the last bar only — they do not affect the chart's vertical price scale. Your candles will always display at their natural size.
Structure detection uses bar close confirmation — a swing high or low must be confirmed by the configured number of bars on each side before it is recognized as a pivot.
The maximum number of drawings for OBs, FVGs, structure lines, and EQ lines are all independently configurable. Older drawings beyond the limit are automatically removed.
Touch counting on Order Blocks uses a de-duplication method — price must leave the OB zone and re-enter to count as a new touch. Consecutive bars inside the same OB count as one touch.
FVG fill percentage is calculated based on the deepest penetration into the gap — even if price subsequently leaves the zone, the fill percentage reflects the maximum penetration achieved.
All calculations are non-repainting — signals are confirmed on bar close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All structure levels, Order Blocks, Fair Value Gaps, and liquidity levels shown are derived from historical price data and their significance as support, resistance, or reaction zones is not guaranteed. Smart Money Concepts and ICT methodology are interpretive frameworks — they describe market behavior patterns but do not predict future price action with certainty. Past reactions at these levels do not guarantee future reactions. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who read the market the way institutions move it. Indicator

Institutional Order Flow Shield [MarkitTick]💡 The Institutional Order Flow Shield is an advanced, overlay-based technical indicator designed to peer inside the standard price chart and extract granular order flow dynamics. By utilizing lower timeframe (LTF) intrabar data, this tool reconstructs buying and selling pressure, helping traders identify hidden accumulation, distribution, and manipulative market practices such as order spoofing and iceberg execution. It acts as a comprehensive shield, filtering market noise through volatility and trend alignment to deliver high-probability signals.
✨ Originality and Utility
Standard volume indicators often fail to distinguish between aggressive buying and aggressive selling within a single candle. This script solves that problem by drilling down into intrabar price action to approximate order flow delta.
● Key Differentiators
Intrabar Reconstruction: Rebuilds volume delta without requiring expensive tick data or footprint charts.
Manipulation Detection: Specifically engineered to detect "Spoofing" (pulling large limit orders to fake price direction) and "Icebergs" (large hidden orders executing in smaller clips).
Adaptive Decision Matrix: Does not just fire raw signals; it weights them using a confidence scoring system based on VWAP, EMA trends, and Relative Volume (RVOL).
🔬 Methodology and Concepts
The core engine of this indicator relies on several interconnected mathematical and logical frameworks to process market data.
● Order Flow Approximation
The script requests lower timeframe data (defaulting to 1-minute candles) and calculates where the close occurs relative to the high-low range of that LTF candle. It allocates volume to the "Buy" side or "Sell" side proportionally. Wick rejections are also factored in to adjust the final volume delta, reducing the impact of passive limit orders getting filled at extreme highs or lows.
● Spoof and Iceberg Logic
Spoof Detection: Triggered when a massive volume spike is followed immediately by a sharp volume drop and a price reversal, indicating that the liquidity was pulled (faked) rather than executed.
Iceberg Detection: Identified when volume surges past a smart threshold (based on a multiplier of the volume SMA) while price stalls, indicating a massive hidden limit order absorbing market aggression.
🎨 Visual Guide
The indicator provides a rich, non-intrusive visual experience on the main chart, utilizing color-coded bars, labels, and a comprehensive dashboard.
● Chart Elements
Bar Colors: Candles are painted bright green for confirmed bullish signals (confidence > 50%) and bright red for confirmed bearish signals.
ACM / DST Labels: Green "ACM" labels indicate accumulation (bullish order flow), while Red "DST" labels indicate distribution. Hovering over these labels reveals a tooltip with confidence score, VWAP alignment, and volume impact.
BPL / APL Labels: Orange labels denoting Bid Pulls and Ask Pulls (Spoofing events).
BWL / AWL Labels: Cyan labels highlighting Bid Walls and Ask Walls (Iceberg events).
WBD / WAK Labels: Faded cyan labels indicating massive Whale Bid or Ask entries based purely on relative volume spikes.
● The Sniper Dashboard
Located by default in the top right corner, this table provides a real-time summary.
Net Whale Flow: The cumulative delta of massive order events.
Decision Matrix: Displays the current overall bias (e.g., "STRONG BUY" or "WAIT/NEUTRAL").
Signal Confidence: A percentage score grading the strength of the current setup.
Filters: Real-time status of RVOL, VWAP Position, EMA Trend, and ATR Gates.
Event Counters: Tracks the total number of spoofing and iceberg anomalies detected during the session.
📖 How to Use
This indicator is best used as a confluence tool for day trading and scalping.
● Trade Execution Guidelines
Identify the Trend: Check the dashboard to ensure the EMA 50/200 trend aligns with your directional bias.
Wait for Manipulation: Look for Spoof (BPL/APL) or Iceberg (BWL/AWL) labels. A Bid Pull (Spoof) often precedes a move lower, while a Bid Wall (Iceberg) can act as solid support.
Confirm with Accumulation/Distribution: Enter a long trade when a green "ACM" label appears, confirming that aggressive buyers have stepped in. Ensure the dashboard's "Signal Conf." is high (above 60-70%).
Risk Management: Place stop losses behind identified Iceberg walls. If an Ask Wall (AWL) is broken by price, it often triggers a short squeeze, offering breakout opportunities.
⚙️ Inputs and Settings
The script offers deep customization through its settings menu, divided into functional groups.
● Order Flow Engine
Intrabar Timeframe (LTF): Determines the granularity of the internal volume calculation.
Flow Batch Length (bars): The rolling window used to sum up recent volume delta.
Flow Sensitivity Ratio: Adjusts how much larger the average buy size must be compared to the sell size to trigger an accumulation signal.
● Spoof & Iceberg Detection
Min Spoof Volume Diff: The minimum volume drop required to flag a pulled order.
Spoof Pull Threshold (%): The percentage drop required compared to the previous bar.
Iceberg Avg Multiplier: How many times larger than the average volume a bar must be to trigger an iceberg alert.
● Smart Filters
RVOL Filter: Requires the current bar's volume to be above a specific relative threshold, keeping you out of low-liquidity chop.
ATR Volatility Gate: Suppresses signals on extremely tight, flat candles based on a minimum ATR percentage.
VWAP / Trend Filters: Toggles the alignment checks that feed into the confidence scoring.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The foundation of this indicator rests heavily on Market Microstructure Theory and Order Book Dynamics.
● Volume Delta Estimation Models
Because trading platforms often do not natively supply bid/ask tick data for all assets, the script utilizes an intrabar price-proportion heuristic. This aligns with academic models like the Lee-Ready algorithm, which infers trade direction based on price movement relative to previous prints. By applying this to LTF data and rolling it up, the script effectively calculates a weighted approximation of order flow toxicity (the imbalance of aggressive market orders).
● Liquidity Illusion and Spoofing
Spoofing is a recognized manipulative practice where liquidity is posted to the limit order book to create a false impression of supply or demand, only to be cancelled before execution. The script attempts to quantify this mathematically by monitoring sudden, severe variance in Relative Volume (RVOL) coupled with strict directional price reversals. When volume drops below the pullback threshold immediately following an injection phase, the algorithm flags the structural anomaly.
● Bayesian-Inspired Confidence Matrix
The Decision Matrix behaves similarly to a naive Bayesian classifier. It starts with a base event (e.g., an accumulation phase) and updates the probability (Confidence Score) of a successful follow-through by checking independent market state variables: Mean Reversion metrics (VWAP), Volatility (ATR), and Momentum (EMA crossover). This multidimensional filtering ensures that order flow anomalies are only traded when the broader statistical environment is favorable.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

ICT Bias ProICT Bias Pro: Dashboard + First Hour Range & Session FVGs
This indicator is a comprehensive "Bias Builder" designed for traders who follow Inner Circle Trader (ICT) concepts. It combines a multi-timeframe trend dashboard with a specific intraday strategy derived from ICT's recent teaching: "How Do I Engage Markets When I Don't Have An Initial Bias?"
The tool is designed to help traders find confluence between the Macro trend (Daily/4H) and the Micro execution (15M/5M) during the New York AM Session.
Features & Methodology
1. Multi-Timeframe Bias Dashboard Located in the corner of your chart, this dashboard provides a quick "Traffic Light" view of the market structure across 4 key timeframes:
Daily & 4-Hour: Establishes the macro direction.
15-Min & 5-Min: Monitors intraday order flow.
Logic: Bias is determined by comparing price relative to the 20 EMA and checking for Market Structure alignment. Green = Bullish, Red = Bearish.
2. The "First Hour" Trading Range (No-Bias Strategy) Following ICT’s specific logic for days when bias is unclear, this tool automatically highlights the 9:30 AM – 10:30 AM (New York Time) trading range.
Range High & Low: Defining the volatility of the opening hour.
Equilibrium (50%): The "Line in the Sand." Price holding above the 50% signals bullish strength (Premium); price below signals bearish weakness (Discount).
Quadrants (25% & 75%): Deep discount/premium zones for precision entries.
3. Session-Specific Fair Value Gaps (FVG) The indicator automatically detects and draws Fair Value Gaps that form only within that critical first hour of trading.
Auto-Extension: Boxes extend to the right until price "mitigates" (fills) them.
Consequent Encroachment (C.E.): Automatically plots the 50% dashed line inside every FVG, a key institutional support/resistance level.
Smart Mitigation: Once a gap is filled, the box changes color (user-selectable) to indicate it is no longer an active magnet.
How to Use This Indicator
This tool is designed to identify Confluence:
Check the Dashboard: Look for alignment on the Daily and 4H timeframes (e.g., Both Green).
Wait for 10:30 AM EST: Allow the script to draw the First Hour Range.
Trade the Confluence:
Bullish Setup: If the Dashboard is Green, look for price to hold above the 50% Equilibrium of the First Hour Range. Look for entries inside Bullish FVGs that form near the 50% or 75% levels.
Bearish Setup: If the Dashboard is Red, look for price to reject the 50% Equilibrium and stay in the lower half. Target Bearish FVGs near the 50% or 25% levels.
Settings & Customization
Dashboard Toggle: Show or hide the table to keep charts clean.
Colors: Fully customizable colors for Range High/Low, FVGs (Bullish/Bearish), and Mitigated gaps.
Text Positioning: Adjust FVG labels (Left/Center/Right) to prevent visual clutter on candles.
Credits & Attribution
Concept: Inner Circle Trader (Michael Huddleston).
Core Strategy: Based on the video "How Do I Engage Markets When I Don't Have An Initial Bias?"
Disclaimer: This tool is for educational purposes only. Past performance is not indicative of future results. Indicator

Daily Bias Trade Manager [MarkitTick]💡 The Daily Bias Trade Manager is a sophisticated technical analysis suite designed to automate the identification of high-probability intraday setups based on liquidity concepts and structural shifts. By synthesizing Previous Day High/Low (PDH/PDL) interactions with momentum confirmation and strict risk management protocols, this tool assists traders in navigating the "Daily Bias." It moves beyond simple signal generation by offering a complete trade management visualization system, projecting entries, stop losses, and take-profit levels directly onto the chart in real-time.
✨ Originality and Utility
This script distinguishes itself by integrating institutional price action theory—specifically Liquidity Sweeps and Change in State of Delivery (CISD)—with mechanical filtering. While many indicators simply highlight highs and lows, the Daily Bias Trade Manager validates these levels by analyzing what happens *after* price tests them.
It solves a common problem for intraday traders: "Analysis Paralysis." By automating the detection of structure breaks (MSS) and Fair Value Gaps (FVG) following a sweep of daily liquidity, it provides an objective framework for entry. Furthermore, the built-in "Position Box" feature removes the guesswork from trade execution by instantly calculating risk-to-reward ratios and visualizing them, allowing traders to see the feasibility of a trade before execution.
🔬 Methodology and Concepts
The core logic operates on a sequential detection model:
Liquidity Identification: The script first plots the Previous Day High (PDH) and Previous Day Low (PDL). These are critical institutional reference points where stop-loss orders (liquidity) often reside.
The Sweep: A "Sweep" is confirmed when price breaches a PDH/PDL but fails to sustain the breakout, closing back inside the previous day's range. This suggests a "Fake-out" or liquidity grab, often a precursor to a reversal.
Change in State of Delivery (CISD): Following a sweep, the script monitors local market structure. It looks for a decisive close past a recent swing point (Swing High for shorts, Swing Low for longs) within a user-defined bar window. This confirms that the counter-trend move has momentum.
Confluence Filtering: To reduce false positives, the engine applies optional filters:
RVOL (Relative Volume): Ensures the sweep occurred on significant volume (Climax behavior).
RSI Momentum: Verifies that momentum supports the reversal direction.
Trend Filter: Uses a long-term EMA to ensure trades align with the broader market direction.
Entry Model: Upon validation, the script calculates an entry at the close (or optionally at a Fair Value Gap), places a Stop Loss at the sweep extreme, and projects three Take Profit targets based on configurable R:R ratios.
🎨 Visual Guide
The indicator uses a distinct color-coded system to keep the chart clean yet informative:
● Liquidity Levels & Sweeps
Orange/Blue Lines: Represent the PDH (Previous Day High) and PDL (Previous Day Low).
Teal Shaded Zones: Indicate a "Buy-Side Sweep" (Price took highs and rejected).
Red Shaded Zones: Indicate a "Sell-Side Sweep" (Price took lows and rejected).
● Position Management Boxes
When a signal triggers, a structured box appears:
Solid Gray Line: The theoretical Entry Price.
Solid Red Line: The Stop Loss (SL), typically placed at the swing high/low of the sweep.
Dashed Blue Lines: Represent TP1, TP2, and TP3 targets based on Reward-to-Risk settings.
Labels: Data tags on the right side of the box show exact price coordinates for Entry, SL, and Targets.
● Signals & Clouds
Green "BUY" Labels: Appear below the bar when a bullish sweep and structural shift are confirmed.
Red "SELL" Labels: Appear above the bar when a bearish sweep is validated.
Yellow Clouds: Highlight Fair Value Gaps (FVG) used for entry confluence or retests.
● Multi-Timeframe (MTF) Dashboard
A panel (default: Top Right) displays the status of up to three higher timeframes.
Trend: Shows "BULL" or "BEAR" based on EMA alignment.
Liquidity: Indicates if the timeframe is "Taking Buy Liq", "Taking Sell Liq", or "Inside Range".
📖 How to Use
● Bullish Reversal Setup
Wait for price to drop below the Blue PDL Line.
Look for a Red Sell-Side Sweep Zone to form, indicating price has rejected lower prices.
Wait for the Green BUY Signal . This confirms a shift in structure (CISD) back to the upside.
Observe the Position Box. If the Risk/Reward is favorable (targets are within reasonable reach), consider the trade.
Optional: Use the "Dynamic Targets" setting to target the previous swing high instead of a fixed ratio.
● Bearish Reversal Setup
Wait for price to rally above the Orange PDH Line.
Look for a Teal Buy-Side Sweep Zone .
Wait for the Red SELL Signal confirming the rejection.
Ensure the dashboard shows alignment (e.g., Higher Timeframe Trend is Bearish) for higher probability.
● Trade Management
Enable the "ATR Trailing Stop" in settings to have the Stop Loss line dynamically adjust as price moves in your favor, locking in potential gains.
⚙️ Inputs and Settings
● General & Display
Show Daily Liquidity: Toggles the PDH/PDL lines.
Max Signals/Zones: Limits the visual clutter by restricting historical shapes.
● Detection Logic
Swing Detection Length: Controls the sensitivity of pivot points. Higher numbers = fewer, more significant swings.
CISD Window: How many bars after a sweep are allowed for the structure shift to occur.
Use FVG Entry: If true, the signal waits for a retest of a gap rather than entering immediately at the close.
● Filters
Volume (RVOL): Requires the sweep candle volume to be X times larger than average.
Trend Filter: Only allows Buy signals above the EMA and Sell signals below it.
Session Filter: Restricts signals to specific hours (e.g., New York Killzone).
● Targets & Management
Target R:R: Sets the multiplier for TP1, TP2, TP3 relative to the stop loss distance.
Use Dynamic Targets: Targets structural liquidity (Previous Highs/Lows) instead of fixed math ratios.
ATR Trailing Stop: Activates the trailing stop mechanism.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
This indicator is grounded in the principles of Market Microstructure and Mean Reversion theory .
1. Liquidity Pools & Stop Runs:
Academic literature on market microstructure suggests that order flow clusters around obvious visual references (PDH/PDL). Large market participants often utilize this "resting liquidity" to fill large block orders with minimal slippage. The "Sweep" logic detects this absorption phase.
2. Volatility Breakout vs. Fake-out:
The script differentiates between a genuine breakout and a mean-reverting "fake-out" by analyzing the Close relative to the Range . A close back within the prior day's range after a breach signifies a failure of auction in the new territory, statistically increasing the probability of a reversion to the mean (equilibrium).
3. Momentum Validation (RSI & RVOL):
By integrating Relative Volume (RVOL) and RSI, the script applies statistical significance testing to the price action. High volume at a range extreme without price progress (the sweep) indicates "Stopping Volume" or absorption, a key concept in Volume Spread Analysis (VSA).
🙏 Gratitude
I would like to express my gratitude to harry040708 for sharing the insightful idea that made this script possible.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

FX OSINT - Institutional Midnight Intelligence For ForexFX OSINT — Institutional Midnight Intelligence For Forex
See Your FX Charts Like an Intelligence Briefing, Not a Guess
If you’ve ever stared at EURUSD or GBPJPY and thought:
Where is the real liquidity?
Is this move sponsored by smart money or just noise?
Am I buying into premium or discount?
…then FX OSINT is designed for you.
FX OSINT (Forex Open Source Intelligence) treats the FX market the way an analyst treats an investigation:
Collect open‑source signals from price, time, and volatility.
Map out liquidity, structure, and sessions in a repeatable way.
Present them in a clean, non‑cluttered dashboard so you can read context quickly.
No rainbow spaghetti. No 12 indicators stacked on top of each other. Just structured information, midnight visuals, and a clear read on what the market is doing right now.
Why FX OSINT Exists
Many FX traders run into the same problems:
Overloaded charts – multiple indicators fighting for space, none talking to each other.
Signals with no context – arrows that ignore structure, sessions, and liquidity.
Tools not tuned for FX – generic indicators that don’t care what pair you are on.
FX OSINT brings this together into one FX‑focused framework that:
Understands structure : BOS/CHOCH, swings, and trend across multiple timeframes.
Respects liquidity : sweeps, order blocks, and FVGs with controlled visibility.
Reads volatility & ADR : how far today’s range has developed.
Knows the clock : London, New York, and key killzones.
Scores confluence : a 0–100 engine that summarizes how much is lining up.
FX OSINT is built for traders who want structured, institutional‑style logic with a disciplined, midnight‑themed UI —not flashing buy/sell buttons.
1. Midnight Dashboard — Top‑Right Intelligence Panel
This panel acts as your compact “situation room”:
CONFLUENCE — 0–100 score blending trend alignment, volatility regime, sessions, liquidity events, order blocks, FVGs, and ADR context.
REGIME — Low / Building / Normal / Expansion / Extreme, driven by ATR relationships, so you know if you’re in chop, trend, or expansion.
HTF / MTF / LTF TREND — Higher‑, medium‑, and current‑timeframe bias in one place, so you see if you are trading with or against the larger flow.
ADR USED — How much of today’s typical range has already been consumed in percentage terms.
PIP VALUE — Approximate pip size per pair, including JPY‑style pairs.
Everything is bold, legible, and color‑coded, but the layout stays minimal so you can:
Look once → understand the context.
2. Structure, BOS, CHOCH — Smart‑Money‑Style Skeleton
FX OSINT tracks swing highs and lows, then shows how structure evolves:
Trend logic based on evolving swings, not just a moving average cross.
BOS (Break of Structure) when price expands in the direction of trend.
CHOCH (Change of Character) when behavior flips and the market structure changes.
Labels are selective, not spammy . You don’t get a tag on every minor wiggle—only when structure meaningfully shifts, so it’s easier to answer:
"Are we continuing the current leg, or did something actually change here?"
3. Liquidity Sweeps, Order Blocks & FVGs — The OSINT Layer
FX OSINT treats liquidity as a key information layer:
Liquidity sweeps — Detects when price spikes through recent highs/lows and then snaps back, flagging potential stop runs.
Order blocks — The last opposite candle before a displacement move, drawn as controlled boxes with limited lifespan to avoid clutter.
Fair Value Gaps (FVGs) — Three‑candle imbalances rendered as precise zones with a cap on how many can exist at once.
Under the hood, boxes are managed so your chart does not become a wall of old zones:
// Draw Order Blocks with overlap prevention
if isBullishOB and showOrderBlocks
if array.size(obBoxes) >= maxBoxes
oldBox = array.shift(obBoxes)
box.delete(oldBox)
newBox = box.new(bar_index , low , bar_index + obvLength, high ,
border_color = bullColor, bgcolor = bullColorTransp,
border_width = 2, extend = extend.none)
array.push(obBoxes, newBox)
Box limits keep the number of zones under control.
Borders and transparency are tuned so you still see price clearly.
You end up with a curated liquidity map , rather than a chart buried under every level price has ever touched.
4. Volatility, ADR & Sessions — Time and Range Intelligence
FX OSINT runs a Volatility Regime Analyzer and an ADR engine in the background:
Volatility regime — Five states (Low → Extreme) derived from fast vs. slow ATR.
ADR bands — Daily high/mid/low projected from the current daily open.
ADR used % — How far today’s move has traveled relative to its typical range.
On the time side:
Asia, London, New York sessions are softly highlighted with a single active background to avoid overlapping colors.
Killzones (e.g., London and New York opens) can be emphasized when you want to focus on where significant moves often begin.
Together, this helps you answer:
"What time is it in the trading day?"
"How stretched are we?"
"Is expansion just starting, or are we late to the move?"
5. ICT‑Style Add‑Ons — BOS/CHOCH, Premium/Discount, and Confluence
For modern FX / ICT‑inspired workflows, FX OSINT includes:
BOS / CHOCH labels — Clear structural shifts based on swings.
Premium / Discount zones — 25%, 50%, 75% levels of the daily range, so you know if you are buying discount in an uptrend or selling premium in a downtrend.
Confluence score — A single number summarizing how many conditions line up in the current context.
Instead of replacing your plan, FX OSINT compresses your checklist into the chart:
Structure
Liquidity
Session / Time
Volatility / ADR
Higher‑timeframe alignment
When these agree, the dashboard reflects it. When they don’t, it stays neutral and lets you see the conflict.
How To Use FX OSINT
FX OSINT is not a signal bot. It is an information engine that organizes context so you can apply your own plan.
A typical workflow might look like:
Start on higher timeframes (e.g., H4/D1) to form directional bias from structure, volatility regime, and ADR context.
Move to intraday timeframes (e.g., M15/H1) around your chosen sessions (London and/or New York).
Look for confluence :
HTF / MTF / LTF trends aligned.
Price in discount for longs or premium for shorts.
Recent liquidity sweep into a meaningful OB or FVG.
Confluence score at or above a level you consider significant.
Then refine entries using BOS/CHOCH on lower timeframes according to your own risk and execution rules.
FX OSINT aims to make sure you do not enter a trade without seeing:
Where you are in the day (ADR and sessions).
Where you are in the volatility cycle (regime).
Who currently appears in control (structure and trend).
Which liquidity was just targeted (sweeps and zones).
Design Choices and Scope
FX OSINT was designed around a few clear constraints:
FX‑focused — Logic and filters tuned for FX majors, minors, exotics, and metals. It is intended for FX markets, not for every possible asset class.
Open‑source — The full Pine Script code is available so you can read it, learn from it, and adapt it to your own workflow if needed.
Clear themes — Two main visual styles (e.g., dark institutional “midnight” and a lighter accent variant) with a focus on readability, not visual noise.
Chart‑friendly — Panels use fixed areas, session highlights avoid overlapping, and boxes are capped/pruned so the chart remains usable.
FX OSINT is for only Forex pairs, not anything else!
Hope you enjoyed and remember your Open Source Intelligence Matters 😉!
-officialjackofalltrades Indicator

Smart Money Concepts [Modern Neon V2]This is a visually overhauled version of the popular Smart Money Concepts (SMC) indicator, designed specifically for traders who prefer Dark Mode, High Contrast, and Maximum Visibility.
While the underlying logic preserves the robust structure detection of the original LuxAlgo script, the visual presentation has been completely modernized. The default "dull" colors have been replaced with a vibrant Cyberpunk Neon palette, and text labels have been significantly upscaled to ensure market structure is readable at a glance, even on high-resolution monitors.
🎨 Visual & Style Enhancements:
Neon Palette:
Bullish: Electric Cyan (#00F5FF)
Bearish: Neon Hot Pink (#FF007F)
Neutral/Levels: Bright Gold (#FFD700)
High Visibility Text: Market Structure labels (BOS, CHoCH, HH/LL) have been upgraded from "Tiny" to Normal size. Key Swing Points (Strong High/Low) are set to Large.
Modern "Solid" Blocks: Order Blocks and FVGs feature reduced transparency (60%) for a bolder, solid look that doesn't get washed out on dark backgrounds.
Decluttered: Removed unnecessary "Small" elements and dotted lines to focus on price action.
🛠 Key Features:
Real-Time Structure: Automatic detection of Internal and Swing structure (BOS & CHoCH) with trend coloring.
Order Blocks: Highlights Bullish and Bearish Order Blocks with new mitigation logic.
Fair Value Gaps (FVG): Auto-threshold detection for high-probability gaps.
Premium & Discount Zones: Automatically plots equilibrium zones for better entry targeting.
Multi-Timeframe Levels: Display Daily, Weekly, and Monthly highs/lows.
Trend Dashboard: (If you added the dashboard code) A clean panel displaying the current Internal and Swing trend bias.
CREDITS & LICENSE: This script is a modification of the "Smart Money Concepts " indicator.
Original Author: © LuxAlgo
License: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
creativecommons.org Indicator

Indicator

Volatility-Targeted Momentum Portfolio [BackQuant]Volatility-Targeted Momentum Portfolio
A complete momentum portfolio engine that ranks assets, targets a user-defined volatility, builds long, short, or delta-neutral books, and reports performance with metrics, attribution, Monte Carlo scenarios, allocation pie, and efficiency scatter plots. This description explains the theory and the mechanics so you can configure, validate, and deploy it with intent.
Table of contents
What the script does at a glance
Momentum, what it is, how to know if it is present
Volatility targeting, why and how it is done here
Portfolio construction modes: Long Only, Short Only, Delta Neutral
Regime filter and when the strategy goes to cash
Transaction cost modelling in this script
Backtest metrics and definitions
Performance attribution chart
Monte Carlo simulation
Scatter plot analysis modes
Asset allocation pie chart
Inputs, presets, and deployment checklist
Suggested workflow
1) What the script does at a glance
Pulls a list of up to 15 tickers, computes a simple momentum score on each over a configurable lookback, then volatility-scales their bar-to-bar return stream to a target annualized volatility.
Ranks assets by raw momentum, selects the top 3 and bottom 3, builds positions according to the chosen mode, and gates exposure with a fast regime filter.
Accumulates a portfolio equity curve with risk and performance metrics, optional benchmark buy-and-hold for comparison, and a full alert suite.
Adds visual diagnostics: performance attribution bars, Monte Carlo forward paths, an allocation pie, and scatter plots for risk-return and factor views.
2) Momentum: definition, detection, and validation
Momentum is the tendency of assets that have performed well to continue to perform well, and of underperformers to continue underperforming, over a specific horizon. You operationalize it by selecting a horizon, defining a signal, ranking assets, and trading the leaders versus laggards subject to risk constraints.
Signal choices . Common signals include cumulative return over a lookback window, regression slope on log-price, or normalized rate-of-change. This script uses cumulative return over lookback bars for ranking (variable cr = price/price - 1). It keeps the ranking simple and lets volatility targeting handle risk normalization.
How to know momentum is present .
Leaders and laggards persist across adjacent windows rather than flipping every bar.
Spread between average momentum of leaders and laggards is materially positive in sample.
Cross-sectional dispersion is non-trivial. If everything is flat or highly correlated with no separation, momentum selection will be weak.
Your validation should include a diagnostic that measures whether returns are explained by a momentum regression on the timeseries.
Recommended diagnostic tool . Before running any momentum portfolio, verify that a timeseries exhibits stable directional drift. Use this indicator as a pre-check: It fits a regression to price, exposes slope and goodness-of-fit style context, and helps confirm if there is usable momentum before you force a ranking into a flat regime.
3) Volatility targeting: purpose and implementation here
Purpose . Volatility targeting seeks a more stable risk footprint. High-vol assets get sized down, low-vol assets get sized up, so each contributes more evenly to total risk.
Computation in this script (per asset, rolling):
Return series ret = log(price/price ).
Annualized volatility estimate vol = stdev(ret, lookback) * sqrt(tradingdays).
Leverage multiplier volMult = clamp(targetVol / vol, 0.1, 5.0).
This caps sizing so extremely low-vol assets don’t explode weight and extremely high-vol assets don’t go to zero.
Scaled return stream sr = ret * volMult. This is the per-bar, risk-adjusted building block used in the portfolio combinations.
Interpretation . You are not levering your account on the exchange, you are rescaling the contribution each asset’s daily move has on the modeled equity. In live trading you would reflect this with position sizing or notional exposure.
4) Portfolio construction modes
Cross-sectional ranking . Assets are sorted by cr over the chosen lookback. Top and bottom indices are extracted without ties.
Long Only . Averages the volatility-scaled returns of the top 3 assets: avgRet = mean(sr_top1, sr_top2, sr_top3). Position table shows per-asset leverages and weights proportional to their current volMult.
Short Only . Averages the negative of the volatility-scaled returns of the bottom 3: avgRet = mean(-sr_bot1, -sr_bot2, -sr_bot3). Position table shows short legs.
Delta Neutral . Long the top 3 and short the bottom 3 in equal book sizes. Each side is sized to 50 percent notional internally, with weights within each side proportional to volMult. The return stream mixes the two sides: avgRet = mean(sr_top1,sr_top2,sr_top3, -sr_bot1,-sr_bot2,-sr_bot3).
Notes .
The selection metric is raw momentum, the execution stream is volatility-scaled returns. This separation is deliberate. It avoids letting volatility dominate ranking while still enforcing risk parity at the return contribution stage.
If everything rallies together and dispersion collapses, Long Only may behave like a single beta. Delta Neutral is designed to extract cross-sectional momentum with low net beta.
5) Regime filter
A fast EMA(12) vs EMA(21) filter gates exposure.
Long Only active when EMA12 > EMA21. Otherwise the book is set to cash.
Short Only active when EMA12 < EMA21. Otherwise cash.
Delta Neutral is always active.
This prevents taking long momentum entries during obvious local downtrends and vice versa for shorts. When the filter is false, equity is held flat for that bar.
6) Transaction cost modelling
There are two cost touchpoints in the script.
Per-bar drag . When the regime filter is active, the per-bar return is reduced by fee_rate * avgRet inside netRet = avgRet - (fee_rate * avgRet). This models proportional friction relative to traded impact on that bar.
Turnover-linked fee . The script tracks changes in membership of the top and bottom baskets (top1..top3, bot1..bot3). The intent is to charge fees when composition changes. The template counts changes and scales a fee by change count divided by 6 for the six slots.
Use case: increase fee_rate to reflect taker fees and slippage if you rebalance every bar or trade illiquid assets. Reduce it if you rebalance less often or use maker orders.
Practical advice .
If you rebalance daily, start with 5–20 bps round-trip per switch on liquid futures and adjust per venue.
For crypto perp microcaps, stress higher cost assumptions and add slippage buffers.
If you only rotate on lookback boundaries or at signals, use alert-driven rebalances and lower per-bar drag.
7) Backtest metrics and definitions
The script computes a standard set of portfolio statistics once the start date is reached.
Net Profit percent over the full test.
Max Drawdown percent, tracked from running peaks.
Annualized Mean and Stdev using the chosen trading day count.
Variance is the square of annualized stdev.
Sharpe uses daily mean adjusted by risk-free rate and annualized.
Sortino uses downside stdev only.
Omega ratio of sum of gains to sum of losses.
Gain-to-Pain total gains divided by total losses absolute.
CAGR compounded annual growth from start date to now.
Alpha, Beta versus a user-selected benchmark. Beta from covariance of daily returns, Alpha from CAPM.
Skewness of daily returns.
VaR 95 linear-interpolated 5th percentile of daily returns.
CVaR average of the worst 5 percent of daily returns.
Benchmark Buy-and-Hold equity path for comparison.
8) Performance attribution
Cumulative contribution per asset, adjusted for whether it was held long or short and for its volatility multiplier, aggregated across the backtest. You can filter to winners only or show both sides. The panel is sorted by contribution and includes percent labels.
9) Monte Carlo simulation
The panel draws forward equity paths from either a Normal model parameterized by recent mean and stdev, or non-parametric bootstrap of recent daily returns. You control the sample length, number of simulations, forecast horizon, visibility of individual paths, confidence bands, and a reproducible seed.
Normal uses Box-Muller with your seed. Good for quick, smooth envelopes.
Bootstrap resamples realized returns, preserving fat tails and volatility clustering better than a Gaussian assumption.
Bands show 10th, 25th, 75th, 90th percentiles and the path mean.
10) Scatter plot analysis
Four point-cloud modes, each plotting all assets and a star for the current portfolio position, with quadrant guides and labels.
Risk-Return Efficiency . X is risk proxy from leverage, Y is expected return from annualized momentum. The star shows the current book’s composite.
Momentum vs Volatility . Visualizes whether leaders are also high vol, a cue for turnover and cost expectations.
Beta vs Alpha . X is a beta proxy, Y is risk-adjusted excess return proxy. Useful to see if leaders are just beta.
Leverage vs Momentum . X is volMult, Y is momentum. Shows how volatility targeting is redistributing risk.
11) Asset allocation pie chart
Builds a wheel of current allocations.
Long Only, weights are proportional to each long asset’s current volMult and sum to 100 percent.
Short Only, weights show the short book as positive slices that sum to 100 percent.
Delta Neutral, 50 percent long and 50 percent short books, each side leverage-proportional.
Labels can show asset, percent, and current leverage.
12) Inputs and quick presets
Core
Portfolio Strategy . Long Only, Short Only, Delta Neutral.
Initial Capital . For equity scaling in the panel.
Trading Days/Year . 252 for stocks, 365 for crypto.
Target Volatility . Annualized, drives volMult.
Transaction Fees . Per-bar drag and composition change penalty, see the modelling notes above.
Momentum Lookback . Ranking horizon. Shorter is more reactive, longer is steadier.
Start Date . Ensure every symbol has data back to this date to avoid bias.
Benchmark . Used for alpha, beta, and B&H line.
Diagnostics
Metrics, Equity, B&H, Curve labels, Daily return line, Rolling drawdown fill.
Attribution panel. Toggle winners only to focus on what matters.
Monte Carlo mode with Normal or Bootstrap and confidence bands.
Scatter plot type and styling, labels, and portfolio star.
Pie chart and labels for current allocation.
Presets
Crypto Daily, Long Only . Lookback 25, Target Vol 50 percent, Fees 10 bps, Regime filter on, Metrics and Drawdown on. Monte Carlo Bootstrap with Recent 200 bars for bands.
Crypto Daily, Delta Neutral . Lookback 25, Target Vol 50 percent, Fees 15–25 bps, Regime filter always active for this mode. Use Scatter Risk-Return to monitor efficiency and keep the star near upper left quadrants without drifting rightward.
Equities Daily, Long Only . Lookback 60–120, Target Vol 15–20 percent, Fees 5–10 bps, Regime filter on. Use Benchmark SPX and watch Alpha and Beta to keep the book from becoming index beta.
13) Suggested workflow
Universe sanity check . Pick liquid tickers with stable data. Thin assets distort vol estimates and fees.
Check momentum existence . Run on your timeframe. If slope and fit are weak, widen lookback or avoid that asset or timeframe.
Set risk budget . Choose a target volatility that matches your drawdown tolerance. Higher target increases turnover and cost sensitivity.
Pick mode . Long Only for bull regimes, Short Only for sustained downtrends, Delta Neutral for cross-sectional harvesting when index direction is unclear.
Tune lookback . If leaders rotate too often, lengthen it. If entries lag, shorten it.
Validate cost assumptions . Increase fee_rate and stress Monte Carlo. If the edge vanishes with modest friction, refine selection or lengthen rebalance cadence.
Run attribution . Confirm the strategy’s winners align with intuition and not one unstable outlier.
Use alerts . Enable position change, drawdown, volatility breach, regime, momentum shift, and crash alerts to supervise live runs.
Important implementation details mapped to code
Momentum measure . cr = price / price - 1 per symbol for ranking. Simplicity helps avoid overfitting.
Volatility targeting . vol = stdev(log returns, lookback) * sqrt(tradingdays), volMult = clamp(targetVol / vol, 0.1, 5), sr = ret * volMult.
Selection . Extract indices for top1..top3 and bot1..bot3. The arrays rets, scRets, lev_vals, and ticks_arr track momentum, scaled returns, leverage multipliers, and display tickers respectively.
Regime filter . EMA12 vs EMA21 switch determines if the strategy takes risk for Long or Short modes. Delta Neutral ignores the gate.
Equity update . Equity multiplies by 1 + netRet only when the regime was active in the prior bar. Buy-and-hold benchmark is computed separately for comparison.
Tables . Position tables show current top or bottom assets with leverage and weights. Metric table prints all risk and performance figures.
Visualization panels . Attribution, Monte Carlo, scatter, and pie use the last bars to draw overlays that update as the backtest proceeds.
Final notes
Momentum is a portfolio effect. The edge comes from cross-sectional dispersion, adequate risk normalization, and disciplined turnover control, not from a single best asset call.
Volatility targeting stabilizes path but does not fix selection. Use the momentum regression link above to confirm structure exists before you size into it.
Always test higher lag costs and slippage, then recheck metrics, attribution, and Monte Carlo envelopes. If the edge persists under stress, you have something robust.
Indicator

Smart Structure Breaks & Order BlocksOverview (What it does)
The indicator “Smart Structure Breaks & Order Blocks” detects market structure using swing highs and lows, identifies Break of Structure (BOS) events, and automatically draws order blocks (OBs) from the origin candle. These zones extend to the right and change color/outline when mitigated or invalidated. By formalizing and automating part of discretionary analysis, it provides consistent zone recognition.
Main Components
Swing Detection: ta.pivothigh/ta.pivotlow identify confirmed swing points.
BOS Detection: Determines if the recent swing high/low is broken by close (strict mode) or crossover.
OB Creation: After a BOS, the opposite candle (bearish for bullish BOS, bullish for bearish BOS) is used to generate an order block zone.
Zone Management: Limits the number of zones, extends them to the right, and tracks tagged (mitigated) or invalidated states.
Input Parameters
Left/Right Pivot (default 6/6): Number of bars required on each side to confirm a swing. Higher values = smoother swings.
Max Zones (default 4): Maximum zones stored per direction (bull/bear). Oldest zones are overwritten.
Zone Confirmation Lookback (default 3): Ensures OB origin candle validity by checking recent highs/lows.
Show Swing Points (default ON): Displays triangles on swing highs/lows.
Require close for BOS? (default ON): Strict BOS (close required) vs loose BOS (line crossover).
Use candle body for zones (default OFF): Zones drawn from candle body (ON) or wick (OFF).
Signal Definition & Logic
Swing Updates: Latest confirmed pivots update lastHighLevel / lastLowLevel.
BOS (Break of Structure):
Bullish – close breaks last swing high.
Bearish – close breaks last swing low.
Only one valid BOS per swing (avoids duplicates).
OB Detection:
Bullish BOS → previous bearish candle with lowest low forms the OB.
Bearish BOS → previous bullish candle with highest high forms the OB.
Zones: Bull = green, Bear = red, semi-transparent, extended to the right.
Zone States:
Mitigated: Price touches the zone → border highlighted.
Invalidated:
Bull zone → close below → turns red.
Bear zone → close above → turns green.
Chart Appearance
Swing High: red triangle above bar
Swing Low: green triangle below bar
Bull OB: green zone (border highlighted on touch)
Bear OB: red zone (border highlighted on touch)
Invalid Zones: Bull zones turn reddish, Bear zones turn greenish
Practical Use (Trading Assistance)
Trend Following Entries: Buy pullbacks into green OBs in uptrends, sell rallies into red OBs in downtrends.
Focus on First Touch: First mitigation after BOS often has higher reaction probability.
Confluence: Combine with higher timeframe trend, volume, session levels, key price levels (previous highs/lows, VWAP, etc.).
Stops/Targets:
Bull – stop below zone, partial take profit at swing high or resistance.
Bear – stop above zone, partial take profit at swing low or support.
Parameter Tuning (per market/timeframe)
Pivot (6/6 → 4/4/8/8): Lower for scalping (3–5), medium for day trading (5–8), higher for swing trading (8–14). Increase to reduce noise.
Strict Break: ON to reduce false breaks in ranging markets; OFF for earlier signals.
Body Zones: ON for assets with long wicks, OFF for cleaner OBs in liquid instruments.
Zone Confirmation (default 3): Increase for stricter OB origin, fewer zones.
Max Zones (default 4 → 6–10): Increase for higher volatility, decrease to avoid clutter.
Strengths
Standardizes BOS and OB detection that is usually subjective.
Tracks mitigation and invalidation automatically.
Adaptable: allows body/wick zone switching for different instruments.
Limitations
Pivot-based: Signals appear only after pivots confirm (slight lag).
Zones reflect past balance: Can fail after new events (news, earnings, macro data).
Range-heavy markets: More false BOS; consider stricter settings.
Backtesting: This script is for drawing/visual aid; trading rules must be defined separately.
Workflow Example
Identify higher timeframe trend (4H/Daily).
On lower TF (15–60m), wait for BOS and new OB.
Enter on first mitigation with confirmation candle.
Stop beyond zone; targets based on R multiples and swing points.
FAQ
Q: Why are zones invalidated quickly?
A: Flow reversal after BOS. Adjust pivots higher, enable Strict mode, or switch to Body zones to reduce noise.
Q: What does “tagged” mean?
A: Price touched the zone once = mitigated. Implies some orders in that zone may have been filled.
Q: Body or Wick zones?
A: Wick zones are fine in clean markets. For volatile pairs with long wicks, body zones provide more realistic areas.
Customization Tips (Code perspective)
Zone storage: Currently ring buffer ((idx+1) % zoneLimit). Could prioritize keeping unmitigated zones.
Automated testing: Add strategy.entry/exit for rule-based backtests.
Multi-timeframe: Use request.security() for higher timeframe swings/BOS.
Visualization: Add labels for BOS bars, tag zones with IDs, count touches.
Summary
This indicator formalizes the cycle Swing → BOS → OB creation → Mitigation/Invalidation, providing consistent structure analysis and zone tracking. By tuning sensitivity and strictness, and combining with higher timeframe context, it enhances pullback/continuation trading setups. Always combine with proper risk management. Indicator

TrendSync Pro (SMC)📊 TrendSync Pro (SMC) – Advanced Trend-Following Strategy with HTF Alignment
Created by Shubham Singh
🔍 Strategy Overview
TrendSync Pro (SMC) is a precision-based smart trend-following strategy inspired by Smart Money Concepts (SMC). It combines: Real-time pivot-based trendline detection
Higher Time Frame (HTF) filtering to align trades with dominant trend
Risk management via adjustable Stop Loss (SL) and Take Profit (TP)
Directional control — trade only bullish, bearish, or both setups
Realistic backtesting using commissions and slippage
Pre-optimized profiles for scalpers, intraday, swing, and long-term traders
🧠 How It Works:
🔧 Strategy Settings Image:
beeimg.com
The strategy dynamically identifies trend direction by using swing high/low pivots. When a new pivot forms: It draws a trendline from the last significant pivot
Detects whether the trend is up (based on pivot lows) or down (based on pivot highs)
Waits for price to break above/below the trendline
Confirms with HTF price direction (HTF close > previous HTF close = bullish)
Only then it triggers a long or short trade
It exits either at TP, SL, or a manual trendline break
🛠️ Adjustable Parameters:
Trend Period: Length for pivot detection (affects sensitivity of trendlines)
HTF Timeframe: Aligns lower timeframe entries with higher timeframe direction
SL% and TP%: Customize your risk-reward profile
Commission & Slippage: Make backtests more realistic
Trade Direction: Choose to trade: Long only, Short only, or Both
🎛️ Trade Direction Control:
In settings, you can choose: Bullish Only: Executes only long entries
Bearish Only: Executes only short entries
Both: Executes both long and short entries when conditions are met
This allows you to align trades with your own market bias or external analysis.
📈 Entry Logic: Long Entry:
• Price crosses above trendline
• HTF is bullish (HTF close > previous close)
• Latest pivot is a low (trend is considered up)
Short Entry:
• Price crosses below trendline
• HTF is bearish (HTF close < previous close)
• Latest pivot is a high (trend is considered down)
📉 Exit Logic: Hit Take Profit or Stop Loss
Manual trendline invalidation: If price crosses opposite of the trend direction
⏰ Best Timeframes & Recommended Settings:
Scalping (1m to 5m):
HTF = 15m | Trend Period = 7
SL = 0.5% | TP = 1% to 2%
Intraday (15m to 30m):
HTF = 1H | Trend Period = 10–14
SL = 0.75% | TP = 2% to 3%
6 Hour Trading (30m to 1H):
HTF = 4H | Trend Period = 20
SL = 1% | TP = 4% to 6%
Swing Trading (4H to 1D):
HTF = 1D | Trend Period = 35
SL = 2% | TP = 8% to 12%
Long-Term Investing (1D+):
HTF = 1W | Trend Period = 50
SL = 3% | TP = 15%+
Note: These are recommended base settings. Adjust based on volatility, asset class, or personal trading style.
📸 Testing Note:
beeimg.com
PulseWire limits test length to 20k bars (~40 trades on smaller timeframes). To show long-term results: Test on higher timeframes (e.g., 1H, 4H, 1D)
Share images of backtest result in description
Host longer test result screenshots on Imgur or any public drive
📍 Asset Behavior Insight:
This strategy works on multiple assets, including BTC, ETH, etc.
Performance varies by trend strength:
Sometimes BTC performs better than ETH
Other times ETH gives better results
That’s normal as both assets follow different volatility and trend behavior
It’s a trend-following setup. Longer and clearer the trend → better the results.
✅ Best Practices: Avoid ranging markets
Use proper SL/TP for each timeframe
Use directional filter if you already have a directional bias
Always forward test before going live
⚠️ Trading Disclaimer:
This script is for educational and backtesting purposes only. Trading involves risk. Always use risk management and never invest more than you can afford to lose. Strategy

Indicator
