Auric Regime Classifier [JOAT]Auric Regime Classifier
Introduction
Auric Regime Classifier (ARC) is an open-source, multi-factor market regime detection engine that classifies every confirmed bar into one of five distinct market states: Strong Bull, Weak Bull, Ranging, Weak Bear, or Strong Bear — with a special Compression override that fires when volatility is contracting. The engine uses five independent data sources — adaptive ATR volatility ratio, Bollinger Band squeeze detection, SMEMA trend slope, ADX directional index, and RSI momentum bias — fused through a weighted scoring system into a single net score that drives the regime classification.
The problem ARC solves is that most traders apply a fixed strategy regardless of whether the market is trending strongly, drifting weakly, compressing before a breakout, or chopping without direction. Each of those conditions demands a completely different approach. Applying a trend-following system in a ranging market produces losses. Trading with tight stops in a compression phase produces whipsaws. ARC gives you a clear, real-time label for the current market phase so you can match your approach to the conditions rather than fighting them.
Core Concepts
1. SMEMA Adaptive Baseline
The indicator uses SMEMA (Simple Moving Average of Exponential Moving Average) as its core trend baseline — a proprietary double-smoothing construct used throughout the JackOfAllTrades indicator suite. SMEMA applies a standard EMA first to capture responsiveness, then a SMA over the same period to suppress noise. The result is a baseline that reacts faster than a raw SMA but is smoother than a raw EMA:
smema(float src, int len) =>
ta.sma(ta.ema(src, len), len)
Two SMEMA lines run in parallel: a slow line over the full period (default 20) and a fast line at half the period. Their slope comparison over three bars determines the trend direction score. When the slow SMEMA slopes upward for three consecutive bars, two bull points are awarded. When it slopes downward, two bear points are awarded.
2. Adaptive ATR Volatility Ratio
ATR over the input period (default 14) is compared against a long-run SMA of ATR (default 50 bars) to produce a volatility expansion/contraction ratio:
float volRatio = safeDiv(atrRaw, atrBase, 1.0)
A ratio above 1.1 in the direction of the existing trend awards a bonus point — recognizing that trend moves are more reliable when accompanied by above-average volatility. This prevents the engine from scoring weak, low-volume drifts as strongly as genuine impulsive moves.
3. Bollinger Band Squeeze Detection
The indicator measures Bollinger Band bandwidth (upper minus lower) and compares it against its own 100-bar SMA. When bandwidth falls below the configurable threshold fraction (default 0.75) of its smoothed average, the market is classified as Compressing. Compression overrides all other regime classifications — a compressing market has no valid directional edge regardless of what the other signals say:
bool isSqz = bbBW < bbBWAvg * sqzPct
A Squeeze Release signal fires when compression ends (isSqz transitions from true to false), marking the potential start of an expansion move.
4. ADX Directional Index
ADX (Average Directional Index) and the +DI/-DI directional lines are calculated using Pine Script v6's built-in ta.dmi() function. ADX above the threshold (default 25) confirms that the market is in a genuine trending regime rather than a sideways range. The directional bias of +DI vs -DI adds two bull or bear points to the regime score:
= ta.dmi(adxLen, adxLen)
bool isBullDir = diPlus > diMinus
bool isBearDir = diMinus > diPlus
5. Regime Scoring Engine
All five components feed a dual-sided scoring system. Bull and bear points are accumulated independently, and the net score (bull minus bear, range -6 to +6) determines the regime code:
int bullPts = (trendUp ? 2 : 0) + (isBullDir ? 2 : 0) +
(rsiBull ? 1 : 0) + ((volRatio > 1.1 and trendUp) ? 1 : 0)
int netScore = bullPts - bearPts
int regCode = isSqz ? 0 : netScore >= 4 ? 2 : netScore >= 1 ? 1 :
netScore <= -4 ? -2 : netScore <= -1 ? -1 : 0
Strong Bull requires a net score of +4 or higher (all four components aligned). Weak Bull requires +1 to +3. Ranging sits at 0. The mirror applies for bearish regimes.
6. Trend Strength Score (0-100)
Beyond the categorical regime label, ARC produces a continuous trend strength score that measures conviction within the current regime. It combines a distance score (how far price is from the SMEMA baseline in ATR units, capped at 50 points) with a momentum score (RSI deviation from 50 in the trend direction, capped at 50 points). A score of 70+ indicates a strong, high-conviction regime. Below 40 indicates a weak or transitional state.
Features
Five-State Regime Classification: Every bar labeled Strong Bull, Weak Bull, Ranging, Weak Bear, or Strong Bear with a Compression override — no ambiguity
SMEMA Ribbon: Fast and slow SMEMA lines with a gradient fill between them, colored by the current regime state for instant visual context
Regime Background Tint: Subtle, semi-transparent background coloring that shifts with the regime — green family for bull states, red family for bear, yellow for compression
Candle Coloring: Bar colors inherit the regime color at reduced opacity, giving every candle immediate regime context without obscuring price action
Squeeze Markers: Circle markers on the SMEMA baseline during compression, with a diamond signal at the moment of squeeze release
Trend Strength Score: A 0-100 numeric score with a Strong/Moderate/Weak label updated each bar, shown in the dashboard
Regime Change Alerts: Alert fires on every confirmed regime state transition with either plain text or structured JSON for webhook delivery
12-Row Dashboard (Top Right): Displays current regime, trend strength score, ADX value and trending/ranging status, +DI/-DI directional reading, volatility ratio, Bollinger Band state, RSI, timeframe, and version
Watermark: JackOfAllTrades signature rendered at chart center-bottom
Input Parameters
Core Engine:
ATR Length: Period for raw ATR calculation (default: 14)
ATR Smoothing Period: Baseline ATR lookback for volatility ratio (default: 50)
Directional Index:
ADX / DI Length: Period for +DI, -DI, and ADX (default: 14)
Trend Threshold: ADX level above which the market is considered trending (default: 25)
Volatility Band:
BB Length: Bollinger Band period (default: 20)
BB Multiplier: Standard deviation multiplier (default: 2.0)
Squeeze Threshold: Bandwidth fraction of its 100-bar SMA below which compression is declared (default: 0.75)
Trend Engine:
SMEMA Length: Period for the double-smoothed baseline (default: 20)
RSI Length: Momentum confirmation period (default: 14)
Visuals / Dashboard / Alerts:
Theme: Auto, Dark, or Light — auto-detects chart background
Regime Background Tint: Toggle the subtle background color
Show SMEMA Baseline: Toggle the ribbon plots
Show Squeeze Markers: Toggle the circle and diamond markers
Show Dashboard: Toggle the 12-row information panel
Show Watermark: Toggle the JackOfAllTrades signature
Webhook JSON Format: Switch alert messages between plain text and JSON
Color Palette: All six regime colors are individually customizable
How to Use This Indicator
Step 1: Read the Regime
The dashboard regime field and the background tint tell you exactly where the market stands. This single label is the most actionable piece of information — it drives which strategy is appropriate.
Step 2: Match Your Approach to the Regime
Strong Bull / Strong Bear: All four scoring components are aligned. High-conviction directional trades, trend-following entries on pullbacks to the SMEMA ribbon
Weak Bull / Weak Bear: Only one or two components agree. Lighter position sizing, wider stops, prepare for a possible regime shift
Ranging: Net score near zero — avoid directional trades, consider mean-reversion or wait for breakout
Compression: All directional analysis is suspended. Reduce exposure, prepare for a breakout in either direction, and watch the squeeze release signal for timing
Step 3: Use Trend Strength for Conviction
Within any directional regime, the strength score tells you how far into that regime the market has moved. A Strong Bull reading with a strength score of 85 is a very different trade environment from one with a strength score of 42. Use the score to scale position size or filter lower-conviction entries.
Step 4: Set Alerts on Regime Transitions
The regime-change alert fires the moment a new regime is confirmed on bar close. Enable the Strong Bull and Strong Bear alertconditions specifically to catch the high-conviction regime entrances.
Indicator Limitations
All five components are backward-looking. The regime label describes what has happened over the lookback windows — not what will happen. A Strong Bull classification can reverse on the very next bar
The warmup period (equal to the longest lookback, at least 50 bars) means the indicator produces no signals on the first several bars of any chart, including after switching timeframes
Compression detection uses a 100-bar SMA of bandwidth, which is a long-run reference. On very short or illiquid charts with few bars, the bandwidth average may not be reliable
The five-state classification uses fixed score thresholds (+4 for Strong, +1 for Weak). These thresholds are not auto-calibrated to the instrument. In range-bound markets where ADX rarely exceeds 20, the Strong Bull/Bear states may rarely appear
RSI and ADX both work with default periods. No single set of periods is optimal across all assets and timeframes. Users may need to adjust periods when applying to highly volatile assets or longer timeframes
Originality Statement
ARC is original in its synthesis approach and the use of SMEMA as the core trend baseline. This indicator is published because:
The SMEMA construct (SMA of EMA) is a proprietary double-smoothing formula used consistently across the JackOfAllTrades suite — it provides a smoother baseline than raw EMA while retaining more responsiveness than raw SMA, and it is not a standard available in typical indicator libraries
The dual-sided bull/bear point system scores each directional component independently before computing a net score. This is distinct from composite oscillators that blend components into a single signed value — the dual-side approach preserves information about how many bear components are active even when the net score is positive
The Compression override takes precedence over all directional scores, explicitly suspending regime analysis during volatility contractions. Most regime indicators simply produce lower directional readings in compression without explicitly declaring the compression state
The trend strength score combines an ATR-normalized price distance with an RSI momentum deviation to produce a conviction metric that is distinct from the categorical regime label
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Market regime classifications are based entirely on historical data and past behavior. A market classified as Strong Bull can and will reverse at any time. The Compression state does not guarantee a subsequent breakout, and the direction of any eventual breakout cannot be predicted from compression alone. Always apply proper risk management. The author is not responsible for any trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Indicator

JOAT Institutional Convergence [JOAT]JOAT Institutional Convergence
Introduction
The JOAT Institutional Convergence strategy is a systematic, rules-based trading framework that unifies the logic from all five JOAT indicators into a single coherent entry and exit engine. Each indicator contributes a specific filter layer: the Volumetric Structure Engine provides directional market structure bias, the Adaptive Spectral Bands Hann ribbon provides the primary entry trigger, the Institutional Session Profiler contributes optional session timing, the Imbalance Zone Classifier contributes optional FVG proximity filtering, and the Fractal Liquidity Map contributes fractal-anchored stop placement. No layer is redundant — each addresses a different dimension of trade selection.
The core problem this solves: most PulseWire strategies use a single indicator as both entry and exit signal, producing over-fitting to one methodology. This strategy uses five independent measurement systems simultaneously. An entry only fires when multiple independent conditions converge — structure, momentum, regime, and optionally session and imbalance context. The result is a strategy that takes trades for quantifiable, multi-factor reasons, not because a single line crossed.
Core Concepts
1. Entry Logic — Hann Ribbon Crossover Primary
The primary entry trigger is the Hann FIR ribbon crossover — when the fastest layer (h0) crosses above the second layer (h1), a potential long entry is flagged. This is the earliest mathematically-grounded signal that momentum is shifting:
bool cross_bull = ta.crossover(h0, h1)
bool cross_bear = ta.crossunder(h0, h1)
bool long_sig = (cross_bull or (bos_bull_sig and h0 > h2)) and
struct_trend >= 0 and
adx >= i_adx_min and adx <= i_adx_max and
sess_ok and fvg_ok
The crossover fires on the bar where momentum begins to shift — not after full ribbon alignment is confirmed. This is intentional: waiting for full alignment reduces trade count significantly and enters late. The structural trend filter (struct_trend >= 0) ensures the crossover is not taken against a confirmed downtrend.
2. Structure Filter — VSE Swing Classification
Market structure is classified using the same non-repainting swing detection as the Volumetric Structure Engine. Higher highs and higher lows (struct_trend = 1) are bullish; lower highs and lower lows (struct_trend = -1) are bearish; a mixed state (struct_trend = 0) is neutral. The strategy allows longs in bullish or neutral structure (>= 0) and shorts in bearish or neutral structure (<= 0):
bool new_sh = high == ta.highest(high, i_sw_len) and high < ta.highest(high, i_sw_len)
bool new_sl = low == ta.lowest (low, i_sw_len) and low > ta.lowest (low, i_sw_len)
This prevents the ribbon crossover from triggering entries during confirmed counter-trend structure without requiring perfect alignment.
3. Regime Filter — ADX Gating
ADX gates entries in both directions. Below the minimum ADX, the market has no directional momentum — ribbon crossovers in flat, dead markets produce noise. Above the maximum ADX, the market is over-extended and new entries chase moves that are already mature:
float adx_val = ta.rma(math.abs(dmi_p - dmi_m) / (dmi_p + dmi_m + 0.001) * 100, i_adx_len)
bool adx_ok = adx_val >= i_adx_min and adx_val <= i_adx_max
Default range: 8–60. This wide range accommodates crypto and forex markets that trend aggressively for extended periods (ADX 40–60) as well as early-stage trends (ADX 8–15).
4. Position Sizing — Percentage Risk per Trade
Position sizing is calculated dynamically based on the user's equity risk percentage and the distance to the stop-loss level:
float sl_dist = math.abs(close - sl_price)
float qty = sl_dist > 0 ? (strategy.equity * i_risk_pct / 100.0) / sl_dist : 1.0
strategy.entry("Long", strategy.long, qty = qty)
This ensures every trade risks the same percentage of equity regardless of market volatility — a wider stop reduces size, a tighter stop increases size. The default is 1% risk per trade.
5. Stop-Loss Placement — Fractal Extreme + ATR Buffer
The stop-loss is placed beyond the most recent 20-bar fractal extreme in the direction of the trade, plus one ATR buffer. This anchors the stop to genuine structural pivots rather than arbitrary fixed-pip distances:
float sl_long = ta.lowest(low, 20) - atr_14 * i_sl_atr_buf
float sl_short = ta.highest(high, 20) + atr_14 * i_sl_atr_buf
Features
Five-Layer Entry Filter: Structure + Ribbon + Regime + Session (optional) + FVG proximity (optional)
Hann FIR Ribbon Crossover: Primary entry trigger — earliest mathematically-valid momentum signal
BOS-Armed Entries: Break of Structure signals additionally arm entries for up to 30 bars
Percentage Risk Sizing: Dynamic position size calculated from equity risk % and SL distance
Fractal-Anchored Stop Loss: Stop at 20-bar fractal extreme + ATR buffer
Fixed R:R Take Profit: Configurable reward-to-risk ratio for TP placement
Trailing Stop: Built-in trail_offset activates immediately from entry, protecting profits
Session Filter (optional): Trade only during Asia, London, and/or New York sessions. Off by default for 24h markets.
FVG Proximity Filter (optional): Require entry to be near an active imbalance zone. Off by default for maximum trade count.
Performance Dashboard: Displays trade count, win rate, average R, last trade result, and active filter states
Realistic Simulation: 2-tick slippage + 0.05% commission built into all backtests
Input Parameters
Structure (VSE):
Swing Length: Lookback for swing high/low detection (default: 20)
Ribbon Filter (ASB):
Hann Base Length: Core FIR filter period (default: 20)
Ribbon Spacing: Gap between ribbon layers (default: 3)
Regime Filter:
ADX Length: Period for ADX calculation (default: 14)
Min ADX for Entry: Minimum ADX to allow entries (default: 8). Lower = more trades. Raise to filter ranging markets.
Max ADX for Entry: Maximum ADX to allow entries (default: 60). Lower = skip over-extended moves.
Session Filter (ISP):
Enable Session Filter: Gate entries by session time (default: off — recommended for crypto and indices)
Trade Asia / London / NY: Toggle per-session entry permission
Imbalance Filter (IZC):
Require Near FVG Zone: Entry must be within ATR proximity of an active imbalance (default: off)
FVG Proximity (x ATR): Distance threshold for FVG proximity check (default: 1.5)
Risk Management:
Risk Per Trade (%): Equity percentage risked per trade (default: 1.0)
Reward:Risk Ratio: Take profit as a multiple of the SL distance (default: 2.0)
SL ATR Buffer: ATR multiple added beyond fractal extreme for stop (default: 0.5)
Trail Offset (ATR): Trail stop distance from price (default: 1.5)
BOS Armed Bars: How many bars a BOS signal remains active for entry (default: 30)
How to Use This Strategy
Step 1: Select Your Market and Timeframe
Start on the 1-hour chart. The strategy is calibrated for 1H on crypto, forex majors, and equity indices with default settings. Shorter timeframes (15m) can increase trade count further but require tighter ADX filtering to avoid noise.
Step 2: Run the Backtest with Defaults
With all optional filters off (session and FVG disabled), the strategy trades every valid ribbon crossover that passes structure and regime. This produces the highest trade count. Review the equity curve for smoothness — you want consistent growth, not reliance on a few large winners.
Step 3: Add Filters Progressively
Enable the session filter to restrict to London and NY on forex pairs. Enable the FVG proximity filter to require imbalance context on entries. Each filter reduces trade count but should improve win rate if the underlying edge is present on your instrument.
Step 4: Interpret the Dashboard
The dashboard shows the current state of every filter layer — which ones are active and whether each condition is currently met. This is the diagnostic view: if no trades are firing, the dashboard tells you exactly which filter is blocking entries.
Originality Statement
This strategy is original as a unified multi-indicator convergence framework where each component is an independently published, standalone indicator. Its publication is justified because:
The five-layer filter architecture uses genuinely independent measurement dimensions — market structure (price action), momentum (FIR frequency domain), trend strength (ADX), session timing, and price inefficiency (FVG) — reducing the risk of correlated signals that appear to confirm each other but measure the same thing
Hann FIR crossover as the primary trigger provides a mathematically grounded entry timing signal with lower lag than EMA crossovers of equivalent period — a meaningful improvement to the timing of systematic entries
Dynamic position sizing calculated from SL distance anchored to fractal extremes creates risk-normalized sizing that adapts to each trade's structural context rather than using fixed lot sizes
The modular filter design allows each filter to be toggled independently, making the strategy adaptable to different asset classes (crypto, forex, equities) without code changes — session filter off for 24h markets, FVG filter off for maximum trade generation
Limitations
Backtesting results depend critically on the instrument, timeframe, and parameter settings. Past performance in strategy tester does not guarantee future live trading results.
The 2-tick slippage and 0.05% commission defaults are approximations. Actual execution costs vary by broker, instrument, and session liquidity. High-slippage instruments (illiquid crypto, micro-cap) will perform worse than the backtest indicates.
The FVG proximity filter references FVG logic computed internally. It does not import live data from the separately published Imbalance Zone Classifier indicator — it recomputes the same logic in isolation.
The strategy does not incorporate news filters or earnings event exclusions. Entering positions around major economic releases (FOMC, NFP) during high-volatility events will produce results inconsistent with normal market behavior.
Trailing stop and take profit interact. If price reaches the TP level before the trail stop triggers, the TP closes the trade. Users should verify via strategy properties which exit is dominant in their use case.
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Backtested strategy results are hypothetical and do not account for the psychological challenges of live trading. Past results do not guarantee future performance. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by jackofalltrades
Strategy

Quant Edge Ribbon PRO🟦 Quant Edge Ribbon PRO is a multi-kernel divergence ribbon indicator built on the KernelLens Nadaraya–Watson regression library (a_jabbaroff/KernelLens/1). A primary kernel and eleven longer-bandwidth kernels form a dual-ribbon visualization driven by kernel regression mathematics, an integer trend score in , a theme-aware rendering pipeline, four user-configurable reference levels, and a PRO dashboard. All twelve kernels route through the unified library dispatcher, so the user may select any of the eight kernel families and any of the three filter modes from a single configuration panel.
🟦 HOW IT WORKS
Quant Edge Ribbon PRO calls the KernelLens library's unified dispatcher (`kl.estimate`) twelve times per bar — once for the primary kernel and once for each of the eleven outer kernels:
```
primary = kl.estimate(type, src, ℓ, α, period, phase, filter)
long00 = kl.estimate(type, src, ℓ + 1·s, α, period, phase, filter)
long01 = kl.estimate(type, src, ℓ + 2·s, α, period, phase, filter)
...
long10 = kl.estimate(type, src, ℓ + 11·s, α, period, phase, filter)
```
where ℓ is the Primary Bandwidth and s is the Bandwidth Step. All twelve kernels share the same kernel type, filter, shape α, period, and phase — only the bandwidth differs. This guarantees the ribbon behaves as a coherent spectrum of kernel scales rather than a mixture of unrelated signals.
The library handles all weighted-sum computation, loop-depth selection, NA-safe iteration, division-by-zero guards, and input validation internally. Quant Edge Ribbon PRO does not reimplement any kernel math — every bug fix or optimization in the library automatically propagates to this indicator.
🟦 KERNEL LIBRARY INTEGRATION
Quant Edge Ribbon PRO imports the published KernelLens library and uses the following export:
| Library Export | Used For |
|---|---|
| `kl.estimate()` | Unified dispatcher — routes to the correct kernel based on the user's Kernel Type dropdown. Called twelve times per bar, once for the primary kernel and once for each of the eleven outer kernels. |
Every regression computation — kernel weight evaluation, NA-safe summation, bandwidth-aware loop termination — is delegated to the library. The indicator itself contains zero kernel math; it only orchestrates twelve library calls and aggregates their outputs into the trend score.
🟦 THE TWELVE-KERNEL RIBBON ARCHITECTURE
**Primary kernel (the shortest, the anchor)** — A single kernel at bandwidth ℓ that serves two roles: (1) it is the reference baseline for the trend score calculation, and (2) it is plotted as a dedicated highlighted anchor line when the "Highlight Primary Kernel" toggle is ON.
**Eleven outer kernels (progressively wider)** — Kernels at bandwidths ℓ+1·s, ℓ+2·s, …, ℓ+11·s, where s is the Bandwidth Step (default: 1). Each outer kernel is plotted as a line on the main chart, all eleven sharing a single score-driven gradient color — so the entire outer ribbon shifts between the theme's bull and bear hues as the trend score moves between −11 and +11.
**Eleven inner ribbon plots (lagged primary snapshots)** — The primary kernel plotted at eleven time-lag offsets (0, 1, 2, …, 10 bars). The resulting visual is a gently flowing shadow that makes expansion and contraction of the outer ribbon easier to perceive. Opacity is user-controlled (default: 40 %).
🟦 INTEGER TREND SCORE
The trend score is a signed integer in , computed on every bar by eleven pairwise comparisons between the primary kernel (at progressive lag offsets) and the eleven outer kernels:
```
score = 0
for i in 0..10:
if primary < long_i:
score += 1
else:
score -= 1
```
**Semantic interpretation** — Each comparison pairs an older snapshot of the shortest kernel against a current snapshot of a progressively wider kernel. In an uptrend, past primary values are lower while current wider-kernel values have caught up above them — the inequality resolves positive on most pairs and the score climbs toward +11. The symmetric argument drives the score toward −11 in a downtrend.
**Score parity** — Because the score is a sum of eleven ±1 terms (score = 2k − 11, k ∈ ), it is always odd. Reachable values: { −11, −9, −7, −5, −3, −1, 1, 3, 5, 7, 9, 11 }. The score is never exactly zero.
🟦 STRENGTH CATEGORIZATION
The absolute score is bucketed into four bands, each with a matched label glyph used throughout the dashboard and the last-bar signal label:
| Score Range | Strength | Label |
|---|---|---|
| \|score\| = 1 | NEUTRAL | ▰▱▱▱ NEUTRAL |
| \|score\| ∈ {3, 5} | WEAK | ▰▰▱▱ WEAK BULL / WEAK BEAR |
| \|score\| = 7 | STRONG | ▰▰▰▱ STRONG BULL / STRONG BEAR |
| \|score\| ∈ {9, 11} | TRIPLE | ▰▰▰▰ TRIPLE BULL / TRIPLE BEAR |
The bull / bear suffix is driven by the sign of the score. The progress-bar glyphs (▰▱) give an instant at-a-glance read of confluence intensity without needing to parse the numeric value.
🟦 NON-REPAINTING BEHAVIOR
Quant Edge Ribbon PRO inherits non-repainting behavior directly from the KernelLens library's `_phase` parameter. A single Phase input (default: 2) shifts every one of the twelve kernel centers into the past by that many bars.
- Phase = 0 — live estimate, flickers on the current bar (real-time only; history is immutable)
- Phase = 1 — 1-bar lag, non-repainting once the bar is confirmed
- Phase = 2 — recommended balance between freshness and stability (default)
- Phase = 3+ — extra margin against erratic ticks, higher lag
Historical repainting never occurs at any phase value. The library contains no `request.security` calls, no lookahead, and no array rotation that could leak future data. Every historical bar's plotted value is final once confirmed.
🟦 VISUAL PIPELINE
**Outer Ribbon Gradient** — All eleven outer kernels are plotted with a single shared color driven by the trend score via `color.from_gradient(score, -11, 11, thBear, thBull)`. As the score walks across its range, the entire ribbon shifts continuously between the active theme's bearish and bullish hues — producing a smooth visual feedback loop between the math and the palette.
**Inner Ribbon Shadow Trail** — Eleven lag-shifted primary snapshots (primary through primary ) drawn in the theme's accent hue with user-controlled opacity. On a trending chart the trail visually expands; on a reversing chart it contracts. Adjust opacity from 0 (invisible) to 100 (fully opaque) — default 40 balances presence and subtlety.
**Primary Kernel Anchor Line** — The primary kernel plotted as a dedicated bold line in the theme's accent color at 80 % opacity, distinct from the shadow trail. Provides a clear centerline amid the ribbon flow. Toggleable.
**Oscillator Subplot** — The smoothed trend score plotted in a dedicated subplot with a score-gradient vertical fill between the score line and the zero line. Opacity is user-controlled. An optional bold score line (up to 4 px wide) overlays the fill for sharp numeric reading.
**Last-Bar Trend Label** — A right-anchored label at the current bar in the oscillator pane. Format: `▲ TRIPLE BULL 11 / 11` (bull) or `▼ WEAK BEAR −3 / 11` (bear). The label is deleted and redrawn on every bar, so only one instance is ever present on the chart.
🟦 OSCILLATOR STYLES
The oscillator subplot ships with two visual presets, selectable from the Oscillator Style dropdown:
| Style | Plot Style | Fill | Best For |
|---|---|---|---|
| Classic Gradient | `plot.style_line` (smooth curve) | Continuous vertical gradient from score to zero | Trend flow, slope momentum |
| Stepline | `plot.style_stepline` (staircase) | Stepped gradient mirroring the discrete score plateaus | Signal / threshold trading, discrete level crossings |
**Classic Gradient** produces a smooth curve traced through the smoothed score values, with the gradient fill flowing continuously between the score line and the zero line. This is the default and suits traders who read trend direction through slope and curvature.
**Stepline** renders each bar as a horizontal plateau joined to the next bar by a vertical edge. Because the raw score is always an odd integer in { −11, −9, …, 9, 11 }, the staircase visualization honors the score's true discrete nature — making it easier to identify exact threshold crossings (e.g. the moment the score enters the ±9 extreme zone). The fill inherits the same stepline style, so the entire oscillator pane stays geometrically consistent.
Both styles share the same opacity controls, score line toggle, and line width setting — only the geometry of the score line and its fill changes between them.
🟦 THEME SYSTEM
Ten cohesive color palettes tuned to the Quant Edge Ribbon PRO optical brand. One selection drives every visual component — outer ribbon gradient, inner ribbon accent, oscillator fill, reference lines, signal label, dashboard accents — all sharing the same bull / bear / accent color axes:
| Theme | Bull | Bear |
|---|---|---|
| Prism | Forest green | Crimson red |
| Focus | Cyan steel | Deep orange |
| Solar | Warm amber | Indigo red |
| Frost | Sky blue | Soft lavender |
| Laser | Neon lime | Hot crimson |
| Aurora | Bright gold | Scarlet |
| Plasma | Electric aqua | Magenta |
| Bloom | Mint green | Hot pink |
| Eclipse | Deep navy | Dark crimson |
| Carbon | Near-black | Silver grey |
The oscillator's zero line uses Pine's `chart.fg_color` so it auto-adapts to the actual chart background (white on dark charts, black on light charts) — independent of the Dashboard's Display Mode setting.
🟦 REFERENCE LEVELS
Four user-configurable horizontal reference lines mark the score's structural thresholds inside the oscillator subplot:
| Level | Style | Meaning |
|---|---|---|
| +11 / −11 | Dotted | Ceiling / floor — the mathematical maximum (every comparison aligned) |
| +9 / −9 | Dashed | Extreme zone — nine or more of the eleven comparisons agree on direction |
Each pair (±11 and ±9) has an independent opacity input (0–100 %). A master toggle (Show Reference Levels) collapses all four lines to fully transparent in a single branch — useful for minimalist layouts. An additional `showOsc` gate hides them automatically when the oscillator itself is disabled.
🟦 PRO DASHBOARD
A 2-column, 12-row theme-aware status panel that updates only on the last bar (zero historical overhead). Supports Dark and Light display modes, six docking positions, and four text sizes. Renders via `force_overlay = true` on the main price chart.
| Row | Label | Content |
|---|---|---|
| Header | Q-EDGE PRO | DARK / LIGHT |
| Theme | Theme | Active palette name |
| Kernel | Kernel | Selected kernel type |
| Divider | RIBBON | — |
| Primary ℓ | Primary ℓ | Primary bandwidth value |
| Span | Span | ℓ → ℓ + 11·s |
| Filter | Filter | No Filter / Smooth / Zero Lag |
| Divider | SCORE | — |
| Score | Score | ▲/▼ + integer score + " / 11" (bull/bear colored) |
| Bull / Bear | Bull / Bear | Bull comparison count / bear comparison count |
| Strength | Strength | ▰-bar + NEUTRAL / WEAK / STRONG / TRIPLE label |
| Primary | Primary | Primary kernel value in chart mintick format |
**Bull / Bear breakdown** — The eleven pairwise comparisons split into bulls (resolved +1) and bears (resolved −1). Always sums to 11, so this row gives a direct visual of how many kernel scales agree with the net direction.
🟦 ALERT CONDITIONS
Six opt-in alert conditions, each gated by its own toggle:
| Alert | Fires When |
|---|---|
| Bullish Flip | Score crosses from ≤ 0 into positive territory |
| Bearish Flip | Score crosses from ≥ 0 into negative territory |
| Extreme Bullish | Score reaches +9 or higher (first entry into the zone) |
| Extreme Bearish | Score reaches −9 or lower (first entry into the zone) |
| Full Confluence Up | Score hits +11 — every outer kernel aligned bullishly |
| Full Confluence Down | Score hits −11 — every outer kernel aligned bearishly |
All alerts use `alertcondition()` for maximum compatibility with PulseWire's alert system including webhooks. Messages are structured as `"Quant Edge Ribbon PRO: "` for easy parsing in downstream automation.
🟦 RECOMMENDED PRESETS
| Style | Primary ℓ | Bandwidth Step s | Phase | Filter | Chart |
|---|---|---|---|---|---|
| Scalper | 8–16 | 1 | 1 | No Filter | 1m–5m |
| Day Trader | 16–32 | 1–2 | 2 | Smooth | 15m–1h |
| Swing | 25–50 | 1–2 | 2 | Smooth | 4h–1D |
| Position | 50–120 | 2–3 | 3 | Smooth | 1D–1W |
**Bandwidth Step tuning** — Step = 1 produces a tight ribbon where adjacent outer kernels sit visually close together. Steps of 2–4 spread the eleven outer kernels across a broader spectrum of scales, making expansion / contraction easier to read at a glance. Step 5–6 is reserved for very wide ribbons where each line represents a distinctly different time scale.
🟦 COMPATIBILITY
- Pine Script v6
- All exchanges, all asset classes (crypto, forex, equities, commodities, indices)
- All timeframes (1 minute through Monthly)
- Both Dark and Light chart themes — visual elements auto-adapt via `chart.fg_color`
- No exchange-specific logic — fully deterministic
🟦 TECHNICAL NOTES
- **Library dependency** — `import a_jabbaroff/KernelLens/1` — all kernel regression math is delegated to the published library
- **Plot budget** — 11 outer + 11 inner + 1 primary + 2 oscillator plots + 1 fill + 4 hlines = well under Pine's 64-plot limit
- **Table** — Single `var table` created once on `barstate.islast` with `force_overlay = true`; dashboard renders on the main chart pane, zero historical overhead
- **No persistent drawing objects** — no `box.new`, `line.new`, no `array.new`; the single trend label is deleted and recreated every bar so only one instance is ever present
- **Opacity convention** — every user-facing opacity input follows `0 = invisible, 100 = fully opaque`; conversion to Pine's native transparency is centralized in a single helper function (`f_opac`)
- **Non-repainting** — inherits from the library's `_phase` parameter; no `request.security`, no lookahead, no future-bar leakage at any phase value
- **Chart background adaptive** — the oscillator's zero line uses `chart.fg_color`, so it always renders with high contrast regardless of the user's chart color scheme
🟦 DISCLAIMER
Quant Edge Ribbon PRO is a technical analysis indicator built on the KernelLens Nadaraya–Watson regression library. It is provided solely for educational and research purposes and does not constitute financial, investment, or trading advice.
Kernel regression is a local smoothing technique. It estimates the mean of a source series in the neighborhood of the current bar based on historical data, but it does not predict future prices, does not generate trading signals on its own, and does not guarantee the profitability of any strategy built on top of its output. The integer trend score is a geometric summary of kernel alignments — not a forecast — and should always be combined with broader context: higher-timeframe structure, volatility regime, liquidity, news, and risk management.
Past performance of any model does not guarantee future results. Markets contain systemic risks that cannot be eliminated by any amount of mathematical rigor. Responsibility for any trading decisions rests entirely with the user. Always apply sound capital management, conduct your own independent analysis, and never risk capital you are not prepared to lose.
The author assumes no liability for direct or indirect losses incurred through the use of Quant Edge Ribbon PRO or the underlying KernelLens library. Indicator

Fractal Liquidity Map [JOAT]Fractal Liquidity Map
Introduction
The Fractal Liquidity Map renders the complete institutional liquidity landscape through six non-overlapping visual systems that each occupy their own visual lane: Williams Fractal markers, cluster support/resistance zones, equal highs/lows liquidity pool lines, sweep detection signals, multi-length pivot levels, and a Hann FIR trend ribbon. Every element is designed to coexist without visual clutter — cluster zones are thin dual-line bands, liquidity pools are dashed lines, sweeps are plotshape arrows that require no screen space accumulation.
The core problem this solves: most liquidity tools accumulate dozens of overlapping boxes that become unreadable over time. This indicator uses a clean-redraw architecture for zones — all drawing objects are deleted and recreated on each bar using only current price-level arrays, preventing any stacking, overlap, or ghost boxes from persisting.
Core Concepts
1. Williams Fractal Detection
A fractal high is a bar whose high is the highest in a configurable N-bar window on both sides; a fractal low is the lowest in the same window. Fractals are confirmed on bar close — the center bar's status is only registered after the right-side confirmation bars have closed:
bool frac_hi = high == ta.highest(high, i_frac_len * 2 + 1)
bool frac_lo = low == ta.lowest (low, i_frac_len * 2 + 1)
Fractal marks are rendered as small diamond shapes above and below the relevant bars, providing the foundational structural pivot map from which all other elements derive.
2. Cluster S/R Zones
When N or more fractals converge within a price band of 1x ATR, they are classified as a cluster zone — an area where price has pivoted multiple times, indicating persistent institutional interest. These are rendered as thin dual-line bands (solid top edge + dotted bottom edge) rather than filled boxes:
// Clean-redraw architecture: all lines deleted and recreated on barstate.islast
if barstate.islast
for each level in clust_res_lvls
line.new(start_bar, level, bar_index + 10, level,
color = i_res_col, style = line.style_solid, width = 2)
line.new(start_bar, level - atr_14 * 0.3, bar_index + 10, level - atr_14 * 0.3,
color = color.new(i_res_col, 60), style = line.style_dotted)
Only the price levels are stored between bars (as float arrays). The drawing objects are fully recreated on last bar, guaranteeing zero accumulation or overlap regardless of how many bars the zone has existed.
3. Equal Highs/Lows Liquidity Pools
When two or more swing highs (or lows) within a lookback window fall within a tolerance band of each other (default 0.15x ATR), they form an Equal Highs (EQH) or Equal Lows (EQL) liquidity pool. These levels are targets for stop-hunt sweeps by institutional participants because retail stop orders cluster above EQH and below EQL:
float pool_tol = i_pool_tol * atr_14
bool near_hi = math.abs(_pool_hi - _prev_pool_hi) < pool_tol
bool near_lo = math.abs(_pool_lo - _prev_pool_lo) < pool_tol
Pools render as thin dashed lines with compact EQH/EQL labels. Like cluster zones, they use the clean-redraw architecture — no boxes, no accumulation, no stacking.
4. Sweep Detection
A sweep occurs when price breaks through a known liquidity pool level (above EQH or below EQL) and then closes back inside the prior range — confirming a stop-hunt without follow-through:
bool sweep_hi = high > pool_hi_ref and close < pool_hi_ref
bool sweep_lo = low < pool_lo_ref and close > pool_lo_ref
Sweeps are displayed as plotshape arrows (upward triangle below bar for bullish sweep, downward triangle above bar for bearish sweep). Because plotshape markers occupy zero screen real estate compared to boxes, sweeps cannot overlap or accumulate. An optional single-bar background flash draws attention to sweep bars.
5. Multi-Length Pivot Levels
Three configurable pivot lengths (default: 10, 30, 75 bars) generate independent sets of support and resistance levels. Each set uses its own resolution and color gradient encoding distance from current price — nearby levels are opaque, distant levels are transparent. Deduplication logic prevents levels from multiple pivot lengths from overlapping if they fall within ATR proximity.
6. Hann FIR Trend Ribbon
A three-layer Hann Window FIR filter ribbon provides directional bias in the background. The ribbon is fully described in the Adaptive Spectral Bands indicator. Here it serves as a trend filter — when the ribbon is bullish (fast layer above slow), resistance zones are more likely to hold; when bearish, support zones are the focus. Ribbon crossover events flash the background briefly.
Features
Williams Fractal Marks: Configurable lookback diamond markers at confirmed fractal highs and lows
Cluster S/R Zones: Dual-line thin bands at price areas where multiple fractals converge, with full deduplication
Liquidity Pool Lines: Dashed lines at equal highs/lows with EQH/EQL labels — no boxes, no stacking
Sweep Detection: plotshape arrows at confirmed liquidity sweep bars plus optional background flash
Multi-Length Pivots: Three independent pivot resolutions with distance-opacity gradient
Hann FIR Ribbon: Three-layer trend ribbon with crossover signals and background flash
Zero-Overlap Architecture: Clean-redraw system for all zone elements eliminates accumulated drawing object clutter
Dashboard: Active cluster zones, active pool lines, sweep count, ribbon direction, and ATR value
Alerts: Bullish sweep, bearish sweep, ribbon crossover bullish, ribbon crossover bearish
Input Parameters
Fractal Detection:
Fractal Length: Lookback bars on each side for fractal confirmation (default: 5). Larger = fewer, more significant fractals.
Show Fractal Marks: Toggle diamond marker rendering (default: on)
Cluster Zones:
Min Fractals for Cluster: Minimum fractal count within ATR band to qualify as a cluster (default: 3)
Max Cluster Zones: Maximum simultaneous cluster zones rendered (default: 6)
Show Cluster Zones: Toggle cluster zone rendering (default: on)
Liquidity Pools:
Pool Tolerance (x ATR): Price proximity for equal high/low classification (default: 0.15)
Pool Lookback (bars): Window for equal high/low detection (default: 50)
Max Pool Lines: Maximum pool lines displayed (default: 8)
Show Liquidity Pools: Toggle pool line rendering (default: on)
Sweep Detection:
Show Sweep Signals: Toggle sweep arrows (default: on)
Flash Background on Sweep: Single-bar background highlight on sweep bar (default: on)
Multi-Length Pivots:
Pivot 1 / Length: First pivot resolution (default: enabled, 10 bars)
Pivot 2 / Length: Second pivot resolution (default: enabled, 30 bars)
Pivot 3 / Length: Third pivot resolution (default: enabled, 75 bars)
Trend Ribbon:
Show Hann Ribbon: Toggle ribbon visibility (default: on)
Ribbon Length: Base FIR filter length (default: 20)
Ribbon Spacing: Gap between ribbon layers (default: 8)
Colors:
Resistance / Support / Pool / Sweep: Independent color selection for each element type
How to Use This Indicator
Step 1: Build the Liquidity Map
Zoom out to a 1-4 hour timeframe and let the cluster zones and pool lines populate. These are your primary reference levels. The cluster zones (multiple fractal convergences) are the highest-confidence levels. Pool lines (equal highs/lows) are the stop-hunt targets.
Step 2: Watch for Sweeps
A sweep arrow above a pool line indicates a stop-hunt of sellers above EQH. A bullish sweep (price broke above EQH but closed back inside) is frequently a reversal signal — institutions cleared the sell-side liquidity and may now push price higher. The background flash marks exactly which bar this occurred on.
Step 3: Use the Ribbon for Direction
Trade cluster zone bounces only in the direction of the Hann ribbon. If the ribbon is bullish (green), focus on support cluster zones for long entries. Resistance zones in a bullish ribbon context are areas to manage position, not reverse.
Step 4: Stack with Multi-Pivot Levels
Where a multi-length pivot level aligns with a cluster zone, the confluence is significant. A 75-bar pivot and a cluster zone at the same price level is a major institutional reference that warrants tighter risk and larger position sizing consideration.
Originality Statement
This indicator is original in its integration of fractals, volume-derived cluster zones, equal highs/lows pools, sweep detection, and Hann FIR ribbon into a single zero-overlap visual system. Its publication is justified because:
The clean-redraw architecture (storing only price levels in arrays, recreating all drawing objects on last bar) is a fundamental departure from the standard approach of accumulating box arrays — it solves the overlap and clutter problem at the architectural level, not with cosmetic band-aids
Cluster zones derived from fractal convergence within ATR tolerance provide an objective, quantitative method for identifying price areas with multiple structural pivots — avoiding the subjectivity of manual zone drawing
Sweep detection using pool levels as reference (not arbitrary lookback highs/lows) creates a directional signal directly tied to the liquidity context in which the sweep occurred
All six visual layers are designed for simultaneous display without interference — fractal marks at bar tops/bottoms, cluster zones as thin lines, pool lines as dashed lines, sweeps as arrows, ribbon below price, pivots as semi-transparent overlays
Limitations
The clean-redraw system recreates all line objects on every bar close (barstate.islast). On charts with very long history, this processes large arrays. Performance degrades gracefully but is slower than static object creation.
Fractal confirmation requires N bars on each side, meaning fractals always lag behind current price by the fractal length. Fresh structural pivots will not appear until confirmed.
Equal highs/lows detection uses ATR-relative tolerance. On instruments with irregular volatility (news events, halts), temporary ATR spikes may cause pools to merge or split unexpectedly.
Ribbon direction is a trend approximation, not a prediction. Sweep signals against the ribbon trend should be weighted less than those in the ribbon direction.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Liquidity zones and sweep signals do not guarantee price direction. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Imbalance Zone Classifier [JOAT]Imbalance Zone Classifier
Introduction
The Imbalance Zone Classifier detects Fair Value Gaps (price imbalances where no two-sided auction occurred) and assigns each zone a 0–100 Strength Score based on four measurable factors: gap size relative to historical distribution, intrabar buy/sell volume composition, zone age, and mitigation status. Rather than drawing every FVG indiscriminately, this indicator filters by minimum score and renders only the zones most likely to attract institutional order flow on return visits.
The core problem this solves: nearly every FVG tool draws every gap, producing charts saturated with dozens of overlapping boxes that cannot be prioritized. A 0.03% gap on declining volume is not equivalent to a 0.8% gap formed on explosive institutional buying. The Strength Score quantifies that difference, letting the trader focus on the handful of zones that genuinely matter.
Core Concepts
1. Fair Value Gap Detection
An FVG (also known as an inefficiency or price imbalance) occurs when three consecutive candles leave a price gap:
// Bullish FVG: candle high is below candle low
bool bull_fvg = high < low and close > open
// Bearish FVG: candle low is above candle high
bool bear_fvg = low > high and close < open
Detection is confirmed on bar close — the gap is only registered after candle closes — ensuring no repainting. The zone boundaries are the candle high and candle low for a bullish FVG (and their inverses for bearish).
2. The 0–100 Strength Score
Each FVG receives a composite score derived from four sub-scores:
int vol_score = int(math.min(bull_pct / 0.7 * 50, 50)) // 0-50 pts
int size_score = int(math.min(gap_rank * 0.35, 35)) // 0-35 pts
int composite_score = vol_score + size_score // base
// Age decay applied post-formation: score -= 1 per N bars
Size Score (0–35 pts): The gap size as a percentage of price is ranked against the last 1000 bars using a percentile rank. A gap in the top 10% of historical size scores near maximum. A tiny gap scores near zero.
Volume Score (0–50 pts): Lower-timeframe bars within the formation candle's time window are decomposed into buy and sell volume. A bullish FVG with 90% buy-side composition scores 50; one with 50% scores 25.
Age Decay: Zones accumulate bar age. The score decays over time, reflecting that older unmitigated zones become less relevant. Zones below the minimum score threshold fade and are removed.
3. Lower-Timeframe Volume Decomposition
Volume intelligence comes from requesting sub-bar data at the user-specified lower timeframe:
array ltf_bull_vol = request.security_lower_tf("", i_ltf, (close > open ? volume : 0.0))
array ltf_bear_vol = request.security_lower_tf("", i_ltf, (close < open ? volume : 0.0))
float sum_bull_ltf = ltf_bull_vol.sum()
float sum_bear_ltf = ltf_bear_vol.sum()
float bull_pct = sum_bull_ltf / (sum_bull_ltf + sum_bear_ltf)
This decomposes the FVG formation candle's volume into directional sub-bar composition — giving a precise measure of whether the gap was formed by institutional buying pressure or merely a thin-volume vacuum.
4. Mitigation Logic
Zones are considered mitigated when price returns to the zone midpoint (or high/low depending on user setting). Mitigated zones do not disappear immediately — they change color and fade, providing a historical record. They are removed from the active list after a configurable bar count, and a counter increments in the dashboard.
5. Volume Bar Visualization Inside Zones
Each zone renders a proportional buy/sell volume bar inside the zone body — a thin inner box whose right edge shows the bull/bear volume ratio. A zone with 80% buy volume renders its inner bar nearly full green. This gives an immediate visual indication of the composition without requiring the dashboard.
Features
Fair Value Gap Detection: Bullish and bearish FVGs confirmed on bar close, non-repainting
0–100 Strength Score: Composite score from gap size percentile rank and lower-timeframe volume composition
Minimum Score Filter: Only zones above the threshold are rendered — keeps the chart clean
LTF Volume Decomposition: True intrabar buy/sell ratio from lower-timeframe data
Volume Bar Inside Zone: Proportional buy/sell bar rendered within each zone body
Mitigation Tracking: Zones transition to faded color on mitigation; active vs mitigated count in dashboard
Zone Extension: Unmitigated zones extend rightward automatically until price returns
Age Decay: Score degrades over time, naturally purging stale zones below the threshold
9-Row Dashboard: Active bullish zones, active bearish zones, total mitigated, highest current score, session FVG count
Alerts: Bullish FVG formed, bearish FVG formed, bullish FVG mitigated, bearish FVG mitigated
Input Parameters
FVG Detection:
Detect Bullish FVGs: Toggle bullish imbalance detection (default: on)
Detect Bearish FVGs: Toggle bearish imbalance detection (default: on)
Minimum Strength Score (0–100): Filter threshold — only zones above this are shown (default: 25). Higher = fewer, stronger zones.
Mitigation Source: close = mitigated when close crosses zone midpoint. high/low = wick breach removes the zone (default: close)
Max Active Zones: Maximum simultaneous rendered zones (default: 12, range: 3–30)
Volume Intelligence:
LTF Resolution: Lower timeframe for intrabar volume decomposition (default: 1m)
Visualization:
Bullish / Bearish / Mitigated colors: Fully customizable
Show Volume Bars Inside Zones: Display proportional buy/sell bar within each zone (default: on)
Extend Unmitigated Zones: Extend zone boxes rightward until mitigation (default: on)
Dashboard:
Position: Top Right, Top Left, Bottom Right, Bottom Left (default: Top Right)
How to Use This Indicator
Step 1: Set the Minimum Score
Start with the default score of 25. This filters out the weakest gaps while keeping meaningful zones. If the chart still shows too many zones, raise to 40–50. For maximum selectivity on higher timeframes, 60+ selects only the most institutionally significant gaps.
Step 2: Read the Volume Bar Inside Each Zone
A bullish FVG with a mostly green inner bar (80%+ buy volume) was formed by genuine institutional buying. One with a near-50% bar was formed in a thin, directionless push — much less likely to hold on retest. This distinction cannot be made from price action alone.
Step 3: Trade the Retest
Price frequently returns to fill FVG zones, particularly the highest-score zones. The midpoint of the zone (zone top + zone bottom / 2) is the primary retest level. Entry on a return to a high-score bullish FVG, with a stop below the zone low, is a clean risk-defined setup.
Step 4: Monitor Mitigation
Once a zone changes to the mitigated color, it no longer has predictive value as a support/resistance level — it has been filled. Remove it from your analysis. The dashboard count of mitigated zones tells you how efficiently the market is clearing imbalances.
Originality Statement
This indicator is original in its composite strength scoring system applied to Fair Value Gaps using lower-timeframe volume decomposition. Its publication is justified because:
Gap size percentile rank against 1000-bar history normalizes the score across different instruments and timeframes — a 0.5% gap on EURUSD scores the same as a 0.5% gap on BTCUSD regardless of absolute price level
Lower-timeframe volume decomposition provides true intrabar buy/sell composition of each FVG formation candle — a dimension of analysis unavailable from chart-timeframe OHLCV data alone
The visual volume bar inside each zone encodes directional conviction directly within the zone's screen space, creating a two-dimensional information display (price level + volume direction) without additional panels
Age decay combined with minimum score filtering creates a self-organizing, self-cleaning zone map that requires no manual zone management from the trader
Limitations
LTF volume requests add computation overhead. On 1-minute chart timeframes, requesting 1-minute LTF data is a no-op; the function falls back to chart-timeframe volume for those bars.
The strength score is a relative ranking, not an absolute predictive probability. A score of 80 does not mean an 80% chance of holding — it means this zone is stronger than most, not that it is guaranteed to act as support or resistance.
Mitigation is detected on bar close (or high/low depending on setting). Intrabar wicks that return to the zone but close outside it will not trigger mitigation in the default setting.
The maximum zone count is a performance and visual constraint. On timeframes where FVGs form frequently, older lower-score zones are removed to stay within the limit.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Fair Value Gap zones do not guarantee price reversal or support. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Institutional Session Profiler [JOAT]Institutional Session Profiler
Introduction
The Institutional Session Profiler builds a real-time volume-by-price distribution for each of the three major trading sessions — Asia (Tokyo, 01–09 UTC), London (07–16 UTC), and New York (13–22 UTC). For each session, it calculates the Point of Control (POC — the price level with the highest traded volume), the Value Area High (VAH) and Value Area Low (VAL) encompassing 70% of session volume, and a net buy/sell delta that reveals directional institutional participation within the session. Profile shapes are rendered as smooth polyline waves via Catmull-Rom cubic spline interpolation, giving the profiles a clean, readable curve rather than a jagged bar histogram.
The core problem this solves: standard volume profile tools display a single aggregated profile for an arbitrary lookback. Institutional traders operate within defined session windows — Asia sets the range, London typically engineers liquidity, New York resolves direction. Mapping volume distribution per session reveals where institutions are genuinely active versus where price is simply passing through thin volume.
Core Concepts
1. Lower-Timeframe Volume Accumulation
To build accurate price-level histograms on any chart timeframe, 1-minute (or user-specified lower timeframe) bars are requested via Pine Script's security_lower_tf function. Each sub-bar's volume is classified as buy-side or sell-side, then placed into the session's price bins:
array ltf_c = request.security_lower_tf("", i_ltf, close)
array ltf_v = request.security_lower_tf("", i_ltf, volume)
for i = 0 to ltf_c.size() - 1
float p = ltf_c.get(i)
float v = ltf_v.get(i)
int idx = int(math.floor((p - s_asia.lo) / bin_size))
s_asia.bins.set(idx, s_asia.bins.get(idx) + v)
This means the profile represents actual sub-bar traded volume distributed across price, not a simple tick count or approximation from chart-timeframe candles.
2. Point of Control and Value Area
The POC is the bin index with the highest accumulated volume. The Value Area is computed by iteratively expanding from the POC outward, adding the higher-volume neighbor bin at each step until 70% of total session volume is captured:
float target = total_vol * VA_PCT // VA_PCT = 0.70
float accum = bins.get(poc_idx)
int lo_i = poc_idx
int hi_i = poc_idx
while accum < target
// expand toward whichever neighbor bin has more volume
The resulting VAH and VAL define the zone where the majority of institutional volume transacted. Price inside the value area is "accepted" — price outside it is either in premium or discount relative to session fair value.
3. Catmull-Rom Spline Profile Rendering
Rather than rendering a stepped histogram, the volume bins are smoothed with a double-pass averaging and then connected via Catmull-Rom cubic splines into a polyline. This produces the signature smooth profile wave that is readable at a glance without the visual noise of raw histogram bars:
// Control point generation for cubic interpolation
float cx0 = x0, cy0 = y0
float cx1 = x1 + (x2 - x0) / 6, cy1 = y1 + (y2 - y0) / 6
// ... polyline rendered via array
4. Session Delta
Each session accumulates a running buy/sell delta (buy volume minus sell volume across all sub-bars). The dashboard displays the session delta as a signed value with color coding — positive delta in the Asia session followed by a bullish London opening is a meaningful institutional convergence signal.
Features
Three Simultaneous Session Profiles: Asia, London, and New York built in parallel, each with its own color
Point of Control Line: Horizontal line at the highest-volume price level per session, extended across the full session range
Value Area Box: Shaded box from VAL to VAH representing the 70% volume concentration zone
Volume Wave: Smooth Catmull-Rom spline profile rendered as a polyline — showing the full shape of volume distribution
Buy/Sell Delta: Net directional volume per session displayed in the dashboard
Session Range Box: Outer boundary box showing the full session high-to-low range
9-Row Dashboard: Displays session status (open/closed), POC price, VAH, VAL, session range, delta, and total session volume for each active session
Alerts: Asia session open, London session open, NY session open, price enters value area, price exits value area
Input Parameters
Sessions:
Asia (01–09 UTC): Toggle Asia session profiling (default: on)
London (07–16 UTC): Toggle London session profiling (default: on)
New York (13–22 UTC): Toggle NY session profiling (default: on)
Volume Profile:
LTF for Volume: Lower timeframe to use for sub-bar volume accumulation (default: 1m). Must be smaller than chart timeframe.
Profile Bins: Number of price levels in each session distribution (default: 35, range: 10–100). More bins = finer resolution.
Show Value Area (70%): Toggle VAH/VAL box rendering (default: on)
Visualization:
Asia / London / NY Colors: Independent session color selection
Box Transparency: Base transparency of session range and value area boxes (default: 85)
Show Volume Wave: Toggle Catmull-Rom spline profile rendering (default: on)
Dashboard:
Position: Top Right, Top Left, Bottom Right, Bottom Left (default: Top Right)
How to Use This Indicator
Step 1: Locate the POC and Value Area
The POC is the single most important price level in each session — it represents the highest institutional agreement. Value Area (VAH to VAL) is where the majority of volume transacted. Price above VAH is premium; price below VAL is discount.
Step 2: Identify Session Transitions
The London open (07 UTC) frequently engineers liquidity above or below the Asia range. If London takes out the Asia high and then reverses, the Asia POC becomes a magnetic target. The NY open at 13 UTC is the resolution event — watch for which side of the London value area price is trading on at that open.
Step 3: Read the Session Delta
A session with strong positive delta (more buy volume than sell volume) combined with price closing near the VAH suggests institutional accumulation. Negative delta closing near VAL suggests distribution. Divergence between price direction and delta direction is a key reversal signal.
Step 4: Use VAH/VAL as Dynamic S/R
After a session closes, its VAH and VAL remain on chart as reference levels. These levels frequently act as support or resistance in the following session because institutional participants remember where the majority of volume transacted.
Originality Statement
This indicator is original in its combination of per-session volume profile construction using lower-timeframe data with Catmull-Rom spline visual rendering and real-time delta tracking across three simultaneous sessions. Its publication is justified because:
Volume profiles are typically computed for arbitrary user-defined time windows or fixed periods. Per-session profiling maps institutional behavior to the actual time windows in which institutions operate — Asia, London, and New York — creating contextually meaningful distributions rather than arbitrary aggregations
Catmull-Rom spline interpolation of the bin array produces a smooth, continuous profile shape that preserves the true distribution topology while being readable without histogram visual noise
Real-time lower-timeframe volume decomposition into price bins on any chart timeframe gives accurate sub-bar volume placement that chart-timeframe-only calculations cannot produce
Simultaneous three-session display with independent POC, VAH, VAL, and delta tracking per session enables cross-session analysis that no single-profile tool can provide
Limitations
LTF data requests consume additional computation. On very high timeframe charts (4H+), 1-minute LTF data pulls are large. Consider using 5m LTF on higher timeframes to reduce computation.
The buy/sell volume classification (close >= open = buy) is an approximation at the 1-minute level. True tick-direction is not available in Pine Script.
Session times are fixed UTC offsets. Daylight saving time transitions may shift the actual institutional open by one hour depending on the exchange.
Value Area calculation uses 70% of session volume by default. This follows the standard Market Profile convention but the threshold is not universally agreed upon.
On assets with very low volume (illiquid instruments), the profile bins will be sparse and the spline shape may not be representative of meaningful distribution.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Session volume patterns do not guarantee future price behavior. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Adaptive Spectral Bands [JOAT]Adaptive Spectral Bands
Introduction
The Adaptive Spectral Bands indicator is a six-layer Hann Window FIR filter ribbon combined with volatility-adaptive ATR envelopes, a three-state regime classifier, and automated support/resistance zone discovery. The Hann window is a well-known digital signal processing technique that applies a raised cosine weighting function to price data, producing a filter with near-zero overshoot and a steep frequency rolloff. The result is a smoothed trend line that turns earlier at genuine inflection points without the lag spikes characteristic of exponential moving averages.
The core problem this solves: standard moving average ribbons use EMAs or SMAs which introduce phase lag proportional to their length, creating late entries. The Hann FIR ribbon resolves at the mathematically optimal balance between lag reduction and frequency separation — no other common moving average achieves this simultaneously.
Core Concepts
1. Hann Window FIR Filter
The filter applies raised cosine weights across a lookback window. Each weight is computed as:
hannFilt(src, length) =>
float filt = 0.0
float coef = 0.0
for i = 1 to length
float w = 1.0 - math.cos(2 * math.pi * i / (length + 1))
filt += src * w
coef += w
filt / coef
This produces a symmetric bell-shaped kernel. The six ribbon layers use progressively wider copies of this filter (base length, base + spacing, base + 2×spacing, etc.), creating a ribbon that visually encodes trend momentum — wide separations signal strong trends, compression signals consolidation.
2. Volatility-Adaptive ATR Bands
The outer bands expand and contract based on the current volatility percentile rank relative to a lookback period. This is not a fixed-multiplier Bollinger Band — the multiplier itself adapts:
float vol_rank = ta.percentrank(atr_14, i_adapt_len) / 100.0
float dyn_mult = i_base_mult * (1.0 + i_adapt_str * (vol_rank - 0.5) * 2.0)
float upper_band = h0 + dyn_mult * atr_14
float lower_band = h0 - dyn_mult * atr_14
During compression (low ADX, low ATR rank), bands tighten around the central Hann line. During expansion, bands widen, automatically containing breakout candles within the volatility envelope. This eliminates the problem of static bands that produce false breakouts in trending markets.
3. Three-State Volatility Regime Classifier
ADX is used as the regime signal, with two configurable thresholds:
Low Volatility / Compression: ADX below lower threshold. Ribbon layers are tightly stacked. Market is in accumulation or range contraction. Fade-the-band strategies may apply.
Transitional: ADX between thresholds. Directional conviction is building. Ribbon is beginning to separate.
Expansion / Trending: ADX above upper threshold. Ribbon layers are fully separated. Breakout confirmation. Momentum strategies applicable.
The background and candle colors change with regime, providing at-a-glance context without requiring a separate ADX panel.
4. Automated S/R Zone Discovery
When the leading Hann layer crosses the second layer, the local price extreme at that bar is recorded as a support or resistance level. These crossovers mark inflection points where trend direction is shifting — the price level at that bar frequently becomes a structural reference in subsequent sessions:
bool cross_up = ta.crossover(h0, h1)
bool cross_down = ta.crossunder(h0, h1)
if cross_up and bar_index - last_sr_bar >= i_sr_gap
sr_price := low
// create support zone box
Zones are spaced by a minimum bar count to avoid clustering. Old zones are managed by a shift-and-delete array pattern so the chart stays clean.
Features
Six-Layer Hann Ribbon: Progressively wider FIR filters creating a gradient ribbon from fast to slow
Adaptive ATR Bands: Volatility-rank-adjusted envelopes that breathe with market conditions
Three-State Regime Classifier: Low / Transitional / Expansion states with color coding
Auto S/R Zones: Ribbon crossover points recorded as support/resistance boxes with configurable spacing
Candle Coloring: Optional bar tinting by volatility regime (compression blue / expansion amber)
10-Row Dashboard: Displays regime label, ADX value, volatility rank, ribbon direction, band width, active S/R zone count, and more
Alerts: Ribbon crossover bullish, ribbon crossover bearish, regime change to expansion, regime change to compression
Input Parameters
Hann Filter:
Source: Price input for the filter (default: close)
Base Length: Core period of the Hann FIR filter (default: 20, range: 4–500). The six ribbon layers are derived from this.
Ribbon Spacing: Gap between each successive ribbon layer (default: 3). Larger values create a wider, more visible ribbon.
Show Ribbon: Toggle ribbon visibility (default: on)
Adaptive Bands:
Enable Adaptive Bands: Toggle ATR envelope rendering (default: on)
Base Multiplier: Core ATR distance for the bands (default: 2.0)
Volatility Lookback: Period for ATR percentile rank calculation (default: 50)
Adaptation Strength: 0 = fixed multiplier, 1 = maximum volatility adaptation (default: 0.4)
Volatility Regime:
ADX Length: Period for ADX computation (default: 14)
Low Threshold: ADX below this = Compression regime (default: 20)
High Threshold: ADX above this = Expansion regime (default: 35)
S/R Zones:
Auto S/R Zones: Enable ribbon-crossover-based zone discovery (default: on)
Min Zone Spacing: Minimum bar distance between consecutive S/R zones (default: 30)
Visualization:
Bullish / Bearish / Compression / Expansion colors: Fully customizable
Color Candles by Regime: Optional regime-based candle tinting (default: off)
Dashboard:
Position: Top Right, Top Left, Bottom Right, Bottom Left (default: Top Right)
How to Use This Indicator
Step 1: Identify the Regime
The dashboard shows the current regime label (Compression / Transitional / Expansion) and the ADX value. In compression, wait. In expansion, trade. The volatility rank shows where current ATR sits in its historical distribution — above 70th percentile is high volatility.
Step 2: Read the Ribbon Direction
When h0 (fastest layer) is above h1 and h1 above h2, the ribbon is bullish and fully aligned. A crossover of h0 over h1 is the initial signal; a full stack alignment is the confirmation.
Step 3: Respect the Adaptive Bands
Price touching the upper band in expansion often marks a continuation point — the band is expanding to contain the trend. The same touch during compression is a fade signal. The regime state determines which interpretation applies.
Step 4: Trade S/R Zone Retests
When price retraces to a recently discovered S/R zone, look for ribbon alignment in the same direction as the original break. The zone marks where the Hann crossover occurred, which is the most statistically significant structural inflection point available from the ribbon.
Originality Statement
This indicator is original in its combination of Hann Window FIR filter ribbons with adaptive ATR bands and regime-conditioned S/R zone discovery. Its use on PulseWire is justified because:
The Hann FIR filter produces strictly lower phase lag at equivalent frequency cutoff than EMA or DEMA — a mathematically demonstrable property that common Pine implementations do not exploit
Volatility percentile rank as the band multiplier modulator creates self-regulating envelopes that require no manual retuning between high and low volatility periods
Combining ADX regime state with ribbon structure separates directional signals from noise — the same crossover signal carries different weight in compression versus expansion
Auto S/R zone discovery from FIR crossovers creates an objective level-finding method anchored to frequency-domain turning points, not arbitrary pivot lookbacks
Limitations
The Hann FIR filter is a causal, finite impulse response filter — it responds to all price history within its window equally weighted by the cosine kernel. It cannot predict future turning points; it identifies them as they occur.
ADX is a lagging indicator. Regime classification based on ADX will sometimes enter expansion state after the move has partially occurred.
Auto S/R zones are derived from ribbon crossovers, which means they lag the actual price turn by the filter's inherent smoothing delay. Zones mark inflection areas, not exact price pivots.
On very short timeframes (sub-5m), Hann filter smoothing may be excessive relative to the noise level, making regime signals less reliable.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Past performance of structural patterns does not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Volumetric Structure Engine [JOAT]Volumetric Structure Engine
Introduction
The Volumetric Structure Engine is an institutional market structure tracker that fuses swing-point classification with real-time buy/sell volume delta analysis. Every confirmed swing high and swing low is measured not only by price, but by the net volume composition of the leg that produced it — revealing whether a structural move was driven by genuine institutional buying or selling, or whether it was a low-conviction, thin-volume probe. The indicator classifies market structure as HH/HL (bullish) or LH/LL (bearish), detects Break of Structure (BOS) and Change of Character (ChoCH) events on bar close, and renders each swing zone with a color gradient that reflects the underlying volume delta of that leg.
The core problem this solves: most market structure tools draw lines or arrows at swing points but say nothing about the quality of that swing. A break of structure on rising volume is categorically different from one on declining volume — the first signals institutional participation, the second suggests a liquidity grab. VSE quantifies that difference on every bar.
Core Concepts
1. Non-Repainting Swing Detection
Swings are confirmed using a lookback comparison pattern that resolves only on bar close:
float H = ta.highest(high, i_len)
float L = ta.lowest(low, i_len)
bool new_sh = high == H and high < H
bool new_sl = low == L and low > L
A swing high at bar N-1 is confirmed when bar N closes lower, meaning the prior bar's high was the highest in the lookback window. This approach never repaints because it always references the closed bar to the left.
2. Volume Delta Accumulation Per Leg
Between each confirmed swing, running buy and sell volume totals accumulate. On each bar, if close >= open the bar's volume is classified as buy-side; otherwise it is sell-side. When a new swing is detected, the accumulated totals are saved to that swing node, and the counters reset for the next leg:
if new_sh or new_sl
run_buy := 0.0
run_sell := 0.0
if close >= open
run_buy += volume
else
run_sell += volume
The delta percentage (buy minus sell divided by total volume) determines the color and transparency of each swing zone box. A leg with 80% buy delta renders as a vivid bull green; a leg with 20% buy delta renders as a vivid bear red. Neutral legs render in the neutral color.
3. BOS and ChoCH Detection
Break of Structure fires when confirmed price closes through the most recent confirmed swing extreme in the opposite direction. Change of Character fires when the first break occurs against the established trend — the earliest signal that the dominant structure may be shifting. Both signals are barstate.isconfirmed, preventing any lookahead.
4. Structure Cloud
A fill between the last confirmed swing high and swing low creates a visual structure range that updates dynamically. The cloud color matches the current trend direction and serves as an at-a-glance bias indicator for the session.
Features
Swing Zone Boxes: ATR-scaled zone boxes at every confirmed swing, colored by the net buy/sell delta of the producing leg
Volume Delta Gradient: Zone colors range from deep bull green (high buy delta) to deep bear red (high sell delta), with transparency encoding conviction
BOS Lines: Dashed horizontal lines drawn at the level where a Break of Structure closes, with text label
ChoCH Highlight: Change of Character events highlighted with a distinct yellow-amber color to distinguish them from continuation BOS signals
Structure Connection Lines: Lines connecting consecutive swing nodes, colored by the delta of each leg
Structure Cloud: Gradient fill between the last swing high and low showing current structural range
Candle Coloring: Optional candle tinting by current trend direction
9-Row Dashboard: Displays trend bias, last swing high/low price levels, structure range percentage, BOS bull/bear counts, ChoCH count, last leg delta percentage, and total swing node count
Alerts: BOS bullish, BOS bearish, ChoCH bullish, ChoCH bearish
Input Parameters
Structure Detection:
Swing Length: Lookback bars for swing high/low detection (default: 20, range: 5-200). Higher values identify fewer, stronger structural swings. Lower values are more reactive.
Show BOS Lines: Toggle BOS line rendering (default: on)
Show ChoCH: Toggle Change of Character highlighting (default: on)
Structure Cloud: Toggle the fill between swing high and low (default: on)
Visualization:
Bullish / Bearish / Neutral / ChoCH colors: Fully customizable
Zone Transparency: Control the base transparency of swing zone boxes (default: 78)
Color Candles: Optional candle tinting by structural trend (default: off)
Dashboard:
Position: Top Right, Top Left, Bottom Right, Bottom Left (default: Top Right)
How to Use This Indicator
Step 1: Read the Current Structure
The dashboard shows the current trend bias (BULLISH / BEARISH / NEUTRAL), the last confirmed swing high and low prices, and the structural range as a percentage. This gives you the directional context at a glance.
Step 2: Interpret Zone Colors
Zones colored in vivid green (high buy delta) represent legs driven by institutional buying. Zones colored in vivid red (high sell delta) represent institutional selling pressure. Faded or gray zones represent low-conviction legs — useful for identifying weak structure that is more likely to be swept.
Step 3: Trade BOS and ChoCH Events
A BOS in the direction of the existing trend is a continuation signal. A ChoCH (against the trend) is a structural shift signal and often marks the beginning of a reversal. Volume delta on the breaking leg adds conviction: a BOS on a high-buy-delta leg is more reliable than one on a low-delta leg.
Step 4: Use Swing Zones as S/R
Each swing zone box represents a price area where a structural pivot occurred. Institutional order flow often returns to these levels. High-delta zones in particular tend to act as meaningful support or resistance.
Originality Statement
This indicator is original in its combination of confirmed non-repainting swing structure with per-leg volume delta measurement. While market structure tools and volume analysis tools each exist independently, this indicator is justified because:
Volume delta is computed per structural leg — not per candle and not as a global indicator — creating a direct mapping between market structure quality and institutional participation
The swing confirmation method using the lookback comparison pattern eliminates repainting while maintaining responsiveness to genuine structural changes
Zone color encoding with delta-driven gradient creates an immediate visual hierarchy — strong zones versus weak zones — without requiring separate panels or indicators
BOS and ChoCH detection with volume delta context provides a more complete signal than either alone
Limitations
The buy/sell volume classification (close >= open = buy) is an approximation. True tick-level direction is not available in Pine Script. On very short timeframes where volume is sparse, classification may be imprecise
Swing length selection significantly affects structure quality. Too short produces noise; too long misses intermediate structure. Users should calibrate to their timeframe and instrument
BOS and ChoCH are confirmed on bar close, so they are identified one bar after the actual breakout candle closes. This is a deliberate trade-off for accuracy over speed
The indicator does not predict direction — it classifies the current structural state. A bullish structure can break down without warning
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Past structural patterns do not guarantee future results. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Convergence Protocol [JOAT]
Convergence Protocol
Introduction
Convergence Protocol is an open-source strategy that combines four analytical modules — structural trend, volatility regime, delta pressure, and liquidity/structure break detection — into a multi-pathway entry and exit system. The strategy generates trade signals through five independent entry mechanisms, each requiring alignment between different analytical dimensions, and manages positions with ATR-based stops, dual take-profit levels, and an optional trailing stop that activates after the first target is reached.
The design rationale for combining these four modules is that each answers a different question about the market. Structure and trend analysis answers: what direction is the market likely to move? Volatility regime answers: does the market have the energy to sustain a directional move? Delta pressure answers: is volume supporting the proposed direction? Liquidity and structure break detection answers: has the market made a meaningful structural commitment that confirms directional intent? No single module alone provides a robust enough basis for a trade. Convergence across multiple modules provides a higher-quality signal set that reduces the frequency of marginal trades while maintaining enough opportunities to be practical.
Strategy Properties and Backtesting Settings
Default settings used for publication:
Initial Capital: Default PulseWire account size
Position Size: 5% of equity per trade
Commission: 0.04% per side (realistic for most crypto and equity platforms)
Slippage: 1 tick
Risk Per Trade: 5% of equity maximum (within sustainable limits)
Stop Loss: 1.5x ATR from entry
TP1: 1.2x risk (50% of position closed)
TP2: 2.5x risk (remaining position)
Trailing Stop: 1.0x ATR trailing offset, activates after TP1 hit
Backtesting results will vary significantly by instrument and timeframe. This strategy is intended to be evaluated across multiple instruments and market conditions before drawing conclusions. A single backtest run does not constitute evidence of future performance.
Core Modules
Module 1: Structural Trend Engine
The baseline uses a double-smoothed moving average (SMEMA). Swing highs and lows are tracked to classify market structure as bullish (HH+HL), bearish (LH+LL), or neutral. A 0-7 confluence score is assembled from: regime direction, structural alignment, volatility expansion, absence of squeeze, delta pressure, structure break confirmation, and liquidity sweep confirmation. Each module contributes a binary point to the score.
Module 2: Volatility Regime
Short-period ATR is compared to long-period ATR. A ratio above 1.05 with a rising oscillator confirms volatility expansion — the market has enough energy for directional moves. A squeeze condition (fast ATR well below slow ATR and its own moving average) signals that the market is coiling; entries are filtered or blocked depending on settings.
Module 3: Delta Pressure
Bar-by-bar delta (positive on bullish bars, negative on bearish bars) is smoothed into fast and slow EMAs. Their cross and relative position provide a directional bias from the volume perspective.
Module 4: Liquidity and Structure
A break of structure (BOS) is confirmed when price closes beyond the most recent pivot in any direction on a confirmed bar. Liquidity sweeps are detected when price wicks beyond a prior swing and closes back on the correct side. Both conditions contribute to the confluence score.
Entry Mechanisms
1. Confluence Score Entry
All four modules must be aligned and score at or above the minimum threshold (default: 2 of 7). This is the primary high-conviction entry.
2. Baseline Pullback Entry
In an established trend (regime confirmed), when price returns to within the step band of the baseline with positive delta confirmation, a pullback entry is generated. This produces more frequent entries by adding trend-continuation trades within an established directional move.
3. Squeeze Breakout Entry
When a detected squeeze condition resolves (squeeze ends) with trend and delta alignment, a breakout entry fires. This targets the expansion phase immediately following volatility compression.
4. Delta Crossover Entry
When the fast delta EMA crosses above the slow delta EMA in the direction of the regime, and the market is not in a squeeze, a momentum entry is generated.
5. Sweep Reversal Entry
When a liquidity sweep occurs with confirming delta pressure, a reversal entry is generated in the direction of the sweep reversal. This targets the classic sweep-and-go pattern.
Exit Logic
TP1: 50% of position closed at 1.2× risk. Locks in partial profit and reduces position size for the remainder of the trade
TP2: Remaining 50% targets 2.5× risk with a hard stop at the original stop level
Trailing Stop: After TP1 is hit, the strategy optionally converts to a trailing stop with an ATR-based offset, allowing the winning portion of the trade to capture extended moves
Regime Exit: If the market regime flips against the position (bullish regime while short, or bearish regime while long), the position is closed at market. This protects against holding trades through structural regime reversals
Limitations and Considerations
The strategy uses OHLCV-based calculations throughout. It does not have access to tick data, order book information, or real-time execution data that institutional traders use
Backtesting results are inherently optimistic due to perfect execution assumed at bar close prices. Real-world execution will differ
The five entry mechanisms produce different trade frequencies. Users should evaluate each mechanism independently in backtesting before enabling all simultaneously
The regime change exit can produce early exits in choppy markets where the regime briefly flips before resuming the original direction
The trailing stop activation after TP1 is a fixed ATR offset from the highest/lowest price reached. It does not adapt to subsequent volatility changes during the trade
The strategy is designed for trending markets. In persistent ranging environments, the confluence score-based entries will underperform because the regime module will frequently return a Ranging classification, suppressing primary entries
Commission and slippage settings in the strategy Properties should be adjusted to match the actual costs on the instrument and broker being used before drawing any performance conclusions
Originality Statement
This strategy is original in its specific multi-pathway entry architecture and the unified 0-7 confluence scoring system that synthesizes structural, volatility, delta, and liquidity analysis into a single conviction metric. Each of the five entry pathways serves a distinct market condition: confluence entries target high-alignment setups; pullback entries target trend continuation in established moves; squeeze breakout entries target volatility expansion transitions; delta crossover entries target momentum initiation; sweep reversal entries target institutional accumulation/distribution patterns. No single existing strategy approach covers all five scenarios. The combination is justified because these five market conditions occur at different points in the market cycle, and a strategy limited to one condition type will sit idle during the other four.
Disclaimer
This strategy is provided for educational and informational purposes only. Past backtest results do not guarantee future performance. No backtesting result should be interpreted as evidence that this strategy will be profitable in live trading. Markets change, and conditions that produced past results may not recur. The strategy does not account for taxes, broker requirements, or psychological factors in live trading. Always use proper risk management and consult with a qualified financial professional before making any investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

Candle Volume Architecture [JOAT]
Candle Volume Architecture
Introduction
Candle Volume Architecture is an overlay indicator that constructs a price-based volume distribution profile for each detected swing, identifies the Point of Control (the price level with the highest bar density within that swing), calculates a configurable Value Area (default 70% of distribution), and renders these findings as a visual volume architecture directly on the price chart. Unlike traditional Volume Profile tools that require fixed time periods or session boundaries, this indicator auto-detects swings from price action and builds its distribution profile dynamically around each structural move.
Volume Profile is a professional tool used to identify price levels with the highest historical trading interest. The Point of Control is the level within any period where the most trading occurred — it functions as a gravitational center that price tends to revisit. The Value Area contains the majority of trading activity and often provides support and resistance as price moves away from and returns to it. This indicator applies these concepts to auto-detected price swings rather than calendar periods, aligning the profile with actual market structure rather than arbitrary time divisions.
Core Concepts
1. Swing Detection
Swings are detected by tracking when price makes a new extreme and then retreats. An upper swing is confirmed when the prior bar's high matched the N-bar highest high, but the current bar fails to match — indicating the swing high has been set. The same logic applies to lower swings. This produces swing high and low markers that update as new extremes form.
2. Volume Distribution Profile
When a swing direction change is detected (bull to bear or bear to bull), the prior swing's price range is divided into a configurable number of bins (default 24). Each bin is populated by counting how many bars within the swing had their closing price fall within that bin's price range. The bin with the highest count becomes the Point of Control.
bin_size = (real_top - real_bot) / i_bins
for j = 0 to bars_in_range
idx = int((close - real_bot) / bin_size)
bins_count.set(idx, bins_count.get(idx) + 1)
3. Point of Control (POC)
The POC is the bin with the highest bar count. It is rendered as a dual-width line (thin solid + thick shadow) that extends forward in time, providing a live reference for where the most concentrated activity occurred in the last swing.
4. Value Area Calculation
Starting from the POC, the Value Area expands outward, adding the next highest-count bin on either side until the cumulative count reaches the configured percentage of total bars (default 70%). The Value Area is rendered as a transparent box covering the identified price range.
5. Profile Bin Visualization
Each bin is rendered as a box whose right edge extends proportionally to its bar count (wider = more activity). Opacity scales with count, so the POC bin is fully opaque and low-count bins are more transparent. This produces a horizontal bar chart appearance directly on the price chart.
Features
Auto-Detected Swing Profiles: Profile builds and renders at each swing direction change
Point of Control Line: Dual-width shadow line extending from each swing, updated to current bar
Value Area Box: Transparent zone covering the configurable percentage of swing volume
Opacity-Scaled Bin Bars: Visual profile bars with count-proportional width and transparency
Swing Range Outline: Dashed box delineating each swing's high-to-low range
Live Swing Direction Line: Current swing trend line drawn on the last bar
POC Proximity Detection: Dashboard highlights when price is within 0.3 ATR of the active POC
8-Row Dashboard: Swing trend, POC level, swing high/low, swing range, POC bias
Input Parameters
Swing Length: N-bar highest/lowest lookback for swing detection (default: 80)
Profile Bins: Number of price bins in the distribution (default: 24)
POC Line Width: Width of the POC rendering line (default: 2)
Value Area %: Percentage of distribution to include in the Value Area (default: 70%)
Show Profiles: Filter to bull only, bear only, both, or none
How to Use This Indicator
POC as Reference
The active POC line represents the most contested price level of the last swing. Price frequently revisits this level. When price is above the POC, the POC functions as potential support. When price is below, potential resistance.
Value Area as Context
Price outside the Value Area (above VAH or below VAL) represents a less-active price zone. Moves outside the Value Area that fail to hold can return toward the Value Area. Sustained acceptance outside the Value Area suggests a new distribution is forming.
Profile Shape for Sentiment
A profile that is skewed toward the top of its range (POC near the high) suggests the swing was dominated by higher-price acceptance — bullish distribution. A POC near the swing low suggests bearish distribution.
Limitations
The distribution is built from closing prices within the swing range, not from actual volume at price. This is a close approximation but differs from true Volume Profile tools that use tick data
The swing detection requires a minimum of swing-length bars before the first profile is generated
On very fast timeframes (1 minute or lower), the swing lengths may be too short to produce meaningful distributions
The maximum bars in range cap (500 bars) prevents the profile builder from analyzing excessively long swings that could cause performance issues
Originality Statement
Applying Volume Profile methodology to auto-detected price swings rather than fixed calendar periods produces profiles that are structurally relevant rather than time-arbitrary. The opacity-scaled bin rendering produces an intuitive visual representation where the most active levels are immediately obvious. The real-time POC proximity detection in the dashboard provides an active alert when price approaches the most significant level of the last swing.
Disclaimer
This indicator is for educational and informational purposes only. The distribution profiles are approximations built from close price counts, not true order flow data. Point of Control and Value Area levels are historical references and do not guarantee future price reactions. Always apply proper risk management.
-Made with passion by officialjackofalltrades
Indicator

Adaptive Fourier Transform CCI [QuantAlgo]🟢 Overview
The Adaptive Fourier Transform CCI reimagines the classic Commodity Channel Index by replacing its fixed lookback period with one that continuously adjusts to the market's own rhythm. Rather than measuring price deviation against an arbitrary static length, it first isolates the cyclical component of price action through a Discrete Fourier Transform, identifies which cycle period currently holds the most spectral energy, and then tunes the CCI calculation to that dominant period. The result is a momentum oscillator calibrated to the frequency structure of the instrument being traded, naturally tightening during fast, high-frequency regimes and widening during slower, drawn-out cycles without requiring manual timeframe adjustments.
🟢 How It Works
Before any cycle detection occurs, raw price is conditioned through two sequential filters. A high-pass filter strips the slow-moving trend component from the close, leaving only the oscillating portion of price action:
hp := 0.5 * (1 + a1) * (close - close ) + a1 * hp
That residual is then passed through a Super Smoother filter, which removes short-term noise from the cycle signal without introducing the lag that standard moving averages add at this stage:
filt := c1 * (hp + hp ) / 2 + c2 * filt + c3 * filt
This cleaned signal is what the Discrete Fourier Transform (DFT) operates on. The DFT scans across a range of candidate cycle periods and measures how much price energy is concentrated at each one. The period where that energy is strongest is selected as the dominant cycle. An EMA smooths the period output to prevent erratic length switching between bars, and the result is scaled by the Length Multiplier to derive the final adaptive CCI lookback:
adaptiveLen = clamp(round(dominantPeriod × lengthMult), 5, 60)
The CCI is then calculated using the standard Lambert formula over that adaptive length, measuring how far typical price has deviated from its mean relative to its average absolute deviation. An optional output smoothing MA reduces bar-to-bar noise before the final value is plotted.
🟢 Signal Interpretation
▶ Overbought (Above Upper Level, Red): When the Adaptive Fourier Transform CCI (AFT-CCI) rises above the upper threshold, price has deviated significantly above its cycle-adaptive mean. The reading reflects momentum extended relative to the market's current detected rhythm rather than a fixed arbitrary baseline. The signal carries more weight when the dominant cycle is stable and the DFT is locked onto a consistent frequency rather than switching between periods.
▶ Oversold (Below Lower Level, Green): When the AFT-CCI falls below the lower threshold, price has moved an equivalent distance below its cycle-adaptive mean. In strongly trending conditions the AFT-CCI can remain in either zone for extended periods, so the threshold levels should be read as zones of extension rather than automatic reversal points.
▶ Neutral Zone (Between Levels, Grey): When the AFT-CCI sits between the upper and lower thresholds, price deviation relative to the detected cycle is within normal range. Zero-line crosses within this zone indicate the adaptive mean is being reclaimed, which can serve as early directional context before a full threshold break develops.
▶ Zero Line: The zero line represents the adaptive mean itself. A cross above zero indicates typical price has moved above the cycle-adaptive mean; a cross below indicates the opposite. These crosses are lower-conviction reads on their own but become more meaningful when followed by a threshold break in the same direction.
🟢 Features
▶ Preconfigured Presets: Two parameter sets sit alongside the default configuration. "Fast Response" compresses the DFT window and cycle search range while raising the length multiplier, producing faster adaptation suited to intraday charts from 5-minute to 1-hour. "Smooth Trend" expands the window and search range while lowering the multiplier, establishing a more stable cycle read suited to daily and weekly position trading.
▶ Built-in Alerts: Six alert conditions cover the full range of meaningful oscillator events. Separate alerts fire on entering and exiting both overbought and oversold territory, capturing threshold breaks in both directions. Two additional alerts trigger on bullish and bearish zero-line crosses, enabling directional monitoring without requiring constant chart observation.
▶ Visual Customisation: Six colour presets, Classic, Aqua, Cosmic, Cyber, Neon, and Custom, apply consistently across the signal line, glow layers, and threshold level lines so the overbought and oversold colours remain coherent regardless of which preset is active. The optional neon glow effect uses three layered plots at increasing transparency to give the signal line visual depth and make threshold breaks immediately readable at a glance.
Indicator

Delta Pressure Gauge [JOAT]Delta Pressure Gauge
Introduction
Delta Pressure Gauge is a pane-based oscillator that constructs a volume-weighted directional wave from bar-by-bar delta estimation, normalized using a rolling maximum to ensure consistent scaling across all instruments and timeframes. The oscillator measures the pressure imbalance between buying volume and selling volume, smoothed into a wave that reveals accumulation and distribution phases with high visual clarity. The indicator includes a money flow pressure line, a cumulative windowed delta cloud, divergence detection, and crossover signal dots.
Traditional volume indicators — OBV, CMF, MFI — measure volume flows using raw or price-weighted calculations that are difficult to compare across instruments or timeframes because their absolute values depend on the asset's volume profile. Delta Pressure Gauge normalizes everything to a -1 to +1 scale using a rolling maximum, producing readings that are immediately interpretable regardless of whether the asset trades 100 shares or 100 million. The wave design provides a visual rhythm that makes accumulation and distribution phases recognizable at a glance.
Core Concepts
1. Body-Quality Weighted Bar Delta
Each bar contributes a delta value based on direction (bullish = +volume, bearish = -volume) multiplied by the bar's body quality ratio (body size divided by total range). A full-body bar contributes 100% of its volume to delta. A doji bar with no body contributes 0%. This filtering reduces the noise contribution of indecision bars that add volume without directional information.
body_qual = math.abs(close - open) / math.max(high - low, syminfo.mintick)
bar_delta = bar_dir * volume * body_qual
2. Rolling Maximum Normalization
The raw wave EMA is normalized by dividing by the rolling maximum absolute value over the normalization window. Unlike percentile-based normalization, rolling maximum works reliably from the first bar, requires no minimum warmup period, and produces values that are always within the -1 to +1 range:
norm_ref = ta.highest(math.abs(raw_wave), i_norm)
wt1 = raw_wave / math.max(nz(norm_ref, 1.0), 1.0)
3. Windowed Cumulative Delta
Rather than using an all-time cumulative delta (which grows without bound and becomes dominated by early bars), the cumulative component uses a 30-bar rolling sum. This produces a medium-term delta bias that reflects the recent directional commitment of volume participants.
4. Money Flow Pressure Line
A separate money flow calculation weights volume by the ratio of price movement to range: (close - open) / range × volume. This captures the efficiency of price movement relative to its volume cost — high-momentum bars have larger weights than range-bound bars.
5. Divergence Detection
Bullish divergence is detected when the delta wave makes a higher low while price makes a lower low. Bearish divergence is the mirror. Detection uses confirmed pivot points on the wave with persistent previous-pivot storage, avoiding any ta.valuewhen type compatibility issues. Divergence lines are rendered directly on the oscillator pane.
Features
Wave Oscillator: Gradient area fill between wave and zero, color-coded by direction and intensity
Signal Line: Smoothed signal with direction-colored rendering
Histogram: Four-state colored momentum bars showing wave-signal separation and its rate of change
Crossover Dots: Large circles with glow rings at every wave/signal crossover
Zero-Line Cross Dots: Small markers when wave crosses the zero line
Overbought/Oversold Extreme Dots: Markers at extreme readings
Divergence Triangles and Lines: Yellow markers and connecting lines when divergence is detected
Cumulative Delta Cloud: Area fill showing 30-bar rolling delta direction
Money Flow Line: Purple secondary line for cross-confirmation
Volume Surge Markers: Cross markers when volume exceeds 2x average
12-Row Dashboard: Pressure state, wave values, histogram, signals, cumulative delta, money flow, volume ratio, divergence state
Input Parameters
Wave Channel Length: Fast EMA for wave construction (default: 10)
Wave Average Length: Signal line smoothing period (default: 21)
Rolling Norm Window: Window for rolling maximum normalization (default: 100)
Overbought/Oversold levels: Four configurable threshold lines
Divergence pivot lookback settings
How to Use This Indicator
Crossover Dots as Momentum Shifts
When the wave crosses above the signal line (green dot), buying pressure is accelerating relative to the smoothed baseline. This confirms a momentum pickup. The opposite for bearish crosses. These signals are strongest when they occur near or below the oversold line.
Zero-Line Confirmation
The wave crossing zero from below indicates that aggregate buying pressure over the wave window has turned net positive. This is a regime confirmation, not an entry signal in isolation, but it supports bullish bias when aligned with price structure.
Divergence at Extremes
Divergence is most meaningful when the wave is at or near an overbought or oversold extreme. A bullish divergence from the oversold zone (yellow triangle pointing up) suggests the distribution of buying pressure is shifting despite continued price weakness.
Cumulative Delta Direction
The blue-purple cloud shows whether the 30-bar rolling delta is net positive or negative. When the wave crosses bullishly and the cumulative delta is also positive, both the momentum and the persistent pressure agree.
Limitations
This indicator uses close-open direction to estimate bar delta. True bid-ask volume data (available only through specialized data providers) would be more precise. On instruments with significant wick activity (doji bars), this estimation introduces noise
Normalization by rolling maximum means a single extreme bar sets the scale for the entire norm window. One unusually large volume bar will compress all surrounding readings
Divergence detection requires enough bars for pivot confirmation. The pivot right-side lookback introduces a lag in divergence signals
This indicator measures volume pressure proxies, not actual institutional activity. Large volume does not always reflect institutional intent
Originality Statement
The body-quality weighting applied before delta smoothing is a deliberate design choice that reduces doji noise in a way that raw-volume or typical-price approaches do not. The rolling maximum normalization (rather than percentile or z-score) was chosen specifically because it operates reliably from the first bar without a warmup cliff, making the indicator immediately usable on limited datasets. The combination of a wave oscillator, cumulative delta cloud, and money flow line on a single pane provides three independent perspectives on the same underlying volume pressure question.
Disclaimer
This indicator is for educational and informational purposes only. Volume pressure readings are estimates derived from OHLCV data. They do not represent actual order flow or institutional positioning. Past divergence patterns do not predict future price reactions. Always apply appropriate risk management.
-Made with passion by officialjackofalltrades
Indicator

Liquidity Contour Engine [JOAT]
Liquidity Contour Engine
Introduction
Liquidity Contour Engine is an overlay indicator that identifies two distinct institutional price phenomena: liquidity sweeps at swing highs and lows, and order blocks formed before impulsive structural moves. Liquidity sweep zones mark levels where price reached beyond a prior swing, triggering stop orders, then reversed — the classic footprint of a sweep-and-reversal sequence. Order block zones mark the last opposing candle before a significant directional impulse, representing the area where a large position was initiated.
The underlying premise is that institutions build and exit positions through order flow that leaves identifiable marks on the chart. A liquidity sweep is one such mark: price extending beyond a well-established swing level, clearing stops, then reversing. This behavior is not random — it reflects deliberate order accumulation at levels where retail stops cluster. Similarly, order blocks at the origin of impulsive moves may act as re-entry areas when price later returns to them.
Core Concepts
1. Confirmed Swing Pivot Detection
Swings are identified using ta.pivothigh and ta.pivotlow with a configurable lookback. All pivot detections are confirmed — offset by the lookback bars — meaning no repainting occurs. Only when sufficient bars have closed on both sides of a potential pivot is it registered.
2. Liquidity Sweep Detection
A bullish sweep is confirmed when: price wicks below the most recent swing low by at least a configurable ATR multiple, and the bar closes back above that swing low. This captures the wick-past-and-close-back pattern that characterizes institutional accumulation at liquidity levels. A bearish sweep is the mirror condition at swing highs.
Upon detection, a zone is created at the swept level, rendered as a dual-width line (thin solid + thick transparent shadow). Zones remain active until price sustains a close beyond the swept level by 0.5 ATR, at which point they convert to dotted lines (mitigated state).
3. Order Block Detection
An order block is identified as the prior N candle(s) before a structural impulse. A bullish impulse is defined as a bar that closes above the most recent swing high. The order block is the last candle body before that impulse, rendered as a filled box from body open to the wick high. Mitigation occurs when price closes beyond the 50% level of the order block body, fading the box to indicate the zone has been traded through.
4. Zone Lifecycle Management
The indicator uses arrays to track active zones and enforces a maximum count. When the maximum is exceeded, the oldest zone is removed from the chart. This prevents chart clutter while keeping the most recent and relevant zones visible.
Features
Liquidity Sweep Zones: Dual-width line rendering at swept swing levels, self-managing lifecycle
Order Block Boxes: Filled zones at order block origin, with mitigation fading
Swing Level Dotted Lines: Current swing high and low extensions as dotted reference lines
9-Row Dashboard: Sweep state, active zone counts, order block counts, last swing levels
Configurable ATR Threshold: Adjusts how far price must reach beyond a swing to qualify as a sweep
Max Zone Limit: Prevents chart clutter with configurable maximum active zone count
Input Parameters
Swing Lookback: Bars required each side for pivot confirmation (default: 8)
Sweep ATR Threshold: Minimum sweep distance in ATR units (default: 0.3)
Max Active Zones: Maximum concurrently displayed liquidity zones (default: 8)
ATR Period: Period for ATR calculation (default: 14)
Show Order Blocks: Toggle order block rendering
OB Lookback: How many bars back to identify the order block candle (default: 3)
How to Use This Indicator
Sweep-and-Reverse Setups
When a bullish sweep fires (price wicked below a swing low and closed back above), the zone represents the level where stops were taken. If price subsequently builds structure above that zone and delta pressure is positive, the setup is a potential long entry with the swept level as reference for the stop.
Order Block Re-Tests
When price returns to a bullish order block zone (shown in teal), it is revisiting the area where an institutional position was likely initiated. If the zone has not been mitigated (box remains filled), a reaction from that zone is plausible. A mitigated order block (faded) is a less reliable reference.
Zone Confluence
When a liquidity sweep zone and an order block coincide at the same price level, the confluence represents a stronger structural reference than either zone alone.
Limitations
Swing pivot confirmation introduces a bar lag equal to the lookback period. Sweeps and order blocks are identified after the fact, not in the moment they form
Not every liquidity sweep produces a reversal. Price can continue through a swept level without reversing
Order block identification is mechanical and cannot account for all institutional order placement strategies
On higher timeframes, zones cover wider price ranges and may require adjustment of the ATR threshold
Originality Statement
The unified framework for tracking liquidity sweeps and order blocks within a single indicator with a shared zone lifecycle management system is the original design contribution. Zone mitigation logic that converts active zones to passive reference lines (rather than deleting them) preserves structural context while visually indicating that a zone's primary relevance has passed. The dual-width shadow line rendering for sweep zones provides depth that distinguishes them clearly from standard horizontal lines.
Disclaimer
This indicator is for educational and informational purposes only. Liquidity sweep detection describes a pattern in historical price data. Past occurrences of this pattern do not guarantee future reactions. Order blocks are hypothetical areas of interest, not confirmed institutional levels. Always use proper risk management.
-Made with passion by officialjackofalltrades
Indicator

Session Strata Mapper [JOAT]
Session Strata Mapper
Introduction
Session Strata Mapper is an overlay indicator that tracks three critical intraday price levels in real time: the Premarket session range (04:00-09:30 ET), the Initial Balance range (09:30-10:30 ET), and the Previous Day's high, low, and midpoint. These levels are rendered as dynamic zones that expand as each session progresses and extend as horizontal reference lines throughout the trading day. Extension projections above and below the Initial Balance provide potential target levels based on the established morning range.
Session-based levels represent areas where institutional participation was concentrated during distinct time periods. The premarket range reflects the overnight positioning of market participants before retail hours begin. The Initial Balance captures the price range set by the first hour of regular trading, a period often dominated by institutional order flow. Violations of these levels, especially when accompanied by volume, frequently signal meaningful directional commitment from large participants.
Core Concepts
1. Session Detection and Range Building
Sessions are detected using PulseWire's time() function with a configurable timezone (default: America/New_York). The premarket range builds bar by bar during the 04:00-09:30 window, tracking the running high and low. The Initial Balance does the same during 09:30-10:30. All objects (boxes, lines, labels) update in real time as each session progresses.
2. Initial Balance Extensions
The IB range can optionally project extension levels above and below at 0.5x IB multiples. Extensions are labeled IB +1x, IB +2x, etc. These project the IB range beyond the session boundaries and serve as potential continuation targets when price breaks from the IB.
3. Previous Day Levels
The previous trading day's high, low, and midpoint are tracked by detecting session-start bars and storing the completed day's range. These levels extend throughout the current session as dashed reference lines and are updated at the start of each new day.
4. Zone Boxes and Line Rendering
Each session's range is rendered as a filled zone box that expands during the session and then remains fixed after the session ends. Horizontal lines extend from the session boundaries into the future trading period, providing ongoing reference as price interacts with those levels throughout the day.
Features
Premarket Range Zone: Live-building box with high, low, and optional midpoint lines
Initial Balance Zone: Live-building box with high, low, midpoint, and extension projections
Previous Day Levels: Prior session high, low, and midpoint as dashed reference lines
Extension Lines: Up to 4 levels of IB extension projections with optional labels
Dashboard: Real-time level values and whether price is currently above or below each key level
Configurable Timezone: Works for multiple market sessions globally
Label Size and Line Width Controls
Input Parameters
Timezone: Market-specific timezone for session detection
Show Premarket, IB, Previous Day: Individual toggles
IB Extension Levels: Number of extension multiples to show (0-4)
Color inputs for each session type
Label size and line width settings
How to Use This Indicator
Premarket Range as Reference
Price trading above the premarket high at the regular session open is constructive. A break below the premarket low often draws bearish attention. The premarket midpoint frequently acts as intraday support or resistance.
Initial Balance Breakouts
When price breaks above the IB high with momentum, the extension levels provide natural targets. An IB high breakout that reaches IB +1x suggests continuation may carry to IB +2x. Reversals from IB extension levels are also common.
Previous Day Level Confluences
When the premarket or IB range aligns closely with the previous day's high or low, that confluence represents an area where two independent session-based reference points agree — a stronger potential reaction zone.
Limitations
Session detection requires intraday data. The indicator is not meaningful on daily or higher timeframes
Some brokers and data providers do not include premarket data. On charts without premarket bars, the premarket range will be empty
Extension levels are mechanical projections of the IB range. They are reference points, not guaranteed targets
The Previous Day tracking resets on each new session. On instruments that trade continuously (such as some crypto markets), the day boundary is user-defined by the timezone setting
Originality Statement
The integration of three distinct session types (premarket, initial balance, and previous day) within a single dynamically updating visualization system provides a consolidated view that would otherwise require multiple separate tools. The live-expanding zone boxes with simultaneous line extension represent a unified approach to session level tracking. The IB extension projection system is built around the specific multiples used by institutional traders who apply IB methodology.
Disclaimer
This indicator is for educational and informational purposes only. Session levels are historical reference points and do not predict future price reactions. Price can and regularly does pass through any level without reaction. Use in conjunction with other analysis and always apply proper risk management.
-Made with passion by officialjackofalltrades
Indicator

Volatility Terrain Engine [JOAT]
Volatility Terrain Engine
Introduction
Volatility Terrain Engine is a pane-based oscillator that measures the current volatility regime using the ratio between a fast ATR and a slow ATR, combined with a percentile rank of current volatility within a historical window. The indicator classifies every bar into one of three states — Expansion, Compression, or Transition — and identifies squeeze conditions (volatility compressing well below its average) and expansion bursts (volatility accelerating rapidly). The oscillator, centered at zero, makes it immediately clear whether volatility is expanding or contracting relative to its baseline.
Volatility regime is one of the most underappreciated dimensions of market analysis. A trend-following strategy applied during volatility compression produces poor results because the market is not moving directionally with sufficient energy. A mean-reversion strategy applied during volatility expansion gets stopped out repeatedly because the market is generating outsized moves. Identifying the current volatility terrain before applying any strategy is a prerequisite for selecting the appropriate approach.
Core Concepts
1. Fast/Slow ATR Ratio
The primary oscillator compares a short-period ATR (default 14) against a long-period ATR (default 100). Their ratio, centered at 1.0, is shifted to center at 0.0 by subtracting 1. Values above 0 mean recent volatility is expanding relative to the longer-term baseline; values below 0 mean it is contracting. This ratio is more informative than ATR alone because it provides context — the same ATR value means different things in a historically volatile versus historically calm market.
2. Percentile Rank
The ATR percentile rank answers: where does today's volatility sit within its historical distribution? A 90th percentile reading means volatility is higher than 90% of observations in the lookback period. This is used to classify whether the current environment is historically extreme or within normal parameters.
3. Squeeze and Expansion Burst Detection
A squeeze is defined as fast ATR falling below 82% of slow ATR and also below its own 20-bar average. This double condition filters single-bar dips. A squeeze represents stored energy — the market is coiling. An expansion burst is defined as the ATR ratio exceeding 1.25 with the fast ATR making successive higher values. This marks the initial stages of a volatility explosion.
4. Signal Line and Histogram
The oscillator is triple-processed: EMA of ratio → SMA signal → histogram. The histogram shows the divergence between the oscillator and its signal, providing a leading read on whether volatility momentum is building or fading.
Features
Volatility Regime Oscillator: Gradient-colored histogram bars centered at zero
Squeeze Detection: Dashboard alert and dot marker when squeeze conditions are active
Expansion Burst Markers: Dot markers when volatility breaks out from compression
ATR Percentile Band: Normalized ATR rank plotted as a secondary line
Zone Fills: Expansion and compression zones filled with transparent color
8-Row Dashboard: Regime, ATR values, ratio, percentile rank, squeeze status, oscillator values
Input Parameters
Fast ATR Period: Short-term volatility measurement (default: 14)
Slow ATR Period: Long-term volatility baseline (default: 100)
Percentile Lookback: Historical window for rank calculation (default: 252)
Signal Smoothing: Signal line period (default: 9)
Expansion, Compression, and Transition color inputs
How to Use This Indicator
Compression → Expansion Transition
The most significant signal is when a squeeze resolves into an expansion burst. This represents a volatility state change — the market has been coiling and is now releasing energy. The direction of that release is not predicted by this indicator; it must be determined using price structure and other context.
Oscillator Zero Cross
The oscillator crossing from negative to positive territory indicates that short-term volatility has exceeded the long-term baseline. This is not a trade signal — it is a condition indicator confirming that the market is entering a higher-energy phase.
High Percentile + Expansion
When the oscillator is in expansion territory and the ATR percentile rank is above 80, the market is experiencing historically significant volatility. Stops must be sized accordingly.
Limitations
ATR is backward-looking. Sudden volatility spikes from news events will appear in the oscillator only after those bars close
The squeeze condition uses fixed multipliers (0.82 for the ATR ratio threshold). Markets with different typical volatility profiles may require adjustments to these thresholds
The percentile lookback of 252 bars requires approximately one year of daily data or equivalent for the rank to be historically meaningful. On shorter data sets the rank will be computed on whatever bars are available but will be less statistically robust
This indicator classifies current conditions only. It does not predict when a squeeze will resolve or in which direction
Originality Statement
The dual-ATR ratio approach combined with percentile ranking provides more contextual information than either measure alone. The squeeze detection using a double condition (ratio below threshold and below its own moving average) produces more reliable squeeze identification than a single-condition approach. The four-state histogram coloring (expanding positive, fading positive, expanding negative, fading negative) provides more nuanced momentum information than standard positive/negative coloring.
Disclaimer
This indicator is for educational and informational purposes only. Volatility regime classification does not predict price direction. A squeeze does not guarantee a subsequent expansion, and the direction of any expansion is unknowable from volatility data alone. Always use appropriate risk management.
-Made with passion by officialjackofalltrades
Indicator

Structural Momentum Bias [JOAT]
Structural Momentum Bias
Introduction
Structural Momentum Bias is an overlay indicator that combines pivot-based market structure classification with a double-smoothed momentum band system to identify the current market regime and its directional bias. The indicator continuously tracks swing highs and lows, classifies them as higher highs, lower highs, higher lows, or lower lows, and scores momentum strength on a 0-5 scale using band position and structure alignment. A break-of-structure detection system marks confirmed liquidity shifts in real time.
The core problem this indicator addresses is the disconnect between price structure and momentum. Many traders either follow structure without measuring momentum strength, or use oscillators without understanding what market structure those signals occur within. This indicator unifies both, producing a regime label (Bullish, Bearish, or Ranging) backed by a quantified score. A regime classification without a corresponding score is ambiguous. A score without regime context is incomplete. Together they provide a clearer picture of where the market is and how strongly it is in that state.
Core Concepts
1. Double-Smoothed Baseline (SMEMA)
The baseline uses a two-pass smoothing method: an EMA applied to price, followed by an SMA applied to that EMA. This reduces noise while maintaining responsiveness. It outperforms a simple MA in choppy markets because the double-pass eliminates high-frequency oscillations that cause false regime flips. The baseline slope (rising or falling) is one input into the regime classification.
2. Dynamic Step Channel
The channel bands are not fixed multiples of ATR. Instead, they use the 100-bar average of the high-low range as the step unit, producing three tiers of bands above and below the baseline. This approach adapts to each instrument's natural swing amplitude without requiring manual calibration per market. Each band tier has a gradient color that intensifies as price approaches that level from within the channel, providing visual distance context.
3. Pivot-Based Structure Classification
Swing highs and lows are identified using confirmed pivots (lookback left and right bars). The indicator classifies the relationship between successive pivots as HH (higher high), LH (lower high), HL (higher low), or LL (lower low). These four states are combined to determine whether structure is bullish (HH + HL), bearish (LH + LL), or mixed. Importantly, pivot detection is offset by the lookback period, so no repainting occurs — a pivot is only confirmed when enough subsequent bars have closed to validate it.
4. Momentum Strength Score (0-5)
The score adds one point for each of: price above band tier 1, price above band tier 2, price above band tier 3, higher high present, and higher low present (inverted for bearish scoring). This produces a 0-5 integer that quantifies how strongly the market is expressing the current regime. A score of 5 in a bullish regime means price is extended above all three band tiers with confirmed higher highs and higher lows — a strongly trending condition. A score of 1 or 2 suggests marginal or weakening conditions.
5. Break of Structure (BOS) Detection
A bullish BOS is confirmed when price closes above the most recent swing high on a confirmed bar. A bearish BOS is confirmed when price closes below the most recent swing low. The BOS line is drawn from the pivot bar to the current bar and extends right, with a thick transparent shadow line providing visual depth. BOS detection only fires on barstate.isconfirmed, preventing any repainting.
Features
Regime Dashboard: 9-row dark-themed table showing regime, baseline direction, bull score, bear score, structure state, ATR, and last BOS
Dynamic Momentum Bands: Six gradient-colored bands (three above, three below) that visually represent price position within the momentum channel
SMEMA Baseline: Color-coded by regime, changes in real time as regime shifts
Break of Structure Lines: Thin solid + thick ghost dual-line rendering at confirmed structural breaks, extending to the current bar
Confirmed Pivot Dots: Small circles at each confirmed swing high and low, plotted at the exact pivot bar
Bar Coloring: Candles are colored by current regime state
Band Fill Gradients: Fill between band tiers intensifies based on price proximity
Input Parameters
Structure Settings:
Pivot Lookback: Number of bars left and right required to confirm a pivot (default: 5)
Baseline Length: Period for the SMEMA double-smoothed baseline (default: 10)
Show Structure Breaks: Toggle BOS line rendering
Visual Settings:
Dashboard toggle and position
Momentum Bands toggle
Bullish, Bearish, and Ranging color inputs
How to Use This Indicator
Step 1: Read the Regime
The dashboard label and bar coloring immediately show the current regime. Bullish requires the baseline to be rising and a momentum score of 2 or more.
Step 2: Assess Score Strength
A score of 4-5 indicates a well-developed trend with band extension and confirmed structure. A score of 1-2 suggests the regime is marginal and may not sustain.
Step 3: Watch for BOS Events
A BOS in the direction of the regime adds confirmation that a structural shift has occurred. A counter-regime BOS is an early warning that conditions may be changing.
Step 4: Use Bands for Context
Price returning to the baseline from above in a bullish regime is a potential pullback entry area. Price extending above band tier 2 or 3 suggests overextension.
Limitations
The pivot confirmation delay (lookback bars) means BOS signals and pivot markers appear several bars after the actual swing point. This is a deliberate design choice to prevent repainting
The regime score of 2 as the minimum threshold for classification means borderline conditions will oscillate between Ranging and a directional regime on consecutive bars
The SMEMA baseline is smoother than a standard EMA but still lags price. In fast-moving markets this lag may cause regime flips after significant portions of a move have already occurred
Band width is determined by the 100-bar average of bar ranges. In markets with sudden volatility regime changes (such as after news releases), the bands may not reflect the new volatility environment for many bars
Originality Statement
This indicator is original in its specific combination of elements and the scoring framework it produces. The justification for combining structure detection with a band-based scoring system is that neither component alone provides actionable context. Structure alone (HH/HL) says direction but not strength. Bands alone say relative position but not structural validity. The 0-5 score synthesizes both into a single conviction metric. The double-smoothed baseline (EMA of EMA, then SMA) is a deliberate design choice that reduces false regime flips without the extreme lag of longer single-pass averages. The dynamic step channel uses bar range (not ATR) as its unit, which scales naturally with each instrument's price action characteristics.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Past structural patterns do not guarantee their repetition. A bullish regime classification does not predict future price direction. Always apply proper risk management. The author is not responsible for any trading losses.
-Made with passion by officialjackofalltrades
Indicator

Adaptive Regime Momentum [JOAT]Adaptive Regime Momentum
Introduction
The majority of publicly available trend-following strategies rely on one of two entry mechanisms: a moving average crossover, or a price-versus-MA relationship. These are valid starting points, but they share a common weakness — they fire signals based on a single confirmatory condition that can be triggered by brief, low-conviction price moves. A single bar pushing above a moving average while volume is thin and the MA is barely sloping is not the same market condition as a sustained directional move with volume behind it and a clearly sloping MA. Yet a simple strategy would treat both identically.
Adaptive Regime Momentum is a trend-following strategy that requires three independent conditions to align before generating an entry signal. These three layers — MA slope confirmation over multiple consecutive bars, price position relative to the MA, and a volume-based demand filter — must all agree simultaneously. The result is a strategy that generates fewer signals but with higher internal consistency between entry conditions. It is designed for liquid markets on daily or higher timeframes where each component is reliably measurable.
This is an overlay strategy — all visuals are plotted directly on the price chart.
---
Strategy Properties
The following default settings are used for all backtests unless modified:
Initial capital: $10,000
Position sizing: 5% of equity per trade
Commission: 0.05% per side
Pyramiding: 0 (only one open position at a time; new signals are ignored while a position is active)
Stop loss: 2.5x ATR below the entry price (long), 2.5x ATR above the entry price (short), calculated from strategy.position_avg_price
Take profit: 4.0x ATR above the entry price (long), 4.0x ATR below the entry price (short), calculated from strategy.position_avg_price
Trail / slope exit: Position is closed early if price crosses to the wrong side of ComboMA ± 1.5x ATR, or if the MA slope reverses direction
The stop and take profit are anchored to strategy.position_avg_price — the actual average fill price of the position — rather than the signal bar's close. This ensures that in backtesting, stop and TP distances are measured from where the trade was actually opened, not from a theoretical signal level.
These are backtesting defaults only. They do not represent a recommendation for live trading position sizing or risk management.
---
Core Concepts
Signal 1 — ComboMA Slope Confirmation (Structural Momentum)
The ComboMA is a blend of two moving averages:
ALMA (Arnaud Legoux Moving Average) — a smooth MA with reduced lag, fitting to recent price without overreacting to single bars
ZLMA (Zero-Lag Moving Average) — a lag-compensated MA designed to reduce the delay between price movement and MA response
The two are blended into a single ComboMA value. The slope of this composite is then evaluated not just on the current bar, but across the last N consecutive bars (default: 3). A slope is only confirmed as UP if all of the last 3 bars showed a positive slope. A slope is only confirmed as DOWN if all 3 bars showed a negative slope. A single slope fluctuation — even if the most recent bar shows a positive slope — does not trigger confirmation unless all N bars agree.
This multi-bar slope confirmation is the primary mechanism that distinguishes this strategy from a simple MA-based entry. A one-bar slope flip that immediately reverses is filtered out. Only a sustained slope direction triggers the first condition.
Signal 2 — Price vs. ComboMA (Real-Time Confirmation)
The second condition requires that price is currently on the correct side of the ComboMA:
For a long: close > ComboMA
For a short: close < ComboMA
This condition is evaluated at the current bar, providing real-time confirmation that price is aligned with the structural slope direction. The MA slope could be upward from prior bars, but if price has already pulled back below the MA, the second condition vetoes the entry. Both the historical slope and the current price position must agree.
Signal 3 — Volume RSI (Demand Pressure Validation)
Volume RSI is RSI applied to raw volume over an 8-bar period, then divided by 50. A result above 1.0 (the default threshold) means the Volume RSI is above 50 — indicating that volume activity on recent bars has been relatively elevated compared to the preceding period.
For a long entry: Volume RSI / 50 must exceed the threshold
For a short entry: same condition applies
Volume RSI does not confirm direction — it confirms participation . A move accompanied by above-average volume has more demand/supply backing than a low-volume drift. When volume is below threshold, the third condition is not met and no entry is generated, even if slope and price position align.
RSI Filter
An additional RSI filter is applied to the close:
RSI(14) must be above 50 for long entries
RSI(14) must be below 50 for short entries
This acts as a momentum gating condition — confirming that short-term momentum is consistent with the trade direction before entry is permitted.
Non-Repainting Execution
All entry conditions are gated by barstate.isconfirmed . No signal is generated until the current bar has fully closed. This prevents intra-bar signal flickering and ensures that the backtest accurately represents what would have been traded on confirmed bar closes.
---
Exit Logic
The strategy uses a layered exit system combining fixed risk-defined targets with adaptive trend exits:
Fixed exits (via strategy.exit):
Stop loss at 2.5x ATR from entry price
Take profit at 4.0x ATR from entry price
Trail exits (via strategy.close):
Price closes beyond ComboMA ± 1.5x ATR on the wrong side
The ComboMA slope reverses (multi-bar confirmation fails in the opposite direction)
The trail exit allows winning positions to exit earlier if the trend deteriorates before reaching the fixed take profit, while the fixed TP provides a defined maximum target. The stop loss is the unconditional floor regardless of trail conditions.
---
ATR Shadow Visual
The chart displays two layers of ATR bands around the ComboMA:
Inner band: ComboMA ± 1x ATR
Outer band: ComboMA ± 2x ATR
These bands give a visual read of how extended price is from the MA relative to recent volatility, and where the trail exit threshold sits (1.5x ATR, between the two bands). They are visual aids only and do not affect strategy logic.
---
Performance Table
A table is displayed on the chart showing current strategy metrics:
Net P&L
Open P&L (current unrealized)
Win Rate
Average winning trade
Average losing trade
Maximum drawdown
Total trades
Current position direction
Current MA slope status
---
Features
Three-layer entry confirmation: multi-bar MA slope, price vs. MA, and Volume RSI
RSI momentum filter as an additional gating condition
ALMA + ZLMA blend for the ComboMA, reducing lag without sacrificing smoothness
Multi-bar slope confirmation preventing single-bar slope flickers from triggering entries
ATR-based stop and take profit anchored to actual fill price via strategy.position_avg_price
Trail exit on slope reversal or price-vs-MA breach
Non-repainting: all signals confirmed via barstate.isconfirmed
Pyramiding disabled — one position at a time
ATR shadow bands for visual context around the ComboMA
Live performance table with key metrics
---
Input Parameters
ALMA / ZLMA settings — length, offset, and sigma for each MA component
Slope Confirm Bars (default 3) — consecutive bars of slope agreement required for confirmation
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.0) — Volume RSI / 50 minimum for the demand filter
RSI Length (default 14) — RSI period for the momentum filter
ATR Length — period for ATR used in stop, TP, trail, and visual bands
Stop Multiplier (default 2.5) — ATR multiplier for the fixed stop loss
TP Multiplier (default 4.0) — ATR multiplier for the fixed take profit
Trail Multiplier (default 1.5) — ATR multiplier for the trail exit threshold
---
How to Use
Apply to daily or higher timeframes on liquid instruments. Volume RSI is most meaningful where volume data is consistent and representative of actual market participation.
Allow the chart to load sufficient historical bars before evaluating backtest results. The ComboMA slope confirmation requires multiple bars of agreement, and early bars in the dataset may not reflect the strategy's typical behavior. Aim for at least several hundred bars of data for meaningful backtest statistics.
Review the performance table while backtesting to understand average win size relative to average loss, drawdown, and total trade count. A strategy with very few trades may show favorable metrics by chance rather than edge — consider whether the trade count is sufficient to draw conclusions.
The default 5% equity position size produces moderate equity curve sensitivity. Smaller sizes will reduce drawdown and return proportionally; larger sizes will amplify both.
Commission is set to 0.05% per side (0.1% round trip) by default. Adjust this to match your actual trading costs. Higher commission rates — especially relevant for frequent-trading timeframes — will reduce net results.
Do not optimize parameters on the same data you use to evaluate performance. Optimization on historical data produces settings tuned to past noise, not future edge.
The trail exit on slope reversal means that strongly trending markets where the MA briefly flattens before resuming may see early exits. This is the tradeoff for using slope as an exit condition.
---
Limitations
Backtest results are calculated on historical data and do not guarantee future performance. Market conditions change, and a strategy that performed well in a particular regime may perform differently as conditions evolve.
The Volume RSI filter requires reliable volume data. This strategy is not recommended for synthetic instruments, CFDs where volume represents contracts rather than underlying market activity, or very short intraday timeframes where volume is fragmented and noisy. On such instruments, the third entry condition may be meaningless or misleading.
The multi-bar slope confirmation requirement means the strategy will miss fast, sharp trend initiations where the MA slope has not yet had N bars to confirm. This is a deliberate tradeoff — reducing false entries at the cost of some late entries on fast moves.
Pyramiding is disabled. The strategy will not add to winning positions. This limits upside during strongly trending markets where additional entries might be beneficial, but it also limits drawdown from compounding positions that subsequently reverse.
ATR-based stops and TPs are fixed at entry. They do not adjust after the trade is open (apart from the trail exit). If volatility expands significantly after entry, a 2.5x ATR stop that was appropriate at entry may become relatively tight.
The performance table reflects cumulative backtest results as of the current bar. Results will vary across different lookback windows and instruments.
Default capital of $10,000 with 5% equity sizing means each trade risks approximately $500 before the stop is hit (assuming stop is the loss floor). This is a backtesting convention — it is not a recommendation for live account sizing.
No strategy produces guaranteed results. The three-layer entry system improves internal signal consistency but cannot eliminate the inherent uncertainty of financial markets.
---
Originality Statement
Standard MA-based trend strategies treat a single bar's price-vs-MA relationship as sufficient for entry. ARM's primary differentiation is the multi-bar slope confirmation requirement : the ComboMA slope must be consistently positive (or negative) across N consecutive bars before the first condition is met. A one-bar slope deviation — common during consolidations and brief retracements — does not trigger entry. Only a sustained slope direction qualifies.
The ComboMA itself is a blend of ALMA and ZLMA, combining the smoothness and Gaussian weighting of ALMA with the lag-compensation of ZLMA. Neither is used in isolation because each has a specific weakness: ALMA can lag on sharp moves; ZLMA can be sensitive to noise. The blend leverages the strengths of both while partially offsetting their weaknesses.
The three-layer confirmation architecture — slope duration, price position, and demand validation — requires agreement across genuinely different measurement types: structural momentum over time, current price location, and volume activity. These are not three views of the same quantity. The stop and TP placement using strategy.position_avg_price rather than the signal bar close is a practical accuracy measure: in backtesting, it means risk distances are calculated from the price at which the trade was actually filled, not from where the signal was generated, which can differ from the fill price particularly on gap opens.
---
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. Backtested results are hypothetical and do not reflect actual trading. Hypothetical performance results have inherent limitations and do not account for execution slippage, liquidity constraints, or the psychological challenges of live trading. All trading involves risk, including the possible loss of principal. Always conduct your own research and consult a qualified financial professional before making any trading or investment decisions.
-Made with passion by officialjackofalltrades
Strategy

Market Structure Navigator [JOAT]Market Structure Navigator
Introduction
Market structure is one of the most widely discussed concepts in technical analysis, yet most tools that attempt to visualize it reduce swing highs and swing lows to single price points. In practice, price rarely reverses at a precise tick level — it reacts within a zone , which may span several ATR units depending on the instrument and timeframe. This distinction matters: treating a level as a point rather than a zone leads to false breaks being mistaken for genuine structural shifts.
The Market Structure Navigator addresses this by modeling every significant swing high and swing low as an ATR-based zone with measurable thickness. It tracks two layers of structure simultaneously — external (major) pivots that define the larger-degree trend, and internal (minor) pivots that provide context within that trend. Each zone passes through a three-state lifecycle, and structural breaks are automatically classified as either Break of Structure (BOS) or Change of Character (CHoCH), giving you an immediate read on whether a break confirms the existing trend or signals a potential reversal.
This is an overlay indicator — all elements are drawn directly on the price chart.
---
Core Concepts
Dual-Layer Structure: External and Internal
The indicator identifies two categories of structural pivots using PulseWire's built-in pivot functions:
External structure (major): Pivots requiring a configurable number of bars on each side (default 20). These are the significant swing highs and lows that define the broader trend context. They update less frequently and represent the higher-degree market structure.
Internal structure (minor): Pivots requiring fewer bars on each side (default 7). These fire more frequently and capture the sub-swings that occur within the larger structural moves.
This dual-layer approach mirrors how institutional analysis treats structure: external levels define the direction of the larger trend; internal levels provide precision context for entries and exits within that trend.
Zone Geometry and ATR Thickness
Rather than marking a pivot as a single horizontal line, each pivot is rendered as a rectangular zone. The zone's top and bottom are calculated as:
zoneTop = pivotPrice + (ATR * zoneAtrMult)
zoneBottom = pivotPrice - (ATR * zoneAtrMult)
The default ATR multiplier is 0.5, meaning the zone extends half an ATR above and below the pivot price. This thickness is dynamic — it adjusts to the current volatility of the instrument rather than using a fixed pip or point value. Zones extend to the right as new bars form, keeping them visible as price approaches.
Three-State Zone Lifecycle
Every zone passes through three possible states:
Active (State 0): The zone has formed and not yet been tested. It extends to the right as bars pass, representing untested support or resistance. This is the most significant state — an active zone has not had its interest absorbed.
Swept (State 1): Price has reached the midpoint of the zone (configurable as either a wick touch or a close through the midpoint). A swept zone has been tested and shows that some activity occurred at that level. It may have weakened but is not yet confirmed as broken.
Broken (State 2): Price has closed decisively beyond the zone boundary (above the top for a resistance zone, below the bottom for a support zone). A broken zone stops extending. This state marks the structural failure of that level.
This lifecycle gives actionable information that a single horizontal line cannot. An active zone is very different from a swept zone even if they appear at the same price level.
BOS and CHoCH Classification
When price breaks through the last significant external high or low, the indicator determines whether the break is:
Break of Structure (BOS): The break occurs in the same direction as the current trend. A bullish BOS is a higher high that extends a confirmed uptrend; a bearish BOS is a lower low extending a downtrend. BOS signals trend continuation.
Change of Character (CHoCH): The break occurs against the current trend direction. A CHoCH in a downtrend means price has broken above the last significant swing high — a structural signal that the trend may be reversing. CHoCH signals a potential regime shift, not a confirmed reversal.
Both external and internal structural breaks are tracked separately. An internal CHoCH during an external downtrend, for example, may represent a short-term countertrend move within a larger bearish structure — context that a single-layer tool would miss.
Momentum Normalization
Momentum is calculated as the normalized price change:
momentum = priceChange / stdev(close, lookback)
This expresses the size of recent price movement in terms of its own standard deviation, making the momentum reading comparable across different instruments and volatility regimes.
Target Arrows
When an internal structural break occurs, the indicator draws a directional arrow label pointing toward the next significant external level. This provides a visual read on where price may be targeting within the larger structural context.
---
Features
Dual-layer structure detection: external major pivots and internal minor pivots tracked independently
ATR-dynamic zone thickness — zones adapt to current instrument volatility
Three-state zone lifecycle: Active, Swept, Broken — each visually distinct
Automatic BOS vs. CHoCH classification for both external and internal breaks
Configurable sweep mode: wick-based (high/low touches midpoint) or close-based (close through midpoint)
Equal high/low detection with configurable ATR tolerance to flag double tops/bottoms
Target arrows on internal breaks pointing toward the next external level
Dashboard table showing trend state, momentum, active zone counts, last known structural levels, and last break type
Full visual toggle controls for all overlay elements
Maximum zone count cap per type to maintain chart performance
---
Dashboard Table
A table displayed at the top-right of the chart provides a live summary of structural conditions:
Ext Trend: Current external trend direction (Bullish / Bearish)
Int Trend: Current internal trend direction
Momentum: Normalised momentum value
Ext Zones Active: Number of currently active external zones
Int Zones Active: Number of currently active internal zones
Last Ext High / Low: Price level of the most recent significant external pivot high and low
Last Break: The most recent break type (eBOS, eCHoCH, iBOS, iCHoCH)
---
Color System
External high zones: red
External low zones: white
Internal high zones: teal
Internal low zones: blue
BOS labels: green
CHoCH labels: red
This color separation allows you to immediately distinguish between the two structural layers without reading labels.
---
Input Parameters
External Pivot Length (default 20) — bars required on each side for a major pivot to confirm
Internal Pivot Length (default 7) — bars required on each side for a minor pivot to confirm
ATR Length (default 14) — ATR period used for zone thickness calculation
Zone ATR Multiplier (default 0.5) — controls how wide each zone is relative to ATR
Equal H/L Tolerance (default 0.3 ATR) — how close two pivots must be to be considered equal highs or lows
Sweep Mode (Wick / Close) — whether zone sweeps are triggered by wick touch or candle close through the midpoint
Max Zones Per Type (default 40) — caps the number of active zones drawn per category to preserve chart performance
BOS Lookback (default 30) — bars looked back when checking for structural breaks
Visual Toggles — individual controls for zones, BOS/CHoCH labels, target arrows, and the dashboard table
---
How to Use
Apply to any chart. The indicator will begin plotting zones as enough bars form to confirm pivots at the chosen lengths.
Allow sufficient historical bars to load so that the external pivots have time to confirm — with extLen set to 20, a pivot requires 20 bars after the swing point before it is officially plotted.
Read the external layer first. The external trend (eBOS/eCHoCH sequence) tells you the larger-degree direction. Trade in alignment with this unless you have strong reason to fade it.
Use the internal layer for timing. Internal CHoCH events within an external uptrend can signal pullback entries; internal BOS events in the direction of the external trend can confirm continuation.
Active zones are the most significant. A first-touch of an active zone is generally more meaningful than a return to a swept or broken zone.
When price approaches a zone, check the sweep mode setting and monitor whether price is reaching the midpoint (sweep) or closing through the boundary (break).
The target arrow on an internal break shows the next external level — this is a reference, not a guaranteed target.
---
Limitations
Pivot detection is inherently lagging. A pivot at bar N is only confirmed after N + extLen (or intLen) additional bars have formed. This means zones appear after the fact — the exact pivot price was in the past by the time the zone is drawn.
With longer pivot lengths, the indicator requires more historical bars to display meaningful structure. On short lookback windows or when first applied to a chart, the initial display may show few or no zones until sufficient pivot confirmation has accumulated.
ATR-based zone thickness means zone width changes with volatility. During high-volatility periods, zones become wider and may overlap. During compressed volatility, zones are narrower. Adjust the ATR multiplier if zones are too wide or too narrow for your preferred trading style.
The BOS/CHoCH classification is based on the direction of the previous break relative to the current one. In choppy, range-bound markets, rapid BOS/CHoCH alternation is possible and does not necessarily indicate a trend — it may simply reflect noise.
Zone lifecycle states reflect price behavior relative to the zone midpoint and boundary. They do not predict whether a swept zone will hold or whether a broken zone will become a new support/resistance level.
Maximum zone count limits (default 40 per type) are necessary to maintain chart performance. On instruments or timeframes with many pivot formations, older zones will be removed as new ones are added.
No indicator can classify market structure with certainty in real time. CHoCH signals a potential reversal; it does not confirm one. Always apply additional judgment.
---
Originality Statement
The distinguishing design decisions in this indicator are: zone-based pivot modeling, the three-state lifecycle, and the integrated dual-layer structure system.
Most structure tools mark a swing high or low as a horizontal line at a single price. This indicator models each pivot as a zone with ATR-derived thickness, acknowledging that price reactions do not occur at a tick but within a range that varies with the instrument's current volatility. A 0.5 ATR zone around a pivot is a more honest representation of where liquidity and interest are likely to cluster.
The three-state lifecycle (Active → Swept → Broken) adds information that static horizontal lines cannot convey. An active zone that has never been tested is categorically different from one that has seen a wick test — and both are different from a zone that has been fully broken. Treating these three states identically discards relevant context.
The dual-layer architecture (external major + internal minor) is not simply running the same algorithm twice at different sensitivities. The external layer provides the trend framework; the internal layer provides the tactical sub-structure within it. The BOS/CHoCH classification connects these two layers — an internal CHoCH is interpreted in the context of the external trend direction, not in isolation.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. All trading involves risk, including the possible loss of principal. Past indicator performance does not guarantee future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Confluence Signal Engine [JOAT]Confluence Signal Engine
Introduction
Most traders encounter a common trap: stacking multiple indicators that all claim to measure something different, yet each one is ultimately derived from the same price data. The result is not confirmation — it is correlated noise presented as agreement. The Confluence Signal Engine was built to address this directly.
This indicator assigns a composite score to the current market condition by evaluating six deliberately chosen dimensions of market behavior. Each dimension is designed to measure a fundamentally different property of price action. When multiple dimensions agree, that agreement carries more weight than any single indicator firing alone. The result is a single, normalised score between -1 and +1, accompanied by a visual confidence meter and a score breakdown table so you can see exactly what is driving the signal.
This is an overlay indicator — it plots directly on the price chart.
---
Core Concepts
The Six Scoring Dimensions
Each dimension returns one of three values: +1 (bullish contribution), -1 (bearish contribution), or 0 (neutral / insufficient data). These are summed and divided by 6.0 to produce the composite score.
D1 — EMA Alignment (Trend Direction)
Compares a fast EMA to a slow EMA. If the fast EMA is above the slow EMA, the trend dimension scores +1. If below, it scores -1. This is the structural backbone — a baseline read on which side of the trend the price currently sits.
D2 — Price Z-Score (Statistical Deviation)
Calculates how many standard deviations the current close is from a baseline EMA. A Z-score below the negative threshold suggests the price has deviated far enough below the mean to be considered statistically stretched — a potential reversion candidate, scored +1. A Z-score above the positive threshold scores -1. This dimension does not measure trend; it measures relative price position against recent statistical norms.
D3 — Volume Pressure (Demand Validation)
Uses a Volume RSI (RSI applied to volume over 8 bars, divided by 50) as a proxy for whether volume activity is elevated. When volume pressure exceeds the threshold, the candle's direction (close vs. open) determines the score: a bullish candle in high-volume conditions scores +1; a bearish candle scores -1. When volume is not elevated, this dimension returns 0, contributing nothing. This prevents volume noise on low-activity bars from polluting the signal.
D4 — RSI Momentum (Momentum Quality)
Evaluates both the current RSI value and its slope. A rising RSI above 50 scores +1 — confirming that momentum is positive and strengthening. A falling RSI below 50 scores -1. This differs from a simple RSI threshold because the slope requirement means momentum must be actively moving in the scored direction, not merely sitting above or below a level.
D5 — Structural Position (Range Placement)
Compares the current close to the midpoint of the highest high and lowest low over a configurable lookback period. Closing above the midpoint scores +1; closing below scores -1. This is a simple but useful structural context: is price holding in the upper or lower half of its recent range?
D6 — Volatility Context (Environment Quality)
Divides a fast ATR by a slow ATR to produce a volatility ratio. A low ratio (calm, contracting volatility) scores +1 — historically a more favorable environment for trend continuation. A high ratio (expanding, elevated volatility) scores -1, flagging that the current environment may be erratic. A ratio between the two thresholds is neutral. This dimension does not predict price direction; it assesses whether current conditions are conducive to acting on the other signals.
---
Composite Score and Confidence
compositeScore = (D1 + D2 + D3 + D4 + D5 + D6) / 6.0
confidence = math.abs(compositeScore) * 100
The composite score ranges from -1.0 (all six dimensions bearish) to +1.0 (all six dimensions bullish). The confidence value is simply the absolute magnitude — a score of ±1.0 represents 100% agreement across all dimensions, while a score near 0 represents disagreement or neutrality.
Signal thresholds:
Score > buy threshold (default 0.3) → bullish signal
Score < sell threshold (default -0.3) → bearish signal
Score > high-confidence threshold (default ±0.6) → high-confidence signal
Signals are gated by barstate.isconfirmed — they only fire on fully closed bars, preventing intra-bar repainting. State tracking also prevents the same directional signal from repeating consecutively without a change in direction first.
---
Visual Components
24-Cell Gradient Confidence Meter
A horizontal bar of 24 cells is displayed at the bottom of the chart. The left side is the bearish extreme, the center is neutral, and the right side is the bullish extreme. The current composite score position is highlighted within the meter, giving a continuous visual read of where the market sits in the conviction range — not just whether a signal has fired, but how strongly.
Score Breakdown Table
A table showing three columns for each dimension: dimension name, dimension number, and its current score (+1, -1, or 0). This allows you to see exactly which dimensions are contributing to the composite and which are neutral or conflicting.
Gradient Bar Coloring
Price bars are colored using a gradient that interpolates from a neutral color toward the signal color, weighted by the absolute value of the composite score. A high-confidence bull signal produces a strong green bar; a low-confidence or mixed signal produces a muted or neutral color. This keeps bar coloring proportional to actual conviction rather than using a binary flip.
---
Features
Six-dimension composite scoring system covering trend, statistics, volume, momentum, structure, and volatility
Composite score normalised to with confidence percentage
Non-repainting: all signals confirmed on bar close via barstate.isconfirmed
State-tracked signals prevent repeated same-direction firing
24-cell gradient confidence meter with continuous position display
Score breakdown table showing each dimension's individual contribution
Gradient bar coloring proportional to conviction level
Configurable thresholds for all six dimensions and signal levels
---
Input Parameters
EMA Fast / Slow (default 21 / 55) — D1 trend alignment
Z-Score Baseline EMA (default 50) — the mean used for Z-score calculation
Z-Score Window (default 50) — standard deviation lookback
Z-Score Threshold (default 1.5) — how many standard deviations trigger the score
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.2) — Volume RSI / 50 must exceed this to activate D3
RSI Length (default 14) — standard RSI period for D4
Structure Lookback (default 20) — bars used to define the high/low range for D5
ATR Fast / Slow (default 14 / 50) — periods for the volatility ratio in D6
Volatility Thresholds (default 0.8 / 1.5) — low and high boundaries for the ATR ratio
Buy Threshold (default 0.3) — minimum composite score to generate a long signal
Sell Threshold (default -0.3) — maximum composite score to generate a short signal
High-Confidence Threshold (default ±0.6) — score level at which a signal is classified as high-confidence
---
How to Use
Apply to any chart. The overlay paints directly on price bars.
Watch the confidence meter for the current composite score position. A score pressed toward either extreme with multiple dimensions aligned is a higher-quality read than one sitting near center.
Use the score breakdown table to understand why the composite score is what it is. If only 2 of 6 dimensions are contributing, the signal is weaker regardless of whether it crossed the threshold.
High-confidence signals (score beyond ±0.6 by default) indicate that four or more of the six dimensions are in agreement. These can be treated as stronger setups than threshold-level signals.
Combine the composite score read with your own price action, support/resistance, or higher-timeframe context before entering a trade. This indicator is a confluence tool, not a standalone entry system.
If several dimensions are conflicting (score near 0), the market is not in a clear state — no action is the appropriate response.
---
Limitations
No indicator can predict future price. The composite score reflects current market conditions based on recent historical data — not what will happen next.
Z-score and structural position dimensions are mean-reverting in nature, while EMA alignment and RSI momentum are trend-following. In strongly trending markets, D2 and D5 may produce persistent bearish readings even during a healthy uptrend, suppressing the composite score. This is by design — the indicator is more suited to environments where confluence across all dimensions is achievable.
Volume RSI (D3) is only reliable on instruments and timeframes with consistent, meaningful volume data. On synthetic instruments, indices, or very low-timeframe charts, volume data may be unreliable and D3's contribution should be weighted accordingly.
The volatility context dimension (D6) measures the environment , not direction. A low-volatility score of +1 does not mean the market is about to move up — only that conditions are historically more favorable for clean signals.
Signal state tracking prevents consecutive same-direction signals, which reduces noise but also means the indicator will not re-fire during a prolonged trending move. This is a deliberate design choice but should be understood before use.
Default thresholds were chosen for general applicability. Different asset classes, timeframes, and volatility regimes may benefit from threshold adjustment.
Past signal quality on any given instrument does not guarantee future performance.
---
Originality Statement
The core innovation of this indicator is the deliberate selection of six dimensions that measure fundamentally different market properties rather than multiple views of the same property. Standard multi-indicator approaches tend to combine RSI, MACD, and Stochastic — all of which are momentum oscillators derived from price, generating correlated signals that appear independent but are not.
This indicator separates the problem into distinct domains: trend direction (EMA alignment), statistical deviation from the mean (Z-score), demand-side pressure (Volume RSI), momentum quality and direction (RSI slope + level), structural placement within recent range (midpoint comparison), and environmental favorability (ATR ratio). Because these dimensions are largely uncorrelated with each other, genuine multi-dimension agreement represents a qualitatively different kind of confluence than stacking three oscillators. The 24-cell gradient meter goes further — it provides a continuous conviction read rather than a binary signal, treating market condition as a spectrum.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. All trading involves risk, including the possible loss of principal. Past indicator performance does not guarantee future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Volatility Regime Classifier [JOAT]Volatility Regime Classifier
Introduction
The Volatility Regime Classifier is an overlay indicator that continuously classifies the current market environment into one of four distinct volatility regimes — TRENDING , RANGING , VOLATILE , or MIXED — and adapts its visual output accordingly. Rather than simply measuring how much volatility is present, this indicator identifies what type of volatility environment is active, a distinction that is directly relevant to strategy selection.
The classification is built on three independent measures — ATR Z-score, ATR percentile, and EMA directional ratio — each capturing a different dimension of market behavior. Their combination produces a regime map that is both statistically grounded and practically actionable.
---
Core Concepts
1. ATR Z-Score — Detecting Statistically Extreme Volatility
The Z-score measures how far the current ATR deviates from its own historical mean, in units of standard deviation:
atrZ = (atr14 - ta.sma(atr14, lookback)) / ta.stdev(atr14, lookback)
A Z-score above the Volatile Z Threshold (default 2.0) means current volatility is more than two standard deviations above the recent average — a statistically uncommon spike. This is the trigger for the VOLATILE regime, indicating conditions where position sizing, stop distances, and strategy assumptions built around normal ranges may no longer apply.
The Z-score is a mean-reverting measure. An extreme reading does not tell you which direction price will move. It tells you the current volatility environment is atypical relative to recent history.
2. ATR Percentile — Identifying Volatility Compression
The percentile ranks current ATR linearly within its own recent range:
atrPercentile = (atr14 - ta.lowest(atr14, lookback)) / (ta.highest(atr14, lookback) - ta.lowest(atr14, lookback)) * 100
A percentile below the Ranging Percentile threshold (default 35%) means ATR is near its lowest levels of the lookback window — a compression signal. This is the trigger for the RANGING regime, which historically precedes expansion but does not predict its direction or timing. It is a descriptor of the current state, not a forecast.
Using percentile rather than a fixed ATR threshold makes the measure adaptive: it adjusts to the instrument's own volatility character and the current lookback window.
3. EMA Directional Ratio — Testing Movement Quality
Directional quality is measured by the separation between a fast and slow EMA, expressed in ATR units:
directional = math.abs(ema_fast - ema_slow) / atr14 > dirStrength
When the EMA separation exceeds the Directional Strength threshold (default 1.5 ATR units), the market is showing sustained, coherent movement in one direction relative to its current volatility level. This is the trigger for the TRENDING regime.
Expressing EMA separation in ATR units normalizes for volatility: a large EMA gap during a high-volatility period may be less directionally significant than the same gap during a low-volatility period.
4. Regime Classification Logic
The three measures are evaluated in priority order:
VOLATILE — if ATR Z-score exceeds the volatile threshold. Extreme volatility takes precedence over all other conditions.
RANGING — else if ATR percentile is below the ranging threshold. Volatility compression is checked next.
TRENDING — else if the EMA directional ratio is satisfied. Directional movement is confirmed if not in a spike or compression.
MIXED — else. The market does not clearly fit any of the above categories: volatility is average, not directional, and not compressed.
Regime transitions are confirmed on barstate.isconfirmed bars only, preventing labels and state changes from appearing on unfinished candles.
5. Adaptive Bands
Each regime applies a different ATR multiplier to a central EMA band:
VOLATILE: multiplier 3.0 — wide bands reflecting extreme range
TRENDING: multiplier 2.0 — moderate bands supporting trend context
MIXED: multiplier 1.5 — standard bands for undifferentiated conditions
RANGING: multiplier 1.0 — tight bands appropriate for compressed, mean-reverting conditions
upper = ema_center + baseMult * atr14
lower = ema_center - baseMult * atr14
The band envelope therefore scales automatically to the current regime, providing contextually appropriate support and resistance structure without manual adjustment.
6. Smooth Color Transitions
Regime colors are smoothed by applying a 10-period EMA to each RGB channel independently. This prevents abrupt color jumps at regime boundaries and provides a visual blending effect as the market transitions between states. The smoothing period is fixed at 10 bars and is not user-configurable, as it is a presentational feature rather than an analytical one.
7. Regime Transition Labels
A label is plotted at each confirmed regime change, marking the bar where the classification shifted. This creates a visual audit trail of regime history on the chart, allowing traders to review how conditions evolved across the session or swing.
8. Information Table
A compact table in the top-right corner displays the current state of all key measurements:
Current regime classification
ATR value (absolute)
ATR Z-score
ATR percentile
EMA trend direction (bullish/bearish based on fast vs slow EMA)
Band width (upper minus lower)
Directional threshold met (yes/no)
Active band multiplier
---
Features
Four-state regime classification: TRENDING, RANGING, VOLATILE, MIXED
ATR Z-score for statistical volatility spike detection
ATR percentile for volatility compression identification
EMA directional ratio normalized to ATR units
Priority-ordered regime logic with clear precedence rules
Adaptive ATR-based bands that scale multiplier per regime
Smooth RGB-channel EMA color blending at regime transitions
Regime transition labels at every confirmed state change
Per-bar color coding reflecting the active regime
Background tint per regime (high transparency, non-intrusive)
Real-time information table with all underlying metrics
---
Input Parameters
ATR Length (default 14): Period for all ATR calculations. Shorter values make the Z-score and percentile more reactive; longer values smooth them out.
Regime Lookback (default 100): The historical window used for Z-score (mean and standard deviation) and percentile (highest/lowest) calculations. Shorter lookbacks make the regime more sensitive to recent conditions; longer lookbacks require more extreme readings to trigger transitions.
Volatile Z Threshold (default 2.0): ATR Z-score level required to trigger the VOLATILE regime. 2.0 corresponds to a two-standard-deviation event relative to the lookback window.
Ranging Percentile (default 35%): ATR percentile below which the RANGING regime is triggered. Lower values require a tighter compression before classifying as ranging.
Directional Strength (default 1.5): EMA separation threshold in ATR units required for the TRENDING regime. Higher values require a stronger, more sustained directional move.
Fast EMA (default 20): Period for the fast EMA used in directional ratio and the band center.
Slow EMA (default 50): Period for the slow EMA used in directional ratio.
Band EMA (default 50): Period for the central EMA from which adaptive bands project. Can be set independently from the directional EMAs.
---
How to Use
Regime-to-strategy mapping: The four regimes map to four broad strategy postures:
TRENDING: Conditions are directional. Trend-following approaches — momentum entries, trailing stops, breakout continuation — have historically performed better in this state.
RANGING: Volatility is compressed. Mean-reversion approaches — fading extremes, range-bound entries — are more aligned with this environment. Be aware that compression often precedes expansion.
VOLATILE: Volatility is statistically extreme. Reduce position size. Wider-than-usual stops are required to avoid being shaken out by noise. Many strategies based on normal ATR assumptions will malfunction in this state.
MIXED: No strong signal. Conditions do not clearly favor trending, ranging, or risk-off postures. Waiting for a clearer regime or reducing exposure are reasonable responses.
Reading the bands: The adaptive bands are not support/resistance in a traditional sense. They represent a contextually appropriate price envelope for the current regime. In ranging conditions, expect price to interact with the tight bands; in volatile conditions, the wider bands reflect the expanded true range.
Using the table: The information table provides the underlying metric values at a glance. If a regime seems unexpected, check the raw Z-score, percentile, and directional values directly — this helps distinguish borderline cases from clear ones.
Transition labels: Regime transition labels mark where conditions shifted on historical bars. Reviewing these labels on historical data can help calibrate whether the default thresholds suit a particular instrument and timeframe.
---
Limitations
All three underlying measures are based on ATR and EMA — both of which are lagging indicators. Regime classification reflects recently confirmed conditions, not instantaneous market state.
The lookback window is critical to the behavior of both the Z-score and percentile. A short lookback makes the indicator reactive but prone to frequent transitions; a long lookback produces more stable regimes but may lag real condition changes.
The four-state classification is a simplification of a continuous, multidimensional market reality. Real market conditions exist on a spectrum; the regime labels are useful approximations, not rigid categories.
On instruments with low liquidity, thin volume, or irregular trading sessions (certain futures contracts, crypto on illiquid exchanges, small-cap equities), ATR behavior may be distorted by gaps or thin-market artifacts, producing unreliable Z-score and percentile readings.
Regime classification performs best when applied within a single session or consistent trading context. Applying it across major session boundaries (e.g., Asia open to New York close on forex) without adjustment may produce spurious transitions driven by liquidity changes rather than structural market behavior.
This indicator does not predict regime changes. It classifies the current regime after it has formed. The RANGING regime, for example, does not predict that expansion will occur — it describes that compression is currently present.
No indicator, including this one, predicts future price direction or magnitude. Regime classification informs which type of strategy is currently better aligned with conditions — it does not guarantee that any strategy will be profitable.
---
Originality Statement
Many volatility indicators answer the question "how volatile is the market?" — ATR, Bollinger Band width, historical volatility, and similar tools all provide variants of this measurement. This indicator answers a different question: "what type of volatility environment is the market currently in?"
The distinction matters because different volatility types require different responses. A spike in volatility during a strong trend calls for different handling than a spike caused by a news event in a ranging market. Compression before a directional breakout is a different environment than compression within an established range. The MIXED regime acknowledges that not all market conditions are clearly classifiable — a honesty that most binary volatility tools omit.
Three independent measures are combined by design, not convenience:
The Z-score is statistical — it grounds the VOLATILE trigger in the instrument's own distributional history rather than an arbitrary fixed threshold.
The percentile is rank-based and linear — it identifies compression relative to the full range of recent ATR values without being sensitive to individual outliers.
The EMA directional ratio tests movement quality in ATR-normalized units — a common EMA crossover system would classify direction identically regardless of whether price is moving coherently or chopping. Normalizing to ATR removes that ambiguity.
The adaptive band multiplier is a direct mechanical expression of the regime classification — not a cosmetic addition. It means the envelope drawn on the chart is always scaled to the current environment, rather than applying a single fixed multiplier that is simultaneously too tight for volatile conditions and too wide for ranging ones.
---
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any asset. Regime classification describes current market conditions based on historical data — it does not predict future conditions, price direction, or strategy outcomes. All trading involves risk. You are solely responsible for your own trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Liquidity Thermal Map [JOAT]Liquidity Thermal Map
Introduction
The Liquidity Thermal Map is an overlay indicator that identifies and visualizes liquidity pockets — price zones where trapped participants are likely clustered — and ranks their significance using a heat-mapped color scale driven by volume and price range data. Rather than treating all swing highs and lows equally, it weights each zone by the liquidity activity present at that pivot bar, then applies power-law contrast stretching so that the most significant zones immediately stand out from background noise.
The goal is not to predict where price will go. The goal is to surface which untested zones carry the most liquidity weight, so a trader can make their own informed decisions about potential targets or areas of interest.
---
Core Concepts
1. Pivot Detection
Zones are seeded at confirmed swing pivots using Pine Script's built-in pivot functions:
pivH = ta.pivothigh(high, leftPiv, rightPiv)
pivL = ta.pivotlow(low, leftPiv, rightPiv)
A pivot high marks a bar where bears may have been trapped above — price reached that level, reversed, and left unfilled orders behind. A pivot low marks the mirror situation for trapped bulls. The left bars and right bars inputs control how many confirming bars are required on each side, balancing sensitivity against noise.
2. Liquidity Metric and Heat Normalization
Each pivot is scored using one of three selectable metrics:
Vol x Range (default): volume * (high - low) * 100 — rewards bars with both high volume and wide price movement
Volume only: raw volume at the pivot bar
Range only: the high-low spread at the pivot bar
Raw scores are normalized across all active pockets using a rolling min-max calculation:
norm = (metric - min) / (max - min)
heat = math.pow(norm, heatContrast)
The power-law contrast stretch (controlled by the Heat Contrast input) compresses lower-significance pockets toward zero and expands higher-significance ones toward one. A contrast value below 1.0 spreads pockets more evenly; above 1.0, only the highest-scoring pockets register strong color.
3. Zone Construction
Each pocket is drawn as a box:
Short liquidity pocket (at a pivot HIGH, bears trapped above): top = pivotHigh + ATR * bandWidth, bottom = pivotHigh
Long liquidity pocket (at a pivot LOW, bulls trapped below): top = pivotLow, bottom = pivotLow - ATR * bandWidth
ATR scaling ensures band width adapts to current volatility rather than using a fixed pip or point value. Short pockets color from yellow (low heat) through deeper yellows. Long pockets color from a faded cyan through solid cyan-blue. Both gradients are computed with color.from_gradient(heat, 0, 1, faded_base, solid_base) , making the heat ranking immediately readable at a glance.
4. Three-State Lifecycle
Every pocket passes through a defined state machine:
Active: The zone is untested. The box extends rightward each bar by the Extend Bars amount, keeping it visible on the current chart.
Hit (Frozen): Triggered when price sweeps through the midpoint of the zone (high >= midpoint AND low <= midpoint on the same bar). The box stops extending, color fades, and the label is removed — signaling that the pocket has been swept and liquidity likely absorbed.
Expired: When a pocket's age exceeds the Lookback setting without being hit, it is removed entirely and all associated arrays are cleaned up.
This lifecycle gives real-time feedback: solid, bright zones are intact and untested; faded zones have been swept; only the most recent, significant pockets within your lookback window are visible.
5. Scale Legend
A 24-cell gradient table is drawn on-chart running from the short liquidity color to the long liquidity color, providing a continuous reference for the heat scale being applied to all visible pockets.
---
Features
Pivot-anchored liquidity zones for both long and short trapped-participant scenarios
Three selectable liquidity metrics: Vol x Range, Volume only, Range only
Power-law contrast stretching for visual prioritization of high-significance zones
ATR-scaled zone width that adapts to current market volatility
Three-state lifecycle (Active → Hit → Expired) per pocket with visual state changes
Dual-color gradient system — cyan-blue for long pockets, yellow for short pockets
On-chart 24-cell heat scale legend
Configurable max pocket count to manage chart performance
Visual toggles for boxes, labels, and the legend table
---
Input Parameters
Pivot Left Bars (default 10): Bars required to the left of a pivot for confirmation. Higher values = fewer, more significant pivots.
Pivot Right Bars (default 5): Bars required to the right of a pivot for confirmation. Increasing this delays detection but improves pivot quality.
Lookback / Max Age (default 200): Maximum bar age before a pocket expires and is removed.
Max Pockets (default 50): Upper limit on simultaneous active pockets. Reducing this improves performance on lower-end charts.
ATR Length (default 14): Period for the ATR calculation used in band width scaling.
ATR Band Width (default 0.5): Multiplier applied to ATR to set zone height. Higher values create wider zones.
Extend Bars (default 50): How many bars ahead each active pocket box extends on each update.
Heat Contrast (default 0.5): Power-law exponent for contrast stretching. Values below 1.0 spread pockets more evenly; above 1.0 increases contrast between high and low scoring zones.
Metric Mode: Selects the liquidity scoring metric — Vol x Range, Volume, or Range.
Show Boxes / Show Labels / Show Legend: Individual visibility toggles for each visual component.
---
How to Use
Identifying high-priority zones: Bright, fully saturated boxes represent the highest-scoring untested liquidity pockets within your lookback window. These are the zones where the most volume-weighted trapped participants may be present.
Tracking swept zones: When a box fades, the pocket has been hit — price moved through its midpoint. Faded zones can serve as reference for areas that have already seen liquidity absorption.
Adjusting sensitivity: Increasing the left/right pivot bars reduces the total number of pivots detected, focusing only on more structurally significant swing points. Decreasing them creates a denser map suitable for shorter timeframes.
Interpreting the legend: The 24-cell scale legend in the corner maps the full gradient range, from the lowest-heat short pocket color to the highest-heat long pocket color.
Timeframe considerations: On higher timeframes (4H, Daily), fewer pivots form and each carries more weight. On lower timeframes, tightening the ATR band width and increasing heat contrast helps reduce visual clutter.
---
Limitations
Pivot detection is inherently lagging — a pivot is only confirmed after the right-side bars have closed, meaning the zone is plotted some bars after the pivot actually formed.
The liquidity metric scores a pocket by activity at the pivot bar itself , not the full swing sequence leading to it. A pivot formed on a single high-volume bar will score higher than one formed over a gradual, multi-bar move.
Volume data quality varies by broker and data feed. On instruments with unreliable or synthetic volume (some forex pairs, CFDs), the Vol x Range metric may not reflect true market participation.
The indicator does not account for partial fills or iceberg orders. A zone being "hit" means price swept through the midpoint — it does not confirm full liquidity absorption.
No indicator, including this one, predicts future price movement. A high-heat untested zone is an area of potential interest, not a guaranteed reversal or reaction point.
Performance may degrade on very active charts with high Max Pocket settings. Reduce Max Pockets if chart rendering slows.
The heat scale is relative to the current set of visible pockets. Adding more historical data (longer lookback) changes the normalization range and will recolor all currently visible pockets.
---
Originality Statement
Most liquidity mapping tools mark swing highs and lows with equal visual weight — every pivot gets the same line, box, or label. This indicator departs from that approach in three ways:
First , each pocket is scored by the product of volume and price range at its pivot bar (or volume/range alone as alternatives), producing a liquidity significance score rather than a binary present/absent mark.
Second , power-law contrast stretching is applied to the normalized scores, which means the visual encoding (color saturation) is non-linear. Minor pockets compress toward the faded end of the gradient; truly significant pockets expand toward the saturated end. This is a deliberate perceptual design choice — not simply coloring zones by value, but stretching the gradient to maximize discriminability at the high end.
Third , the three-state lifecycle (Active → Hit → Expired) treats each pocket as a dynamic object that responds to price action in real time. The visual state change on hit provides immediate feedback without requiring the trader to manually track which levels have been tested. The combination of significance scoring, contrast-stretched heat mapping, and lifecycle state management in a single overlay tool is the core contribution of this indicator.
---
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any asset. Past behavior of price around liquidity zones does not guarantee future behavior. All trading involves risk. You are solely responsible for your own trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Tidal Volume Oscillator [JOAT]Tidal Volume Oscillator
Introduction
The Tidal Volume Oscillator is a separate-pane oscillator that attempts to answer a single question: is the current price movement being carried by genuine volume participation, or is it occurring on weak flow? It constructs a volume-weighted momentum score, normalizes it to a bounded range of −100 to +100, applies a Fourier-inspired exponential decay smoothing pass to reduce noise without introducing phase lag, and then scales the result with an adaptive trend filter. A flow momentum line tracks the acceleration of the oscillator itself. A divergence engine scans for all four divergence types simultaneously — regular bullish, regular bearish, hidden bullish, and hidden bearish — and plots them directly in the oscillator panel.
The indicator does not predict future price. It contextualizes current price movement relative to volume behavior and flags when price action and volume-weighted momentum are moving in opposite directions, which historically precedes changes in directional character — though not always, and not reliably in all instruments or conditions.
---
Core Concepts
The VZO Foundation
The Volume Zone Oscillator (VZO) is an established concept that categorizes volume as positive or negative based on the direction of price change, then computes a ratio of positive to negative volume over a rolling window. This indicator rebuilds that concept from the ground up using a different normalization approach:
Relative Volume: Instead of using raw volume, the oscillator first normalizes each bar's volume against a rolling SMA of volume. This produces a relative volume reading — a value above 1.0 means the bar traded heavier than average, below 1.0 means lighter. This step removes the absolute scale of volume from the calculation, allowing the oscillator to behave comparably across instruments with vastly different volume profiles and across timeframes where absolute volume differs by orders of magnitude.
Volume-Weighted Momentum: The price change on each bar is smoothed via EMA, and the relative volume is separately smoothed via EMA. Multiplying these two smoothed values produces a volume-weighted momentum signal. This is then smoothed again to form a base momentum reading.
RSI-Style Normalization: Positive and negative portions of the base momentum are separated, each independently smoothed, and their ratio is fed into an RSI-style formula: vzo = 100 * (ratio - 1) / (ratio + 1) . This bounds the oscillator strictly between −100 and +100 and gives it a symmetric zero-line structure where positive values indicate dominant upward volume momentum and negative values indicate dominant downward volume momentum.
Fourier Exponential Decay Smoothing
After the initial VZO is computed, a second smoothing pass is applied using exponential decay weights. For each bar, the contribution of each of the prior N bars is weighted by exp(-i / (len * 0.3)) , where i is the number of bars back. This means the most recent bar carries maximum weight and each earlier bar contributes exponentially less. The window clips naturally as the weights approach zero.
The result is a smoothing pass that is inspired by frequency-domain thinking: it emphasizes recent values and de-emphasizes older values in a continuous decay rather than in the binary on/off fashion of a simple rolling average. The smoothed output tracks the oscillator's underlying shape while suppressing high-frequency noise without the phase shift that a centered moving average would introduce.
ADF Trend Filter
An adaptive multiplier is derived by comparing a short SMA and a long SMA of price, normalizing their difference by the rolling standard deviation of price over a matching window. This produces a dimensionless value that reflects the strength of the current trend relative to recent volatility — conceptually analogous to the logic behind an Augmented Dickey-Fuller trend test applied in a simplified real-time form.
This multiplier is kept close to 1.0 intentionally. Its role is not to dramatically change the oscillator's value but to apply a mild scaling that slightly amplifies the VZO when trend conditions are strong and slightly suppresses it during choppy, mean-reverting conditions. The effect is subtle but helps the oscillator's readings align better with the underlying market character.
Final Blended VZO
The final oscillator value blends the EMA-smoothed VZO and the Fourier-smoothed VZO according to a blend parameter, scales the result by the ADF multiplier, and clamps the output to the range. The blend parameter controls how much weight goes to the Fourier-smoothed version versus the EMA-smoothed version, allowing the user to tune between responsiveness and smoothness.
Flow Momentum Line
A secondary line is plotted alongside the main oscillator, computed as:
flow_momentum = (vzo - ema(vzo, lookback)) * 0.5
This measures the rate of change of the oscillator — its acceleration — and scales it to stay visually proportional. When the flow momentum line is rising, the oscillator is accelerating upward. When it is falling, the oscillator is losing momentum regardless of its absolute level. Crossovers between the oscillator and the flow momentum line can highlight inflection points in volume-weighted momentum.
Divergence Engine
The divergence engine uses pivot high and pivot low detection to identify four divergence types:
Regular Bullish Divergence: Price makes a lower low while the oscillator makes a higher low. Suggests weakening downward volume participation on the new price low.
Regular Bearish Divergence: Price makes a higher high while the oscillator makes a lower high. Suggests weakening upward volume participation on the new price high.
Hidden Bullish Divergence: Price makes a higher low while the oscillator makes a lower low. Often associated with pullbacks within an established uptrend where volume momentum remains stronger than the pullback's depth implies.
Hidden Bearish Divergence: Price makes a lower high while the oscillator makes a higher high. Often associated with rallies within an established downtrend where volume momentum is failing to confirm the price bounce.
The engine uses ta.valuewhen to retrieve the oscillator's value at the most recent prior pivot of the same type, then compares it to the current pivot. Lines and labels are drawn directly in the oscillator pane, keeping all divergence context in a single panel.
Dynamic Color Blending
The oscillator line and histogram (if enabled) use color blending that responds to both the direction of the oscillator and the intensity of the flow momentum. Colors transition smoothly between bull and bear palettes as conditions shift, with intensity modulated by momentum acceleration. This avoids binary color flips and gives a continuous visual read of the oscillator's strength and direction.
---
Features
Relative-volume-normalized VZO foundation — removes absolute volume scale bias
RSI-style normalization producing a symmetric −100 to +100 oscillator
Fourier exponential decay smoothing pass for noise reduction without phase lag
ADF-inspired adaptive trend multiplier for regime-sensitive scaling
Blended output combining EMA and Fourier smoothing with user-adjustable weighting
Flow momentum line showing oscillator acceleration
Full four-type divergence engine: regular bull/bear and hidden bull/bear
Divergence lines and labels rendered directly in the oscillator pane
Dynamic color blending based on direction and momentum intensity
Overbought/oversold level lines at user-defined thresholds (default ±80)
Fully toggleable visual components including divergence types individually
---
Input Parameters
VZO Length: Primary lookback for the volume-weighted momentum and normalization calculations (default: 14)
Smoothing Length: Short EMA length used in the initial volume-weighted momentum construction (default: 5)
Signal Length: EMA length applied to the final VZO for the signal/flow line (default: 9)
Fourier Window: Number of bars used in the exponential decay smoothing pass (default: 20)
Fourier Blend: Proportion of the final output taken from the Fourier-smoothed VZO versus the EMA-smoothed VZO (default: 0.4, meaning 40% Fourier / 60% EMA)
Overbought Level: Upper reference line threshold (default: +80)
Oversold Level: Lower reference line threshold (default: −80)
Pivot Bars: Number of bars on each side required to confirm a pivot high or low for divergence detection
Visual Toggles: Individual controls for divergence types (regular bull, regular bear, hidden bull, hidden bear), flow momentum line, bar coloring, and OB/OS lines
---
How to Use
Reading the oscillator: Values above zero indicate that volume-weighted momentum favors buyers over the lookback window. Values below zero indicate it favors sellers. The magnitude reflects how dominant one side is. A reading of +60 is meaningfully different from +20 — the former suggests strong participation on the upside, the latter suggests modest positive lean.
Overbought/oversold levels: The default ±80 levels are deliberately set wide. Reaching ±80 indicates a statistically strong skew in volume momentum, not simply a directional bias. A reading at +85 that begins to decline is worth noting; a reading that has been above +80 for many bars without declining suggests strong persistent flow, not an automatic reversal condition.
Flow momentum line: Use the flow momentum line to identify when the oscillator is accelerating or decelerating. If the oscillator is above zero but the flow momentum line is falling and crossing below the oscillator, volume-weighted momentum is losing strength even if it has not crossed zero. This can be an early warning of a fading move.
Divergences: Divergence signals appear as labeled lines in the oscillator pane. They flag a disagreement between price structure and volume momentum structure. Regular divergences are typically associated with potential trend reversal conditions; hidden divergences are typically associated with trend continuation conditions during a pullback. Neither type is a standalone entry signal — they require context from price structure, higher timeframe trend, and other confirmation.
Combining types: A regular bearish divergence occurring while the oscillator is above +60 and the flow momentum line is declining is a more compelling condition than a divergence occurring at a neutral oscillator reading. Look for confluence between divergence signals, oscillator level, and flow momentum direction.
Timeframe notes: On lower timeframes, the divergence engine will fire frequently and many signals will resolve as noise. On higher timeframes, divergence signals are structurally more significant but rarer. The Fourier blend and VZO length should be calibrated to the timeframe being traded.
---
Limitations
This indicator does not predict future price movement. All readings are computed from past and current bar data.
Volume data quality varies significantly across instruments and data providers. On instruments with unreliable, synthetic, or missing volume data (some forex pairs, certain CFDs, spread-betting instruments), the oscillator's readings will be distorted or meaningless.
Divergences are detected only at confirmed pivot points, which by definition require a lookback into past bars. A divergence signal will appear after the pivot is confirmed, not at the pivot bar itself. This is inherent to pivot-based divergence detection and is not a bug.
Hidden divergences can occur frequently during strong trends and produce many signals that resolve without follow-through on shorter timeframes.
The ADF-inspired filter is a simplified heuristic, not a formal statistical test. It does not guarantee that the adaptive scaling accurately reflects whether a market is trending or mean-reverting at any given moment.
The Fourier exponential decay smoothing is not a formal frequency-domain Fourier transform. The term is used descriptively to indicate the exponential weighting pattern, not to imply that the calculation resolves into sinusoidal components.
Extreme or sustained overbought/oversold readings do not guarantee a reversal. Strong trends can keep the oscillator pinned at extremes for extended periods.
The oscillator is bounded at ±100 by construction. This means that at extreme readings, additional strengthening of volume momentum does not move the line further — the clamping obscures incremental changes at extremes.
Past divergence performance on a given instrument is not indicative of future performance.
---
Originality Statement
The VZO concept is established in the public domain. This implementation departs from the standard in several meaningful ways. Using relative volume (each bar's volume divided by a rolling SMA of volume) rather than raw volume removes the absolute scale of volume from the oscillator's behavior — a standard VZO applied to a futures contract and a low-float equity will behave differently purely due to volume magnitude; this version will not. The RSI-style normalization of the volume-weighted momentum ratio is retained from the VZO concept but is applied to a momentum signal constructed differently from the standard signed-volume approach. The Fourier exponential decay smoothing layer is an original addition: it is not a standard EMA, WMA, or VWMA — it applies a decaying weight function that is conceptually distinct from any standard Pine Script built-in smoothing function, producing a cleaner oscillator output with less phase distortion than an equivalent EMA. The ADF-inspired adaptive multiplier is a real-time regime-sensitivity mechanism not present in any standard oscillator. The four-type divergence engine built into the same panel, detecting all four divergence classes simultaneously using pivot comparison logic, provides complete divergence coverage without requiring additional scripts or manual line drawing. The combination of these elements — relative-volume normalization, Fourier decay smoothing, adaptive trend scaling, blended output, flow momentum line, and full-coverage divergence detection — into a single oscillator panel represents an original synthesis that is not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Structural Deviation Compass [JOAT]Structural Deviation Compass
Introduction
The Structural Deviation Compass is an overlay indicator designed to map where price stands relative to its own statistical history. Rather than drawing fixed-distance envelopes or relying on a single moving average, it constructs a hybrid centerline from two distinct low-lag moving average types, then wraps that centerline in volatility-adaptive bands derived from Z-score normalization. A secondary oscillator layer — applied to RSI — creates a dual-confirmation signal gate that fires only when both price deviation and momentum reach simultaneous extremes. Shadow bands built from the Average True Range provide additional spatial context across three volatility tiers.
The indicator does not predict future price. It identifies statistically unusual deviations from an estimated mean structure and flags conditions where a reversion or continuation setup may be forming, subject to confirmation from the trader's own process.
Core Concepts
The ComboMA Centerline
The foundation of the indicator is a composite moving average called the ComboMA, formed by averaging two lines:
ALMA (Arnaud Legoux Moving Average): Uses a Gaussian-weighted kernel positioned asymmetrically along the lookback window. The offset and sigma parameters control how far toward the recent end the weight mass sits and how tightly it is concentrated. This produces a smooth line that tracks price closely while suppressing noise better than a simple EMA of the same length.
ZLMA (Zero-Lag Moving Average): Constructed by doubling a base EMA and subtracting a second EMA of that EMA — a technique that estimates and removes the inherent lag of an exponential average. The result is then smoothed once more to reduce the noise amplification that zero-lag constructions can introduce.
Averaging the two produces a centerline that carries reduced lag from the ZLMA side while retaining the smooth, noise-filtered character of the ALMA side. Neither line alone fully satisfies both goals; together they produce a more balanced result.
Z-Score Price Bands
Rather than plotting bands at a fixed multiple of a standard deviation (as Bollinger Bands do using a rolling standard deviation of price itself), the SDC first computes the deviation of close from the ComboMA, then Z-score normalizes that deviation series over a separate lookback window. The bands are then placed back on the price chart by multiplying the rolling standard deviation of deviations by the chosen Z-score threshold values.
The practical effect is that the band width reflects how unusual the current deviation is relative to the recent distribution of deviations — not simply how wide price has swung in a raw sense. Two threshold levels are provided, creating an inner and outer band pair on each side of the ComboMA.
RSI Z-Score
RSI is computed in the standard way, then subjected to the same Z-score normalization: the RSI value is compared to its own rolling mean and expressed in standard deviations. This removes the fixed-level bias of RSI (where 30/70 thresholds mean different things in different market regimes) and produces a momentum reading that is self-calibrating to recent RSI behavior.
Dual Z-Score Signal Gate
A long signal requires all of the following simultaneously:
Price Z-score below the negative trigger threshold (price is statistically far below the ComboMA)
RSI Z-score below the negative trigger threshold (momentum is statistically depressed)
RSI EMA below 38 (confirming a bearish momentum context rather than a pullback within strength)
The current bar closed above the prior bar's close (a micro-confirmation that selling pressure may be easing)
The bar is confirmed (signal does not repaint on the forming bar)
Short signals apply the mirror logic. The requirement for extremes in both dimensions simultaneously is intentionally strict — it filters out the many cases where price is extended but momentum is not, or vice versa.
ATR Shadow Bands
Three pairs of shadow bands are drawn around the ComboMA at 1x, 2x, and 3x of a rolling ATR. These are not signal bands — they serve as a spatial reference, helping to contextualize how far price has traveled from the estimated mean in volatility-adjusted terms. A move to the 3x ATR shadow in a low-volatility environment carries different significance than the same move in a high-volatility environment.
RGB Smooth Color Transition
The ComboMA line color transitions smoothly between a bull and bear palette by independently blending the red, green, and blue channels via EMA. Each channel tracks a target value set by the current bull/bear state, and converges toward it gradually. This avoids abrupt color flips and gives a visual sense of momentum continuity.
Gradient Bar Coloring
Individual bars are colored based on where the close sits within the band range relative to the ComboMA. Bars near the upper bands trend toward the bull color; bars near the lower bands trend toward the bear color. Bars near the ComboMA receive a neutral tone. This is a visual aid only and does not constitute a signal.
Information Table
A 9-row table displays the current readings for: market regime, price Z-score, RSI Z-score, RSI EMA, band width, signal strength, active signal, and ComboMA value. This gives a snapshot of the indicator's internal state without requiring the trader to hover over each plotted element.
---
Features
Hybrid ComboMA centerline combining ALMA and ZLMA
Volatility-adaptive Z-score bands at two threshold levels (inner and outer)
RSI Z-score normalization for regime-independent momentum reading
Dual Z-score signal gate requiring simultaneous extremes in price and momentum
Three-layer ATR shadow bands for spatial volatility context
Smooth RGB channel blending on the ComboMA line color
Gradient bar coloring based on position within band range
Real-time information table with 9 indicator state readings
Non-repainting signals (barstate.isconfirmed)
Fully toggleable visual components
---
Input Parameters
MA Length: Base length for the ZLMA and ATR calculations
ALMA Offset: Controls asymmetric weight positioning within the ALMA window (0 = old end, 1 = recent end)
ALMA Sigma: Controls weight concentration; lower values spread the weight, higher values tighten it
Z-Score Lookback: Rolling window for computing the mean and standard deviation of price deviations (default: 50)
Inner Band Threshold: Z-score level for the inner band pair (default: 1.5σ)
Outer Band Threshold: Z-score level for the outer band pair (default: 2.5σ)
RSI Length: Period for RSI calculation (default: 14)
RSI Z-Score Lookback: Rolling window for normalizing RSI
Signal Trigger: Z-score threshold required in both dimensions to generate a signal (default: 1.8σ)
ATR Multipliers: Multipliers for the three shadow band tiers (1x, 2x, 3x)
Visual Toggles: Individual on/off controls for bands, shadows, bar coloring, table, and signals
---
How to Use
Reading the centerline: The ComboMA acts as the estimated mean structure. Price consistently above it with a bull-colored line suggests sustained upward bias; price oscillating around it suggests a ranging environment.
Reading the bands: The inner bands (±1.5σ by default) represent moderately unusual deviations. The outer bands (±2.5σ by default) represent statistically rare deviations. A touch or breach of the outer band does not by itself mean a reversal is due — it means the move is statistically uncommon and warrants attention.
Reading the shadow bands: Use the ATR shadows to understand how far, in volatility-adjusted terms, price has moved from the ComboMA. Price at the 3x shadow while also at the outer Z-score band is a more notable condition than either reading alone.
Acting on signals: The dual Z-score signals flag confluent extremes. They should be used as an alert layer within a broader trading framework — not as standalone entry triggers. Consider the broader trend context, the timeframe, and supporting structure before acting.
Using the table: Monitor the signal strength reading to understand how close the current state is to triggering a signal. This is useful for watching a developing setup in real time.
Timeframe notes: The indicator functions on any timeframe. Higher timeframes produce fewer but more structurally significant signals. Lower timeframes will produce more signals, many of which will be noise. Adjust the Z-score lookback and trigger threshold accordingly.
---
Limitations
This indicator does not predict future price movement. All readings are descriptive of past and current bar data.
The ComboMA, like all moving averages, will lag price during sharp trend changes. The ZLMA component reduces but does not eliminate this lag.
Z-score bands assume that price deviations are approximately normally distributed. In instruments with fat-tailed distributions or during extreme events, the statistical thresholds will underestimate the probability of outlier moves.
Signals are non-repainting on confirmed bars but will update on the forming bar until it closes. Always wait for bar close before acting on a signal.
A signal firing does not mean price will reverse. Trending markets can sustain extreme Z-score readings for extended periods.
The RSI EMA threshold (38 for longs) is a fixed filter that may not suit all instruments or regimes. It should be adjusted or disabled if it is filtering out valid setups in the instrument being traded.
The ATR shadow bands are informational only and carry no predictive weight.
Past signal performance on a given instrument is not indicative of future performance.
---
Originality Statement
The ALMA and ZLMA are established concepts. The ComboMA is not either of them — it is a blended centerline that takes the asymmetric-weight smoothness of ALMA and the lag-reduction property of ZLMA and produces a composite that neither achieves individually. The Z-score normalization of price deviations is a statistical adaptation that makes the bands self-calibrating to the instrument's deviation distribution rather than fixed. Applying the same normalization independently to RSI produces a momentum reading that is self-referential to recent RSI behavior rather than anchored to universal threshold levels. The signal gate that requires simultaneous Z-score extremes in both price deviation and RSI — not one or the other — creates a logical AND condition that is substantially stricter than conventional oscillator crossovers or single-band-touch triggers. The three ATR shadow tiers, smooth RGB color blending, and gradient bar coloring are supporting visual constructs that serve interpretation rather than adding trading logic. The combination of these elements into a single overlay tool — ComboMA centerline, adaptive Z-score bands, normalized momentum gate, ATR spatial context, and state table — represents an original integration not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator
