[ A L P H A X ] VECTOR - Regime-Adaptive Flow EngineAlphaX VECTOR — Regime-Adaptive Flow Engine: Kaufman ER Regime Classification, KAMA Vector Line, Multi-Component Flow Score & Scalping-Optimized Entry Playbooks
AlphaX VECTOR is a professional-grade scalping system built around a fundamentally different architectural premise from every other indicator in the AlphaX suite: the market regime is identified first, and the entry playbook is selected automatically to match that regime. Most scalping systems apply the same entry logic regardless of whether the market is trending, ranging, or chopping — and then wonder why the same setup works brilliantly in one context and fails consistently in another. VECTOR solves this at the architectural level by running a three-metric regime classification engine (Efficiency Ratio, Choppiness Index, and ADX) that determines the current market character on every bar and locks in one of four states: Trend Bull, Trend Bear, Balance/Range, or Chop. Each state activates a different set of entry playbooks — micro-pullbacks to the Vector Line in trends, micro-impulse breaks in balance or trend, mean-reversion fades at band extremes in balance — and all entries are filtered through a 6-component Flow Vector score that measures the directional conviction of the current market from five independent dimensions. The result is a system where every signal is not just directionally filtered, but regime-appropriate — built for M1 through M15 scalping on gold, forex, indices, and crypto.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 The Core Philosophy — Regime First, Setup Second
The single biggest failure mode in scalping is applying trend-following entries in choppy markets and mean-reversion entries in trending markets. The market character changes continuously — a trending gold session can collapse into a tight range within minutes, and a balance period can explode into a directional impulse with no warning. Any fixed system that ignores this regime cycle will have extended periods of consistent losses whenever the market shifts character.
VECTOR's architecture inverts the standard approach. Instead of picking a setup type and then trying to filter bad signals, VECTOR determines the market's current character first — with three independent quantitative measurements — and then selects the correct playbook for that character. In Trend Bull, only pullback and impulse break setups fire. In Balance, only impulse breaks and band fades fire. In Chop, nothing fires. The dashboard explicitly tells you the active playbook at all times: SCALP PULLBACK ▲, SCALP PULLBACK ▼, SCALP FADE / BREAK, or NO TRADES.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The Regime Engine — Three Independent Classifiers
The regime is determined on every bar by three completely independent measurements. The combination of all three produces a robust, multi-dimensional picture of market character that no single indicator alone could provide.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Kaufman Efficiency Ratio (ER)
The Efficiency Ratio measures how directionally efficient price movement has been over the lookback period (default: 10 bars). It divides the net directional change in price by the total path traveled — the sum of all individual bar-to-bar movements. A ratio close to 1.0 means every bar moved in the same direction — maximum efficiency, maximum trend. A ratio close to 0.0 means the total path traveled far exceeds the net movement — price oscillated back and forth with no net progress — maximum chop, minimum efficiency.
ER thresholds:
ER ≥ 0.35 (trend minimum) — price is moving with high directional efficiency. The market is trending and momentum setups are appropriate
ER ≤ 0.22 (chop maximum) — price is oscillating with low efficiency. Combined with low ADX, this triggers the CHOP regime and blocks all signals
Between thresholds — transitional state. Not clear trend, not clear chop
The ER is displayed live on the dashboard with color coding — yellow-green when in trend territory, orange when in chop territory, neutral otherwise. This single number tells you the fundamental quality of price direction at any given moment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Choppiness Index
The Choppiness Index (CI) provides an independent measure of market randomness using a logarithmic ratio formula. It calculates the sum of all individual ATR readings over the lookback period (default: 14 bars) divided by the total high-low range of that period. High CI values indicate the range of the period was consumed by oscillating ATRs — choppy movement. Low CI values indicate the period's range was established by directional movement.
CI interpretation:
CI above 61.8 — the market is in a Golden Ratio chop zone. Institutional consensus is absent. All signals are suppressed when this threshold is exceeded (configurable, default: 61.0)
CI below 38.2 — maximum trending efficiency. In practice, CI values this low indicate an impulsive directional move in progress
CI between 38.2 and 61.8 — transitional territory, neither pure trend nor pure chop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ADX (Average Directional Index)
The ADX provides the most widely recognized trend strength measure, confirming whether a directional bias measured by ER and CI is backed by genuine momentum. ADX above the configured minimum (default: 20) is required for Trend Bull or Trend Bear regime classification. Below the minimum, even if ER is high and CI is low, the system classifies as Balance rather than Trend — the directional efficiency exists but the momentum confirmation is absent.
Combined regime logic:
CHOP (0) — CI above threshold OR (ER below chop max AND ADX below trend min). The market is in an untradeable oscillating state. Dashboard shows ⛔ CHOP — STAND ASIDE. All signals blocked
TREND BULL (1) — not chop, ADX above trend min, ER above trend min, Flow Vector positive, price above Vector Line. Playbook: SCALP PULLBACK ▲
TREND BEAR (2) — same conditions with Flow Vector negative and price below Vector Line. Playbook: SCALP PULLBACK ▼
BALANCE (3) — not chop, but ADX or ER conditions for trend not met. Market is directional enough for scalping but not in a clear trend. Playbook: SCALP FADE / BREAK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 The KAMA Vector Line — Adaptive Trend Reference
The Vector Line is a Kaufman Adaptive Moving Average (KAMA) — the same ER-weighted adaptive EMA that forms the basis of the regime classification. It is the central price reference for all pullback entries and a key component of the Flow Vector score.
Why KAMA over a standard EMA: A standard EMA responds with the same speed regardless of market conditions. In a trending market, the EMA lags price and creates false pullback signals. In a choppy market, it whipsaws. KAMA self-adjusts — it moves quickly in trending conditions (tracking price closely) and moves slowly in choppy conditions (staying stable). This means the Vector Line acts as an accurate, self-calibrating trend reference that naturally tightens around price during strong trends and widens away from price during chop.
Vector Line color coding: The line is plotted in gradient color based on the current Flow Vector score — bright yellow-green when the Flow Vector is strongly positive (above the Strong Vector threshold), bright red when strongly negative, fading to semi-transparent in neutral territory. At a glance, the Vector Line's color tells you the directional conviction of the current market.
Vector Line price: The exact current Vector Line price is displayed on the dashboard as VECTOR LINE in real time — the precise price level where pullback entries are being monitored.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ The Flow Vector — 6-Component Directional Score
The Flow Vector is a composite directional score ranging from -100 (maximum bearish conviction) to +100 (maximum bullish conviction). It is computed on every bar from six independent measurements, each capturing a different dimension of directional bias.
Component 1 — EMA Stack (up to ±22 points):
A triple EMA (8/21/50) full stack alignment — EMA 8 above EMA 21 above EMA 50, with price above EMA 8 — scores +22 points for bull, -22 for bear stack. Partial alignment (price simply above or below EMA 21) scores ±8. This is the momentum structure layer.
Component 2 — Vector Line Slope (up to ±18 points):
Whether the KAMA Vector Line is currently rising or falling. A rising Vector Line in a bull trend confirms the adaptive average is itself accelerating — ±18 points. This ensures the entry direction is aligned with the KAMA's own momentum, not fighting it.
Component 3 — OBV Slope (up to ±15 points):
The slope of On-Balance Volume over the configured lookback period (default: 10 bars). A rising OBV slope means net buying pressure is accumulating (each up-close bar adds volume, each down-close subtracts). A falling slope confirms net selling. ±15 points. This is the volume accumulation/distribution layer — independent of price movement.
Component 4 — Volume Delta (up to ±12 points):
The estimated directional volume pressure — bull volume EMA minus bear volume EMA using the candle range position method. ±12 points. This captures intrabar volume directional bias as opposed to OBV's inter-bar accumulation bias.
Component 5 — HTF EMA Bias (up to ±18 points):
The higher timeframe EMA structure — fast EMA above slow EMA with close above fast EMA (bull) or the inverse (bear). ±18 points. This ensures the Flow Vector reflects the macro institutional direction, not just the current timeframe's local momentum.
Component 6 — Price vs Vector Line (up to ±15 points):
Whether the current close is above or below the KAMA Vector Line. ±15 points. Price above the Vector Line in a bull regime confirms the pullback has not reached the Vector Line yet (trend intact). Price below confirms the line has been reached or breached (potential reversal zone).
Flow Vector thresholds:
+40 to +100 — strong bull flow. Setup A (Trend Micro-Pullback) long entries require this minimum
+65 to +100 — extreme bull flow. Used as a fade signal when combined with upper balance band touch
-40 to -100 — strong bear flow. Setup A short entries require this minimum
-65 to -100 — extreme bear flow. Fade signal condition for lower band touches
-39 to +39 — neutral flow. Directional conviction insufficient for Trend regime entries
Flow Acceleration:
In addition to the absolute score, VECTOR checks whether the Flow Vector is currently accelerating — increasing for two consecutive bars (bull) or decreasing for two consecutive bars (bear). Acceleration is a hard requirement for Setup A (Trend Micro-Pullback) entries, ensuring the entry occurs when flow is building rather than stalling or reversing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕯 Scalping Candle Quality — The Pin Bar Filter
VECTOR applies a specific, tight candle quality standard for all entry types — the scalping pin bar. All four conditions must be simultaneously true:
Bull pin bar requirements:
Bullish close (close above open)
Lower wick covers at least 42% of the total bar range — the rejection of the low is dominant
Upper wick is at most 32% of the total range — no significant selling into the close
Body size at least 0.10× ATR — not a doji or near-doji
Close in the upper 28% of the bar range (upper quartile) — the bar closed strongly bullish
Bear pin bar requirements: The mirror conditions — upper wick dominant (42%+ of range), lower wick minimal (32% max), small minimum body, close in the lower quartile.
Why this specific candle quality standard for scalping: Scalping entries are executed in the wick of the signal candle — buying at the low of a bull pin bar, selling at the high of a bear pin bar. A candle that lacks a dominant rejection wick provides no clear structural fill level. The upper quartile close requirement for bulls ensures the rejection was decisive — not a bar that dipped into support and then closed mediocre. These parameters are significantly stricter than the standard 50% wick filter used in MERIDIAN and PIVOT, reflecting the precision required for scalping entries.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Four Setup Types — Regime-Gated Playbooks
VECTOR implements four distinct setup types, each activated only in the appropriate regime state. The active playbook is displayed on the dashboard as a PLAYBOOK row, telling you exactly which setups are available right now.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup A — Trend Micro-Pullback (Regime: Trend Bull or Trend Bear only)
The primary VECTOR scalp entry. Fires in Trend Bull regime for longs, Trend Bear for shorts.
Full condition stack for long:
Regime is Trend Bull (regime == 1)
Flow Vector is strongly bullish (≥ +40)
Flow Vector is accelerating (rising for two consecutive bars)
Price has touched the EMA 8 or Vector Line from above — the micro-pullback has reached the trend reference level. Touch tolerance is ±0.22× ATR (configurable)
A qualifying bull pin bar has formed at the touch
The recent 5-bar low has dipped into the EMA 8 / Vector Line zone (confirming the touch was genuine, not just proximity)
Price is not extended above the Vector Line by more than the maximum extension setting (default: 1.0× ATR) — the anti-chase filter
RSI(7) is between 40 and 70 — not already overbought, not in a capitulation zone
Why this is the core scalp setup: In a confirmed Trend Bull regime with accelerating flow, the EMA 8 and Vector Line are the natural pullback magnets. Institutional buyers who are long in the trend use these levels to add on dips. The pin bar at the level confirms they stepped in. The anti-extension filter prevents chasing a move that has already run 1× ATR above the Vector Line — exactly the stretch that precedes a deeper pullback.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup B — Micro Impulse Break (Regime: Trend or Balance)
A momentum continuation scalp that fires when price breaks out of a micro swing range with a qualifying body and volume delta confirmation.
Key conditions for long:
Regime is Trend Bull or Balance (the setup fires across both regimes as momentum can develop in either)
Price closes above the highest high of the last 4 bars (configurable lookback) on the previous bar — a genuine micro swing break
The break bar's body meets the minimum body threshold (default: 0.85× the impulse body minimum × ATR)
Volume delta is positive — buying pressure drove the break
A qualifying bull pin bar is present on the break bar
HTF bias aligns — long only when the higher timeframe confirms bullish
Price is not over-extended above the Vector Line (anti-chase filter)
What this setup captures: The breakout from a micro consolidation range with volume confirmation — the intrabar equivalent of a structure break. On a 1-minute chart, a 4-bar micro range that breaks with a strong body and bull delta is a clean scalp entry with a tight stop at the bottom of the range. In Balance regime, this setup provides the best entries because the market character does not support pullback trades but does support momentum breaks on sufficient flow.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup C — Range Fade / Band Extreme (Regime: Balance only)
The mean-reversion scalp. Fires only in Balance regime when price reaches the outer balance band with an exhausted or reversing Flow Vector.
Short fade conditions:
Regime is Balance (regime == 3)
Price has touched the upper balance band (within 0.08× ATR of the upper band)
The Flow Vector is either in extreme bull territory (≥ +65, meaning the move to the band is overextended) OR the flow is beginning to fade (Flow Vector is falling and was recently above +53)
A qualifying bear pin bar confirms the rejection at the band
RSI(7) is above 58 — confirming the RSI is elevated at the band touch, consistent with a reversal setup
Why band fades only fire in Balance: In a Trend Bull regime, price touching the upper balance band is a continuation event — the trend is simply pushing to the next level. Fading that in a trend produces the most reliable losses in scalping. Setup C is therefore hard-gated to Balance regime only, where the market has proven it is oscillating rather than trending, and the balance band genuinely represents a mean-reversion boundary.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup D — Vector Shift / Flow Zero-Cross (Off by default)
A legacy setup type that fires when the Flow Vector crosses from negative to positive (long) or positive to negative (short) with a strong body candle and positive volume delta. Off by default on fast timeframes because flow zero-crosses on M1–M5 produce excessive noise. Available for traders who want to experiment with flow momentum entries on H1+ timeframes where the zero-cross carries more structural weight.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Point Scalp-Weighted Confluence Score
VECTOR uses a setup-weighted scoring system specifically calibrated for scalping frequency and quality:
Score structure:
Setup Type (up to 2 points) — primary setups (Trend Micro-Pullback, Micro Impulse) score 2 points. Secondary setups (Range Fade, Vector Shift) score 1 point. This weighting reflects that Setup A and B have more prerequisite conditions and are inherently higher quality
Flow Acceleration (1 point) — Flow Vector is actively building in the signal direction over the last two bars. Ensures the entry coincides with momentum building, not stalling
HTF Bias (1 point) — higher timeframe EMA confirms the signal direction
Volume Expansion (1 point) — current bar volume exceeds the volume average by the configured minimum (default: 1.05×)
Non-Chop Market (1 point) — the market is not in Chop regime. This point is also enforced as a hard gate — signals cannot fire in Chop regardless of the score
RSI(7) Filter (1 point) — the 7-period RSI is in the acceptable zone for the signal direction (40–70 for longs, 30–60 for shorts)
Maximum score: 7. Default minimum: 4. The scalp-weighted system means that a Setup A or B entry with flow acceleration, HTF alignment, and volume can reach 5 points from the setup type, flow, HTF, and volume components alone — a clean high-quality signal. Setup C entries require more supporting factors to reach the threshold because their 1-point setup score means more of the other layers must confirm.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Anti-Chase & Quality Filters
VECTOR includes several anti-chase and quality gates specifically designed for scalping precision that do not appear in the other AlphaX indicators.
Extension Filter: No long signal fires if price is already above the Vector Line by more than the configured maximum extension (default: 1.0× ATR). No short signal fires if price is already below by that much. This single filter eliminates the most common scalping failure — entering a pullback after it has already run too far from the reference level, leaving insufficient room for the signal to develop before hitting the stop.
Dip/Rip Confirmation: For Setup A entries, the 5-bar lowest low (bull) or highest high (bear) must have reached within a tight ATR tolerance of the reference lines. This confirms that the touch was genuine — price actually dipped into the zone — rather than just being close to it without contacting it.
RSI(7) Micro Filter: A 7-period RSI gate blocks entries when RSI is already overbought (above 70 for longs) or in a knife-catch zone (below 40 for shorts). On scalping timeframes, entering a long when 7-bar RSI is already at 75 means you are entering after the move is exhausted. This filter alone dramatically reduces the worst class of setup A false signals — those that occur when price is touching the EMA 8 on the way back down through it rather than bouncing off it.
Flow Acceleration Requirement: Setup A requires the Flow Vector to be accelerating (not just positive) for two consecutive bars. A stale, high but flat Flow Vector indicates the move is decelerating — the opposite of the momentum condition that produces clean scalp continuations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Scalp Entry Reference — Wick-Based Positioning
Unlike the other AlphaX indicators where the entry is taken on the close or next open, VECTOR's entry reference is the rejection wick of the signal candle — specifically the bar's low (for bull signals) or high (for bear signals). This is the optimal scalp fill zone.
Why the wick, not the close: A scalp pin bar with a 42%+ lower wick has a significant low-to-close range. Entering at the close gives up nearly half that range unnecessarily. The institutional scalp entry is at the wick extreme — the exact level where buyers stepped in and stopped the selling. A limit order at the bar's low (bull) captures the optimal risk/reward because the stop goes below that low, and the full bar range is available as immediate profit space.
Entry reference visualization: A cross marker is plotted at the signal bar's low (bull) or high (bear) — the wick entry reference — distinct from the signal triangle. This gives you the precise price at which to place a limit order if you prefer limit entry over market-on-open execution.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 17-row real-time dashboard displays the complete internal state across five sections.
REGIME
Market Regime — current regime state with icon: ⛔ CHOP — STAND ASIDE, ▲ TREND BULL, ▼ TREND BEAR, or ◆ BALANCE / RANGE. This is the primary trading context indicator
Playbook — the active setup playbook matching the current regime: NO TRADES, SCALP PULLBACK ▲, SCALP PULLBACK ▼, or SCALP FADE / BREAK. Tells you exactly which setup types can fire
Flow Vector — the live composite Flow Vector score with + or - sign. Yellow-green when strongly positive, red when strongly negative, neutral otherwise
METRICS
Efficiency — current Kaufman Efficiency Ratio value. Yellow-green when in trend territory (≥ threshold), orange when in chop territory (≤ chop max)
Chop Index — current Choppiness Index value. Orange when above the stand-aside threshold
ADX — current ADX value. Yellow-green when above the trend minimum
Vol Delta — ▲ BUYERS or ▼ SELLERS based on the current volume delta direction
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Session — ✓ ACTIVE or ✗ OFF
CONFLUENCE
Bull Score — live 0–7 score. Background highlights yellow-green when threshold is met and regime is not Chop
Bear Score — live 0–7 score. Background highlights red when threshold is met and regime is not Chop
Vector Line — the exact current KAMA Vector Line price, color-coded by Flow Vector strength
Live confluence label: During non-chop regimes, a small B x/7 · S x/7 label appears near the Vector Line on the current bar, updating in real time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
KAMA Vector Line — the adaptive trend reference line, color-coded by Flow Vector strength. Bright yellow-green when bull flow is strong, bright red when bear flow is strong, fading to semi-transparent in neutral/weak territory
Balance Bands (upper, lower, midline) — the Bollinger-style bands used as reference for Balance regime and Setup C fade entries. Purple-tinted at low opacity
▲ Label with setup tag (below bar, yellow-green) — bull scalp signal. Tag shows A, B, C, or D identifying which setup type fired. Tooltip shows the full setup description
▼ Label with setup tag (above bar, red) — bear scalp signal
Entry Reference Cross (× marker) — plotted at the signal bar's low (bull) or high (bear) — the optimal scalp limit entry price
SL Guide (red dotted circles) — stop loss reference below the EMA 8 and Vector Line minimum (bull) or above (bear), plus ATR buffer
TP Guide (yellow-green dotted circles) — dynamically computed reward target at R multiple
Regime Change Labels (optional) — small labels at regime transition bars showing TREND ▲, TREND ▼, or BALANCE. Off by default — regime visible on dashboard
Live confluence label — B x/7 · S x/7 near the Vector Line on the current bar
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX VECTOR — Step by Step
Step 1 — Read the Regime First
Check the Market Regime row on the dashboard. ⛔ CHOP — do nothing, close the chart if needed. ◆ BALANCE — Setup B and C available. ▲ TREND BULL or ▼ TREND BEAR — Setup A is active
Check the Playbook row — it tells you exactly which setup type is currently firing-eligible
Note the Flow Vector value. Above +40 in Trend Bull is the optimal Setup A environment. Below +40 but still positive suggests the trend may be weakening
Step 2 — Prepare the Level
In Trend Bull, identify where the Vector Line is currently sitting (Vector Line on dashboard). This is your Setup A anchor level — watch for price to pull back toward it
Note the EMA 8 on the chart. For Setup A, price must touch either EMA 8 or the Vector Line — whichever is closest to price is the active support
In Balance, note where the upper and lower balance bands sit. These are the Setup C fade boundaries
Step 3 — Enter on the Signal Label
A ▲ label below the bar with setup tag is the core scalp signal — Trend Micro-Pullback long. All conditions including regime, flow acceleration, line touch, pin bar, RSI, and extension filter are confirmed
The entry reference × marker shows the wick low — the optimal limit order price
The SL guide is at the minimum of EMA 8, Vector Line, and the bar low, minus ATR buffer. This is a tight structural stop designed for scalping
The TP guide is at the R-multiple target. Default 2.0R for a tight scalp stop produces a larger absolute target than most other AlphaX indicators due to the compressed ATR-based stops
Step 4 — Manage the Scalp
Scalp trades in VECTOR are short-duration by design — move the stop to breakeven after any meaningful move in your favor
Watch the Flow Vector on the live label — if it drops below +40 during a long trade, the bull flow is weakening. Consider taking profit early
If the regime changes to Chop during an open trade, take profit immediately — the market character has changed and the setup's underlying logic no longer applies
Setup A targets in strong Trend Bull regimes can be extended toward the band extremes. In strong trends, the first R-target is often just the beginning of a larger move
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Market Regime shows ⛔ CHOP — this is the clearest possible signal to step back. No signals will fire, and any manual entries during chop carry statistically negative expectation on scalping timeframes
Chop Index above 61 on the dashboard — even if regime hasn't fully shifted to CHOP, a CI above 61 is a warning that market character is deteriorating. Reduce size or stop trading
Flow Vector is between -39 and +39 — the directional conviction is insufficient for Setup A. In this zone, the market is neither clearly bullish nor bearish at the flow level. Wait for the vector to commit above ±40
Flow Vector is high but flat (no acceleration) — a Flow Vector at +55 that has been flat for 5 bars means the momentum is stale. Setup A requires active acceleration, not just a high score. The signal will be blocked, but the absence of acceleration is itself a warning
HTF Bias opposes the signal direction — scalping against the higher timeframe institutional flow is the highest-risk scalp. If HTF shows BEAR and you are attempting Setup A longs, every entry is fundamentally counter-trend
RSI(7) is above 70 at a bull pin bar — the 7-bar RSI filter will block the signal, but if you see a bull pin at the Vector Line with RSI at 72, it is a warning that the touch is occurring after an overbought condition rather than at a healthy pullback
Regime changes rapidly between states — if the regime is cycling between Trend Bull and Balance or Balance and Chop multiple times per session, the market is in an indecisive transition phase. These transitions produce the most noise and the lowest signal quality across all setup types
The ideal VECTOR scalp setup:
Trend Bull or Trend Bear regime sustained for 5+ bars
Flow Vector at ±55 or above, actively accelerating
HTF aligned with regime direction
Price pulling back cleanly to the Vector Line / EMA 8 zone with a tight, contained range
Bull or bear pin bar with lower/upper wick of 50%+ of range, closing in the upper/lower quartile
RSI(7) between 45–60 for longs or 40–55 for shorts — the healthy pullback RSI zone
Volume above average, volume delta confirming direction
Score at 5/7 or higher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🧭 Three-metric regime classification engine — Kaufman Efficiency Ratio, Choppiness Index, and ADX combined to classify every bar as Trend Bull, Trend Bear, Balance, or Chop
📊 Active playbook display — dashboard tells you exactly which setup type is eligible right now: SCALP PULLBACK ▲/▼, SCALP FADE / BREAK, or NO TRADES
📈 KAMA Vector Line — adaptive moving average that tightens in trends and stabilizes in chop, providing the most accurate scalp reference line available
⚡ 6-component Flow Vector — EMA Stack, KAMA Slope, OBV Slope, Volume Delta, HTF Bias, and Price vs Vector Line combined into a -100 to +100 directional conviction score
🔴 Flow Acceleration detection — Setup A requires the Flow Vector to be actively building for two consecutive bars, blocking stale or decelerating flow entries
🏷 Four regime-gated setup types — Setup A (Trend Micro-Pullback), Setup B (Micro Impulse Break), Setup C (Balance Band Fade), Setup D (Vector Shift, off by default)
🕯 Strict scalping pin bar standard — lower/upper wick ≥ 42% of range, opposing wick ≤ 32%, minimum body, close in upper/lower quartile — the highest candle quality standard in the AlphaX suite
🛡 Anti-chase extension filter — blocks signals when price has already moved too far from the Vector Line, eliminating chasing entries
📍 Wick-based entry reference — × marker at the signal bar's wick extreme for optimal limit order placement
🔢 RSI(7) micro filter — 7-period RSI gates block overbought longs and oversold shorts at the exact scalp entry bar
📊 Live Efficiency, Choppiness, and ADX metrics on dashboard — the three regime classification inputs displayed with live values and color-coded thresholds
🎨 Flow Vector–colored Vector Line — line color reflects directional conviction in real time from strong bull to neutral to strong bear
📊 17-row live dashboard — Regime, Playbook, Flow Vector, Efficiency, Chop Index, ADX, Vol Delta, HTF Bias, Session, Confluence, and Vector Line price updated every bar
🔔 5 alert conditions — long entry, short entry, chop warning, trend bull regime change, trend bear regime change
⚙ Fully configurable — ER lookback and thresholds, CI length and maximum, ADX length and minimum, KAMA parameters, OBV and delta lengths, flow vector thresholds, all four setup enables, pullback tolerance, anti-chase extension, impulse body minimum, confluence minimum, HTF timeframe and EMAs, volume filter, session, SL/TP parameters, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Regime Engine
ATR Length — ATR lookback for all ATR-relative calculations (default: 14)
Efficiency Ratio Length — Kaufman ER lookback period (default: 10)
ER Min for Trend Regime — minimum ER to qualify as trend (default: 0.35)
ER Max for Chop Regime — maximum ER that contributes to chop classification (default: 0.22)
Choppiness Index Length — CI calculation lookback (default: 14)
Chop Index — Stand Aside Above — CI threshold above which all signals are suppressed (default: 61.0)
ADX Length — ADX calculation lookback (default: 14)
ADX Min for Trend — minimum ADX for Trend Bull or Trend Bear classification (default: 20.0)
Balance Band Length / Mult — parameters for the balance band Bollinger calculation (defaults: 20 / 2.0)
Flow Vector
Vector Line (KAMA) Length — KAMA lookback period (default: 21)
KAMA Fast / KAMA Slow — KAMA smoothing constants (defaults: 2 / 30)
OBV Slope Length — lookback bars for OBV slope calculation (default: 10)
Volume Delta Length — EMA smoothing for volume delta estimation (default: 14)
Strong Vector Threshold — minimum absolute Flow Vector for strong directional condition (default: 40)
Extreme Vector (range fade) — Flow Vector level triggering the extreme condition for Setup C fades (default: 65)
Entries & Confluence (Scalping)
Setup A · Trend Micro-Pullback — toggle the primary trend scalp setup
Setup B · Micro Impulse Break — toggle the momentum continuation scalp
Setup C · Range Fade (band extreme) — toggle the balance band mean-reversion scalp
Setup D · Vector Shift (legacy) — toggle the flow zero-cross setup (default: off)
Pullback Touch Tolerance (xATR) — ATR tolerance for EMA 8 / Vector Line touch detection (default: 0.22)
Impulse Min Body (xATR) — minimum body size for Setup B impulse and Setup D shift candles (default: 0.55)
Max Extension from Vector (xATR) — maximum allowed distance from Vector Line before anti-chase blocks the signal (default: 1.0)
Micro Swing Lookback — bars for the Setup B micro swing high/low reference (default: 4)
Min Confluence Layers (of 7) — minimum score to fire a signal (default: 4)
Show Entry Signals — toggle signal labels
Show Confluence Label — toggle the live B/S score label near the Vector Line
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 3)
Filters
HTF Trend Filter — toggle higher timeframe EMA alignment requirement
HTF Timeframe — higher timeframe for EMA data (default: 60-minute)
HTF Fast / Slow EMA — EMA periods on the HTF (defaults: 21 / 55)
Volume Confirm — toggle volume expansion requirement
Min Volume vs Avg — minimum volume ratio (default: 1.05)
Volume Avg Length — SMA length for volume baseline (default: 20)
Session Filter — toggle active hours restriction (default: off)
Active Session — configurable session window
Exit Guidance
Show SL / TP Guides — toggle stop and target circle plots
SL Distance (xATR) — ATR buffer added beyond the EMA 8 / Vector Line stop anchor (default: 0.85)
TP Reward (R) — take profit as a multiple of the actual risk (default: 2.0)
Display
Show Vector Line (KAMA) — toggle the adaptive trend reference line
Show Balance Bands — toggle the BB-style balance band plots
Show Regime Change Labels — toggle small regime transition labels on regime-change bars (default: off)
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals and indicators
Bear / Bear Bright — red family for bearish signals
Chop / Caution — orange for chop regime and caution states
Balance / Vector — purple for balance bands, Vector Line neutral state, and equilibrium elements
SL Guide / TP Guide — stop and target circle colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (5 total)
Entry Alerts
Vector Long — scalp long signal fired. Wick rejection entry confirmed with all regime and confluence conditions met
Vector Short — scalp short signal fired
Regime Alerts
Vector Chop Warning — market has entered Chop regime. Stand aside until regime clears
Vector Trend Bull — market has transitioned to Trend Bull regime. Watch Vector Line for Setup A pullback opportunities
Vector Trend Bear — market has transitioned to Trend Bear regime. Watch Vector Line for Setup A short pullback opportunities
All alert messages are formatted as const strings for clean webhook and notification platform integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M1–M5 :
Cooldown at 3 bars — fast timeframes produce setups in rapid succession. A 3-bar cooldown prevents back-to-back signals on consecutive bars while allowing reasonable signal frequency
SL at 0.85× ATR — tight scalp stop anchored to the EMA 8 / Vector Line zone. The strict pin bar requirement ensures the signal bar's wick provides meaningful structural support, so the stop does not need to be large
TP at 2.0R — on M1–M5 with a 0.85× ATR stop, 2.0R produces a tight, achievable target during normal trending conditions
HTF at 60-minute — the standard intraday reference for M1–M5 scalping
Volume at 1.05× average — a very low multiplier appropriate for scalping timeframes where volume spikes are smaller and entry bars do not always show dramatic volume expansion
For other instruments or timeframes, adjust:
M15–H1 intraday — increase ER Length to 14, increase Chop Length to 20, increase CI stand-aside to 62, increase ADX minimum to 22, increase Cooldown to 6, increase TP to 2.5–3.0R
Crypto (BTC, ETH) — increase ATR Length to 20 for smoother ATR on high-volatility instruments, increase ER threshold to 0.40 for trend classification on more volatile assets
Indices (NAS100, US30) — use session filter restricted to market hours, increase ADX minimum to 22, consider enabling Setup D for the sharper zero-cross moves typical of index momentum
Fewer, higher-quality signals — raise Min Confluence to 5–6, increase ER trend minimum to 0.40, reduce CI stand-aside to 58, increase pullback touch tolerance slightly to 0.25 for tighter reference line proximity
Higher signal frequency — lower Min Confluence to 3, enable Setup D, reduce cooldown to 2, disable HTF filter on fast timeframes where the 60-minute EMA can lag too much
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
⚡ Pure scalpers on M1–M5 — VECTOR is the only indicator in the AlphaX suite specifically designed for sub-5-minute scalping. Every parameter — the pin bar standard, the wick entry reference, the tight ATR stop, the acceleration requirement, the anti-chase filter — is calibrated for fast-timeframe execution
🧭 Regime-aware traders — traders who understand that different market conditions require different strategies will immediately recognize the value of having the regime identified and the playbook selected automatically
🎯 Precision entry traders — the wick-entry reference and the strict pin bar requirements make VECTOR ideal for traders who want precise fill zones rather than market-on-close entries
📊 Traders who study market microstructure — the Efficiency Ratio, Choppiness Index, and KAMA components expose the internal mechanics of market character in ways that standard trend indicators do not
🔴 Traders who are burned by chasing — the anti-extension filter and RSI(7) gate are built specifically to stop the two most common scalping failures: entering too late after the move has already extended, and entering when momentum is actually exhausted
⚠ Traders who overtrade in choppy conditions — the Chop regime is the most powerful feature for discipline. When the dashboard shows ⛔ CHOP — STAND ASIDE, the system enforces what many traders cannot enforce themselves
🏦 Gold and forex scalpers — the default settings are calibrated for XAUUSD and major forex pairs, which exhibit the clearest regime cycling of any liquid instruments due to their session-driven institutional flows
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. All regime classification, Flow Vector, setup conditions, and confluence scoring finalize on confirmed bars only
The KAMA Vector Line has a warm-up period equal to the KAMA Length setting. On charts with insufficient bar history, the Vector Line may not display correctly until enough bars accumulate
The Efficiency Ratio and Choppiness Index require their full lookback periods to produce accurate readings. On charts with fewer bars than the longest lookback, readings may be imprecise during the initial warm-up period
The anti-chase extension filter uses the distance from close to the Vector Line. In fast-moving scalp conditions, this filter can sometimes block entries that a discretionary trader would take. Increase the extension maximum if this becomes a frequent issue on your instrument
The signal cooldown of 3 bars is deliberately short for scalping timeframes. On M1 charts, 3 bars = 3 minutes — sufficient to prevent back-to-back duplicate signals while allowing rapid sequential setups in trending conditions
Setup D (Vector Shift) is off by default and is not recommended for M1–M5 scalping. Flow Vector zero-crosses on fast timeframes occur too frequently and with insufficient signal-to-noise ratio to be useful without additional filtering. Consider enabling it only on H1+ timeframes
The balance bands in VECTOR are Bollinger-style ATR-smoothed bands used purely as visual references and Setup C trigger levels. They are not the same as the ANCHOR adaptive bands and do not produce trailing stop functionality
The indicator does not track open positions or P&L and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for scalpers who know that trading the wrong setup in the wrong regime is not a signal problem — it is a system architecture problem. Indicator

NLMS Volatility Trail [BackQuant]NLMS Volatility Trail
Overview
NLMS Volatility Trail is an adaptive trend-following overlay that combines a machine-learning style adaptive filter with a volatility-based trailing structure. It is built around the Normalized Least Mean Squares (NLMS) algorithm, then converts that adaptive estimate into an ATR-based trailing line designed to follow directional regimes while filtering out minor noise.
The indicator has two core layers:
An NLMS adaptive filter , which learns a dynamic price estimate from prior bars.
An ATR volatility trail , which converts that learned estimate into a step-like directional trailing structure.
The goal is to produce a trend line that is more adaptive than a traditional moving average and more structured than a raw adaptive filter. The NLMS engine learns the underlying price path, while the ATR trail adds volatility-aware confirmation so trend shifts only occur when the adaptive estimate moves meaningfully.
Core idea
Most trend filters use fixed smoothing rules. An EMA, SMA, WMA, or HMA always applies the same mathematical weighting scheme regardless of whether the market is trending, ranging, expanding, or compressing.
NLMS is different. It continuously updates its internal weights based on prediction error.
This means the filter is not just averaging price. It is constantly asking:
How well did the previous weighting structure predict the current bar?
How large was the error?
How should the weights adjust to reduce future error?
The second layer then takes that adaptive estimate and applies an ATR-based trailing mechanism around it. This creates a volatility-adjusted trend trail that reacts to confirmed shifts while ignoring smaller movements that do not exceed the range structure.
What NLMS is
NLMS stands for Normalized Least Mean Squares . It is an adaptive filtering algorithm from digital signal processing. It is closely related to the original LMS algorithm developed by Bernard Widrow and Ted Hoff, which became one of the foundational online learning methods used in adaptive systems.
Adaptive filters have historically been used in:
Noise cancellation
Echo cancellation
Telecommunications
Radar and sonar processing
Signal prediction
Control systems
The basic purpose is to estimate or predict a signal while continuously adapting to changing conditions.
In trading terms, this indicator uses NLMS to build a learned estimate of price from prior bars.
How the NLMS filter works
The filter uses a set of historical inputs called taps .
If taps = 72, the model uses the previous 72 bars:
source
source
source
...
source
Each tap has a learned weight.
The prediction is calculated as:
prediction = w1 × source + w2 × source + ... + wM × source
The filter then compares the prediction to the actual current source:
error = source - prediction
That error drives the weight update.
If the prediction was poor, the weights adjust more.
If the prediction was accurate, the weights adjust less.
This creates an adaptive estimate that evolves with market behavior.
Why it is normalized
The normal LMS algorithm updates weights based on the raw input and prediction error. The issue is that if the input signal becomes large or volatile, updates can become unstable.
NLMS solves this by dividing the update by the input power:
power = sum(source ²)
The update becomes:
w = w + (μ / (ε + power)) × error × input
This normalization makes the learning process more stable across different volatility environments.
When the input power is high:
Updates are scaled down.
The filter avoids overreacting.
When the input power is low:
Updates are allowed to remain meaningful.
This is why NLMS is better suited to markets than a basic adaptive filter. Markets constantly shift between quiet and volatile regimes.
Weight initialization
The script initializes all weights equally:
weight = 1 / M
This means the filter starts with an SMA-like prior. Before learning begins, every historical bar contributes equally.
Over time, the filter adapts away from that equal-weight baseline and learns its own weighting structure.
Inputs that control the NLMS engine
Filter Taps (M)
Controls how many historical bars the model learns from.
Higher taps:
More memory
Smoother adaptive estimate
Slower response to regime change
Lower taps:
Less memory
Faster reaction
More noise sensitivity
Step Size (μ)
Controls the learning rate.
Lower μ:
Slower learning
Smoother output
More stable
Higher μ:
Faster learning
More responsive
Can become noisy if too aggressive
This is one of the most important settings. It controls how quickly the model changes its internal weights.
Regularization (ε)
Prevents instability when input power is very low.
It acts as a stabilizer in the denominator:
ε + power
Higher values make updates more conservative.
Lower values allow stronger adaptation but can become less stable in quiet conditions.
From adaptive filter to volatility trail
The raw NLMS output is not plotted directly as the main trend line. Instead, it is passed into a volatility trailing structure.
The script builds an ATR band around the NLMS estimate:
Upper band = NLMS output + ATR × factor
Lower band = NLMS output - ATR × factor
Then it creates a trailing value that only updates when the NLMS band structure forces it to move.
This creates a trail that behaves similarly to a volatility stop, but the center is not price or hl2. It is the learned NLMS estimate .
ATR volatility trail logic
The trail starts from the NLMS output, then carries forward its previous value:
nlmsAtr := previous nlmsAtr
Then:
If lower band rises above the trail, the trail moves up.
If upper band falls below the trail, the trail moves down.
This creates a directional trailing structure:
In bullish regimes, the trail ratchets upward.
In bearish regimes, the trail ratchets downward.
It filters out small movements because price must move enough relative to ATR and the adaptive estimate to change the trail direction.
Why combine NLMS with ATR
NLMS alone gives an adaptive estimate, but it can still wiggle as the model learns.
ATR alone gives volatility structure, but it is usually tied to raw price and fixed smoothing.
Combining them gives:
Adaptive intelligence from NLMS.
Volatility confirmation from ATR.
Cleaner trend state transitions.
Less dependence on fixed moving-average assumptions.
The NLMS model learns the underlying price behavior, while ATR decides whether movement is large enough to matter.
Trend direction
Trend flips are detected from the trail itself:
Bullish when nlmsAtr crosses above its previous value.
Bearish when nlmsAtr crosses below its previous value.
This means signals are generated when the volatility trail changes direction, not when price simply crosses the line.
That is important because:
The trail must structurally move.
The signal is tied to confirmed trail direction.
Noise around the line does not automatically create a flip.
Visual design
The indicator includes several visual layers.
Main trail line
The central plotted line is the NLMS ATR trail. It changes color based on the current trend state:
Green for bullish trail direction.
Red for bearish trail direction.
Gray before a trend state is established.
Gradient fill
The script fills the space between price and the trail:
If price is above the trail, bullish fill is shown.
If price is below the trail, bearish fill is shown.
The fill is stronger near the trail and fades toward price, making the trail feel like the active structural reference.
Trail glow
A soft glow is drawn around the trail using a small ATR offset:
glow = ATR(14) × 0.06
This highlights the trail visually without cluttering the chart.
Trend candles
Candles are colored by trend state:
Bullish trend = bullish candles.
Bearish trend = bearish candles.
This allows the script to function as a complete regime overlay.
How to interpret the indicator
Bullish state
A bullish state occurs when the NLMS volatility trail turns upward.
This suggests:
The adaptive filter is shifting higher.
The ATR trail has confirmed upward structure.
Trend pressure has turned bullish.
Bearish state
A bearish state occurs when the NLMS volatility trail turns downward.
This suggests:
The adaptive estimate is shifting lower.
The volatility trail has confirmed downside structure.
Trend pressure has turned bearish.
Price above the trail
Generally indicates bullish structure.
Price below the trail
Generally indicates bearish structure.
But the most important signal is the direction of the trail itself, not every price touch.
How to use it in practice
1) Trend following
Use the trail direction as the primary bias:
Favor longs when the trail is bullish.
Favor shorts when the trail is bearish.
2) Dynamic support/resistance
The trail can act like a dynamic structural level:
In uptrends, pullbacks toward the trail can act as support.
In downtrends, rallies toward the trail can act as resistance.
3) Trade management
The trail can be used as:
A trailing stop guide.
A regime invalidation level.
A trend continuation reference.
4) Regime filtering
Because the line adapts using NLMS and only flips when the volatility trail turns, it can be used to filter other entries:
Take only long setups during bullish trail regimes.
Take only short setups during bearish trail regimes.
Avoid countertrend trades when the trail is strongly directional.
Difference from normal Supertrend or ATR trails
A normal ATR trail is usually built directly from price or hl2.
This indicator is different because the trail is built around an adaptive learned estimate.
That means:
The centerline is not raw price.
It is not a fixed moving average.
It is a continuously learned NLMS estimate.
So the trail has a different character:
More adaptive than a standard moving average trail.
More stable than a raw price-based ATR stop.
More responsive to changing market structure than fixed filters.
Difference from the NLMS Adaptive Trend Filter
The NLMS Adaptive Trend Filter plots the learned estimate directly and reads trend from its slope.
NLMS Volatility Trail goes one step further:
It uses the learned estimate as the base.
Then wraps it with ATR structure.
Then turns that into a trailing regime line.
So this version is more structure-oriented and better suited for trailing trend behavior.
Parameter tuning
Taps
Use higher taps for smoother trend structure.
Use lower taps for faster adaptation.
Step Size
Use lower step size for stability.
Use higher step size for responsiveness.
Regularization
Use higher regularization when the filter feels unstable.
Use lower regularization when the filter is too sluggish.
ATR Period
Controls volatility estimate:
Shorter = more reactive trail.
Longer = smoother trail.
ATR Factor
Controls band width:
Higher factor = wider trail, fewer flips.
Lower factor = tighter trail, more flips.
Strengths
Combines adaptive filtering with volatility trailing logic.
Learns from market structure instead of using fixed weights.
Uses ATR to reduce noise and confirm meaningful movement.
Good for trend following and trailing stop frameworks.
Visually clean with gradient fill and candle coloring.
Limitations
Still reactive, not predictive.
Can lag during violent reversals.
High learning rates may create noise.
Low ATR factors may cause whipsaws.
Requires tuning for timeframe and asset volatility.
Summary
NLMS Volatility Trail combines an adaptive NLMS predictor with an ATR-based trailing structure. The NLMS layer continuously learns a dynamic estimate of price from historical bars, while the ATR trail converts that estimate into a cleaner directional regime line. This makes the indicator more adaptive than a traditional moving average and more structured than a raw adaptive filter. It is best used as a trend-following overlay, dynamic support/resistance guide, and volatility-aware trailing framework.
Indicator

[ A L P H A X ] PIVOT - Smart Money StructureAlphaX PIVOT — Smart Money Structure + OTE Pullback Engine: Market Structure Tracking, Optimal Trade Entry Zones, Liquidity Sweep Detection & 7-Layer Confluence Scoring
AlphaX PIVOT is a professional-grade smart money pullback system built around two of the most powerful concepts in institutional price action: market structure and the Optimal Trade Entry zone. Where breakout-based systems enter at the moment of structural displacement — chasing the move after it has already begun — PIVOT waits for the market to pull back into the precise Fibonacci retracement zone where institutional continuation orders are resting, and fires only when a qualified rejection candle confirms within that zone with multi-layer confluence backing. The result is a system that gives you the same directional conviction as a breakout entry at a structurally superior price — buying the pullback into institutional demand after a bullish BOS or CHoCH, selling the pullback into institutional supply after a bearish structure shift — with a stop anchored to the structural swing low or high rather than an arbitrary ATR distance. Designed for precision-entry traders across crypto, forex, gold, and indices on any timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 The Core Philosophy — Why Pull Back to OTE?
A Break of Structure or Change of Character tells you that the market has shifted direction at the institutional level. But the bar that breaks structure is rarely the optimal entry — it has already moved aggressively, the risk/reward from entry is reduced, and a pullback is statistically likely before the continuation begins.
The Optimal Trade Entry concept solves this. After a structural displacement move, price almost always retraces into a specific Fibonacci retracement zone — the 61.8% to 78.6% retracement of the displacement leg — before the next move in the structural direction begins. This zone is where institutional orders waiting at discount prices (in a bull structure) or premium prices (in a bear structure) are filled. Entering in the OTE zone means entering where institutions are entering, with the displacement leg already confirmed as the directional signal and the structural swing as the natural stop reference.
PIVOT detects every structural event, computes the OTE zone for the displacement leg in real time, and monitors for qualified rejection entries within that zone — all while running a 7-layer confluence engine that scores every potential entry before it fires.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏗 Market Structure Engine — Tracking BOS & CHoCH
The market structure engine runs a real-time fractal pivot detection system that tracks the most recent confirmed swing high and swing low on every bar, identifies every Break of Structure and Change of Character event, and maintains a live structural trend state.
Pivot detection:
Swing highs and lows are detected using a configurable pivot length (default: 5 bars each side). A pivot is confirmed when the specified number of bars on both the left and right side are lower (for a pivot high) or higher (for a pivot low). This creates confirmation — not just a local high or low, but a genuine fractal swing point.
Break of Structure (BOS):
When price closes above the most recent confirmed swing high while the structure is already bullish, a bullish BOS is detected — confirming the uptrend is intact and continuing. When price closes below the most recent swing low in a bearish structure, a bearish BOS is confirmed. BOS events are continuation signals — the existing structure is reinforcing itself.
Change of Character (CHoCH):
When price closes above a swing high while the structure is bearish, a bullish CHoCH is detected — the character of the market has changed from bearish to bullish. A bearish CHoCH is the inverse. CHoCH events are the highest-quality structural signals — they represent genuine institutional trend reversals and form the trigger for PIVOT's highest-conviction setup type.
Structure break mode:
The Close Only setting (default: on) requires a candle body close beyond the swing level for a BOS or CHoCH to register. When off, any wick touch counts. Body close is the stricter, cleaner mode — it eliminates false structure breaks caused by wick spikes that fail to close through the level, producing fewer but more reliable structural events.
Live swing levels:
The most recent confirmed swing high (plotted as a red dashed line) and swing low (yellow-green dashed line) are maintained on the chart in real time, extending forward until superseded by a new confirmed pivot. These levels represent the current active liquidity pools — the precise levels where the next sweep event is likely to occur.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Structure Leg Box & Equilibrium — The Dealing Range
Every confirmed structure break event spawns a Structure Leg Box — a semi-transparent purple rectangle anchored to the displacement leg that produced the structural event. This box is the visual equivalent of the ANCHOR trend segment box, providing immediate context for the current structural move's price range.
Box construction:
For a bullish structure break, the leg box spans from the previous swing low (the origin of the displacement) to the close that broke structure — capturing the full range of the institutional displacement move. For a bearish structure break, it spans from the previous swing high down to the structure break close.
Equilibrium line:
The midpoint of the structure leg box — the 50% retracement level — is plotted as a purple dotted line extending forward. This is the leg's equilibrium level and the dividing line between discount (below EQ, favorable for longs) and premium (above EQ, favorable for shorts). The Premium/Discount requirement enforces that PIVOT signals can only fire when price is in the institutionally correct zone relative to this level.
Live updating:
The box expands as the trend develops — if price makes new highs in a bull leg, the box top extends upward. The equilibrium adjusts continuously. This ensures the OTE calculations always reflect the full extent of the current structural leg, not just the initial displacement.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 The OTE Zone — Optimal Trade Entry Band
The Optimal Trade Entry zone is a Fibonacci retracement band calculated from the structure leg's high and low — the 61.8% to 78.6% retracement zone (configurable). This is the institutional re-entry zone — the price area where sophisticated traders who missed the initial displacement fill their positions on the pullback.
OTE calculation for bull structure:
OTE Top = Leg High − (Leg Range × OTE Fib Low). Default: Leg High − (Range × 0.618)
OTE Bottom = Leg High − (Leg Range × OTE Fib High). Default: Leg High − (Range × 0.786)
This creates a band in the lower portion of the leg range — price must retrace between 61.8% and 78.6% of the upward displacement before the OTE zone is active.
OTE calculation for bear structure:
OTE Bottom = Leg Low + (Leg Range × OTE Fib Low)
OTE Top = Leg Low + (Leg Range × OTE Fib High)
This creates a band in the upper portion of the leg range — price must retrace between 61.8% and 78.6% of the downward displacement before the OTE zone is active.
Why the 61.8–78.6% zone: The 61.8% (golden ratio) and 78.6% (square root of 0.618) retracement levels are the two most consistently respected Fibonacci levels in institutional price delivery. They represent the deepest pullback levels that remain structurally valid — a retracement beyond 78.6% technically invalidates the structure leg's momentum. Entries within this zone maximize reward (entering near the deepest discount in a bull leg) while minimizing risk (the stop is at the structural swing, not far from the OTE bottom).
OTE zone visualization: A semi-transparent purple box rendered from the leg start bar to two bars beyond the current bar, spanning the OTE top and bottom prices. The zone extends and updates in real time as the leg evolves. The exact OTE band price levels are displayed on the dashboard for immediate reference.
In-OTE detection: The current bar is considered in the OTE zone when the bar's low (for bull setups) reaches within the OTE band, or the bar's high (for bear setups) reaches within the OTE band. This detects the precise moment price has retraced into the optimal entry area.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💧 Liquidity Sweep Detection
The sweep detection engine identifies liquidity grab events relative to recent price extremes, adding an important second dimension to PIVOT's entry context. A sweep is detected when price briefly extends beyond the recent high or low reference level by a minimum ATR depth, then reverses and closes back inside — the classic stop-hunt signature.
Bull sweep: The current bar's low extends below the lowest low of the lookback period (default: 20 bars) by at least the minimum sweep depth (default: 0.1× ATR), and the bar closes above that low and closes bullish (close above open). Sell-side liquidity has been grabbed.
Bear sweep: The high extends above the highest high of the lookback period by at least the minimum depth, and the bar closes below that high and closes bearish. Buy-side liquidity has been grabbed.
Sweep recency: PIVOT accepts sweeps from the current bar or either of the two preceding bars — a three-bar recency window. This accommodates the common scenario where the sweep candle precedes the OTE entry bar by one or two bars, allowing the confluence engine to credit the sweep even when entry occurs slightly after the grab.
Setup B — Sweep + CHoCH: When a sweep occurs within 40 bars of a Change of Character event and price is simultaneously in the OTE zone with a rejection candle, PIVOT's second setup type fires — the Sweep + CHoCH entry. This is the highest-conviction entry type: a CHoCH confirms the structural reversal, the sweep confirms institutional liquidity accumulation, and the OTE entry delivers the optimal price. All three institutional signals converging simultaneously.
Sweep markers (optional): Small orange circles can be plotted above or below bars where sweeps are detected. Off by default — sweeps count toward confluence scoring regardless of whether markers are displayed — but enabling them provides visual awareness of every liquidity event on the chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕯 Rejection Candle Confirmation
Every PIVOT entry requires a qualifying rejection candle within the OTE zone — the candle that demonstrates price has touched the OTE level and been rejected back in the structural direction.
Bull rejection (Bullish Rejection or Engulfing):
Bullish Rejection — the bar closes bullish (close above open) and the close-to-low distance represents more than 55% of the bar's total range. The lower wick consumes the majority of the bar's range — buyers overwhelmed sellers that pushed into the OTE zone
Bullish Engulfing — a bullish close that fully engulfs the prior bearish candle — closing above the prior open while the prior candle was bearish. Confirms a clean reversal of the pullback momentum
Bear rejection (Bearish Rejection or Engulfing):
The mirror conditions — a bearish close with the high-to-close distance exceeding 55% of range, or a bearish engulfing of the prior bullish candle.
Why candle confirmation is essential: The OTE zone being touched is a necessary but not sufficient condition for entry. Price can drift through the OTE zone on low momentum without producing a genuine reversal. The rejection candle requirement ensures that the OTE touch produced a visible institutional response — not just a passive drift through the zone.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Layer Confluence Engine
Every potential entry is evaluated across seven independent confluence layers. The default minimum is 5 of 7 — a high-quality gate that blocks setups where several dimensions of confirmation are missing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 1 — Market Structure Direction
Awards 1 point when the current structural trend agrees with the signal direction — bullish structure for longs (structure == 1), bearish for shorts. This is also a hard prerequisite enforced in the setup conditions — no PIVOT signal can fire without the structural trend being established in the signal direction. Structure is simultaneously a confluence layer and a foundational entry requirement.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 2 — OTE Zone Touch
Awards 1 point when the current bar is within the OTE retracement band for the active leg direction — the 61.8–78.6% retracement zone. Also a hard prerequisite in the setup conditions. Ensures the entry is at the institutionally optimal retracement depth, not at an arbitrary price within the leg range.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 3 — Premium/Discount Zone
Awards 1 point when price is in the correct zone relative to the leg equilibrium — below EQ (discount) for bull entries, above EQ (premium) for bear entries. The PD Zone layer enforces the institutional entry positioning principle: buy when price is cheap relative to the leg's fair value, sell when expensive. A valid OTE touch in the wrong PD zone (above EQ for a bull entry) carries a fundamental positioning problem — this layer blocks it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 4 — HTF Bias
Awards 1 point when the higher timeframe EMA structure (default: 60-minute, 21/55 EMA) agrees with the signal direction, using the same strict condition as SURGE and ANCHOR — the HTF fast EMA must be above the slow EMA and the HTF close must be above the fast EMA for a bull vote. A bull OTE entry against a bearish HTF is a counter-trend trade; this layer ensures PIVOT's signals align with the macro institutional flow.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 5 — Liquidity Sweep
Awards 1 point when a qualifying sweep has occurred within the three-bar recency window in the correct direction. A sweep before or coinciding with the OTE entry dramatically increases the probability that the pullback is a genuine institutional accumulation event rather than a mechanical retracement. When the Sweep Filter is disabled, this layer is not available for scoring — the total achievable score drops to 6 of 6 in that configuration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 6 — Rejection Candle
Awards 1 point when a qualifying bull rejection or bullish engulfing candle (long) or bear rejection or bearish engulfing candle (short) is present on the current bar. This is the candle confirmation layer — confirming that the institutional response to the OTE touch is visible and decisive on the current bar.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 7 — ADX + Volume Expansion
Awards 1 point when both the ADX filter and the volume expansion filter pass simultaneously. ADX confirms the market has directional strength rather than ranging. Volume exceeding the moving average confirms genuine institutional participation on the entry candle rather than a low-activity drift through the OTE zone. Both conditions must be true for the single layer point — they are evaluated jointly.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Two Setup Types — A and B
PIVOT fires signals through two distinct setup configurations, each representing a different institutional entry scenario. Both can be enabled simultaneously.
Setup A — OTE Pullback:
The foundational PIVOT setup. Fires when the market structure is established (BOS or CHoCH has confirmed), the displacement leg is active, price pulls back into the 61.8–78.6% OTE zone, a rejection candle forms within the zone, and the full confluence stack meets the minimum score. This is the highest-frequency setup type — it captures the standard institutional pullback sequence following any qualifying structure event.
Setup B — Sweep + CHoCH:
The premium PIVOT setup. Requires all Setup A conditions plus a Change of Character within the lookback window (40 bars) and a qualifying liquidity sweep within the three-bar recency window. The sequence is: liquidity sweep (stop hunt) → CHoCH (structural reversal confirmation) → OTE pullback (optimal entry). When all three institutional events converge simultaneously in the OTE zone with a rejection candle, this is among the highest-conviction setups available in the entire AlphaX indicator suite.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Structural Stop Loss Placement
PIVOT uses structurally anchored stop placement — the stop is placed beyond the most recent confirmed swing low (for bull entries) or swing high (for bear entries), plus a small configurable ATR buffer (default: 0.25× ATR).
Why this is the correct stop for OTE entries: The OTE entry is made on the premise that the structural swing low (bull) or high (bear) will hold — it is the key level whose violation would invalidate the entire structural thesis. If price closes through the swing low after a bull OTE entry, the structure leg is negated, the displacement was a false break, and the position thesis is fundamentally wrong. The structural swing is therefore not an arbitrary stop choice — it is the precise price at which the trade is provably wrong.
This produces stops that adapt naturally to the leg size: large legs with distant swings produce wider stops and wider profit targets; tight legs with nearby swings produce tighter, higher-precision entries. The risk/reward is computed dynamically as `(close − slGuide) × TP Reward (R)`.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 16-row real-time dashboard displays the complete internal state across four sections.
STRUCTURE
Market Struct — current structural trend: ▲ BULLISH, ▼ BEARISH, or — NEUTRAL
PD Zone — current position relative to leg equilibrium: ◧ DISCOUNT, ◧ PREMIUM, or — EQ
Leg EQ — the exact leg equilibrium price (50% of the structure leg range) in real time
OTE Band — the current OTE zone bottom and top prices. Updates live as the leg expands
FILTERS
HTF Bias — higher timeframe EMA alignment: ▲ BULL, ▼ BEAR, or — FLAT
ADX — live ADX value with ✓ or ✗ pass/fail
Session — ✓ ACTIVE or ✗ OFF
LEVELS
Swing Hi — the most recent confirmed fractal swing high price. This is the current sell-side liquidity level and bear structural reference
Swing Lo — the most recent confirmed fractal swing low. The current buy-side liquidity level and bull structural stop reference
CONFLUENCE
Bull Score — live 0–7 confluence score. Background highlights yellow-green when threshold is met
Bear Score — live 0–7 score. Background highlights red when threshold is met
Live confluence label: During BUILDING and active leg phases, a small label near the OTE zone on the last bar shows B x/7 · S x/7 in real time — identical to ANCHOR's live score display — so you can monitor confluence building without dashboard attention.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
Structure Leg Box (purple, semi-transparent) — the dealing range of the current displacement leg from structural origin to current price extreme. Adapts as the leg evolves
OTE Band Box (purple, deeper tint) — the 61.8–78.6% retracement zone of the current leg, extending two bars beyond the current bar for forward visibility
Leg Equilibrium Line (purple dots) — the 50% midpoint of the structure leg, continuously updated
Swing High Line (red dashed) — the most recent confirmed fractal swing high
Swing Low Line (yellow-green dashed) — the most recent confirmed fractal swing low
▲ Small Triangle (BOS Bull) — bullish Break of Structure, semi-transparent yellow-green
▲ Large Triangle (CHoCH Bull) — bullish Change of Character, bright yellow-green, larger size
▼ Small Triangle (BOS Bear) — bearish Break of Structure, semi-transparent red
▼ Large Triangle (CHoCH Bear) — bearish Change of Character, bright red, larger size
● Circle (optional, orange) — sweep detection markers when Show Sweep Markers is enabled
▲ Large Triangle (bull signal) — PIVOT long entry. All conditions confirmed
▼ Large Triangle (bear signal) — PIVOT short entry
Live confluence label — B x/7 · S x/7 near the OTE zone on the current bar
SL Guide (red dotted circles) — structural stop loss level below/above the swing reference
TP Guide (yellow-green dotted circles) — dynamically computed reward target based on R multiple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX PIVOT — Step by Step
Step 1 — Identify the Structural Context
Check the dashboard Market Struct row. ▲ BULLISH or ▼ BEARISH tells you the directional bias. — NEUTRAL means no structure is established — no setup can develop
Note the Swing Hi and Swing Lo levels on the dashboard. These are the current liquidity pools and structural stop references
Check HTF Bias — does the higher timeframe agree with the current structure? HTF alignment is worth 1 confluence point and significantly improves setup quality
Step 2 — Watch for a Structure Event
A large bright ▲ CHoCH triangle below the bar marks a bullish Change of Character — the highest-priority structural event. The structure leg box and OTE zone will draw immediately
A smaller ▲ BOS triangle marks a bullish Break of Structure — confirmation the trend is continuing
After either event, the Structure Leg Box and OTE Band are drawn in real time. Note where the OTE zone sits in absolute price terms from the dashboard's OTE Band row
Step 3 — Wait for the OTE Pullback
After the displacement, watch price retrace toward the OTE zone. The purple OTE box on the chart gives you the exact price boundaries
Check PD Zone on the dashboard — for bull entries, you want ◧ DISCOUNT to confirm price is below the leg equilibrium when it enters the OTE
Watch the live B x/7 score label near the OTE zone. As price approaches the zone, the score builds in real time
Step 4 — Enter on the PIVOT Signal
A ▲ triangle at the OTE zone confirms all conditions — structure direction, OTE touch, PD zone, HTF bias, sweep (if applicable), rejection candle, and ADX/volume
The SL guide is plotted below the structural swing low (bull) — your structural invalidation level
The TP guide is plotted at the computed reward target based on your configured R multiple
For Setup B signals (Sweep + CHoCH), all three institutional events have converged — this is the highest-conviction PIVOT entry available
Step 5 — Manage and Exit
At the TP guide level, take partial or full profit
If a new CHoCH fires in the opposite direction during the trade, the structure has reversed — this is the exit signal for any remaining position
If price retests the OTE zone again during the same structural leg without triggering a new signal (cooldown active), wait for the cooldown to clear and assess whether the fresh confluence score still meets the minimum
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Market Struct shows — NEUTRAL — no structural direction is established. Without a confirmed BOS or CHoCH, the leg box and OTE zone have no directional context. Wait for a structural event to occur before looking for OTE entries
HTF Bias opposes structure direction — a bullish current timeframe structure against a bearish HTF is a counter-trend setup. These carry significantly lower success rates. The HTF alignment layer will not score, reducing the confluence count
Price is in the wrong PD zone for the setup direction — a bull entry above the leg equilibrium (premium) or a bear entry below (discount) means entering when price is institutionally expensive relative to the leg's fair value. The PD zone filter blocks these when enabled
Score is at 4/7 and the minimum is 5/7 — the setup is present but not enough layers confirm. Do not force entries when confluence is borderline
Structure events (BOS/CHoCH) are flipping rapidly in both directions — alternating bull and bear structure events in quick succession indicate a choppy market with no clean trend. The OTE zones will be constantly resetting without producing completed pullback sequences
OTE zone is very close to the swing low (bull) or swing high (bear) — when the OTE band and the structural stop reference are nearly at the same price, the risk/reward is poor. The stop would be just below the OTE entry. Reduce position size or pass the setup
The ideal PIVOT setup:
CHoCH event followed by a clean displacement leg with a well-defined leg box
Price retraces into the OTE zone while in discount (bull) or premium (bear)
A qualifying sweep has occurred within the last three bars
HTF Bias aligned with structure direction
Rejection candle forms within the OTE zone
Confluence score at 6/7 or 7/7
ADX confirms trending and volume is expanding
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
📐 Real-time market structure engine — fractal pivot detection with configurable sensitivity, tracking BOS and CHoCH events with body-close confirmation mode
📦 Structure Leg Box — automatically drawn from the structural origin to the current price extreme, expanding in real time as the leg develops
🎯 Optimal Trade Entry zone — 61.8–78.6% Fibonacci retracement band computed from the structure leg, rendered as a live OTE box and displayed with exact price levels on the dashboard
⚖ Leg Equilibrium line — 50% midpoint of the structure leg acting as the dynamic PD zone divider, plotted continuously and updated as the leg grows
💧 Liquidity sweep detection — identifies stop-hunt events relative to the recent price range with configurable ATR depth and three-bar recency window
🏅 Two setup types — Setup A (OTE Pullback after any BOS/CHoCH) and Setup B (Sweep + CHoCH + OTE — the highest-conviction institutional entry pattern)
🕯 Dual candle confirmation — bullish/bearish rejection candles and engulfing candles both qualify, ensuring the OTE touch produced a genuine institutional reversal response
🧠 7-layer confluence engine — Market Structure, OTE Touch, PD Zone, HTF Bias, Liquidity Sweep, Rejection Candle, and ADX + Volume Expansion all scored independently
📊 Live confluence label near OTE zone — B x/7 · S x/7 displayed in real time on the current bar without requiring dashboard reference
🎯 Structural stop loss — placed beyond the confirmed swing low (bull) or swing high (bear) plus ATR buffer, anchored to the genuine structural invalidation level
💹 Dynamic TP target — computed as `risk × R multiple`, adapting to leg size rather than using a fixed ATR distance
📡 HTF EMA bias filter — strict dual-condition HTF alignment (EMA crossover + price above fast EMA) for maximum higher timeframe conviction
🕐 Session filter — restricts signals to configurable active trading hours
📊 16-row live dashboard — Structure, Filters, Levels, and Confluence sections updated in real time
🔔 6 alert conditions — long/short entry, bull/bear CHoCH, sweep low, sweep high
🎨 Fully cohesive dual-tone color system — yellow-green for all bullish elements, red for all bearish, purple for structural reference levels and OTE zone, orange for sweeps
⚙ Fully configurable — pivot length, structure break mode, OTE Fibonacci levels, sweep depth and lookback, setup types, confluence minimum, HTF timeframe and EMAs, ADX, volume filter, session, SL buffer, TP reward multiple, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Structure Engine
Pivot Length (bars each side) — fractal sensitivity. 3 for scalping, 5 for standard intraday (default), 7+ for swing trading
Structure Break: Close Only — when on, requires a candle body close beyond the swing level (default: on). Off = wick touch counts
Show Active Swing Levels — toggle swing high and swing low dashed lines
Show BOS / CHoCH Markers — toggle all structure event triangles
CHoCH Only (hide BOS markers) — when on, only CHoCH events are marked. BOS events still update structure but are not labeled
Structure Leg & OTE
Show Structure Leg Box — toggle the displacement leg dealing range box
Show Leg Equilibrium (50%) — toggle the leg midpoint line
Show OTE Band (62–79%) — toggle the Fibonacci retracement entry zone box
OTE Fib Low — lower Fibonacci level of the OTE band (default: 0.618)
OTE Fib High — upper Fibonacci level of the OTE band (default: 0.786)
Require Premium / Discount — when on, longs require discount positioning, shorts require premium (default: on)
Liquidity Sweep
Enable Sweep Filter — when on, Layer 5 scores the recent sweep and Setup B becomes available
Show Sweep Markers — toggle optional orange circle markers at sweep detection bars
Min Sweep Depth (xATR) — minimum wick extension beyond the reference extreme to qualify as a sweep (default: 0.1)
Sweep Reference Lookback — bars used to define the recent high/low reference for sweep detection (default: 20)
Entries & Confluence
Setup A · OTE Pullback — enable standard OTE pullback entries after BOS or CHoCH
Setup B · Sweep + CHoCH — enable the premium sweep + reversal + OTE setup type
Min Confluence Layers (of 7) — minimum score required for a signal (default: 5)
Show Entry Signals — toggle signal triangles
Show Confluence Label — toggle the live B/S score label near the OTE zone
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 8)
Filters
HTF Trend Filter — toggle the higher timeframe EMA alignment requirement
HTF Timeframe — the higher timeframe for EMA data (default: 60-minute)
HTF Fast / Slow EMA — EMA periods on the HTF (defaults: 21 / 55)
ADX Trend Filter — toggle the ADX strength requirement (default: off)
ADX Length / ADX Minimum — ADX parameters (defaults: 14 / 18)
Volume Expansion Confirm — when on, entry candle volume must exceed the moving average by the minimum multiplier
Min Volume vs Avg — minimum volume ratio for the expansion filter (default: 1.1)
Volume Avg Length — SMA length for the volume baseline (default: 20)
Session Filter — toggle active hours restriction (default: off)
Active Session — configurable session window
Exit Guidance
ATR Length — lookback for ATR calculation (default: 14)
Show SL / TP Guides — toggle stop and target dotted circle plots
SL Buffer Beyond Swing (xATR) — additional ATR buffer beyond the structural swing stop reference (default: 0.25)
TP Reward (R) — take profit distance as a multiple of the risk from entry to stop (default: 2.0)
Display
Show Dashboard — toggle the full dashboard panel
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals, fills, and labels
Bear / Bear Bright — red family for bearish signals, fills, and labels
Sweep / Alert — orange for sweep markers and alerts
Equilibrium / OTE Band — purple for structural reference levels and OTE zone
SL Guide / TP Guide — stop and target circle colors
Bull / Bear Label Text — text color for signal labels
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (6 total)
Entry Alerts
Pivot Long Entry — all conditions confirmed for a long OTE setup. Signal label fired
Pivot Short Entry — all conditions confirmed for a short OTE setup
Structure Alerts
Pivot Bull CHoCH — bullish Change of Character detected. Watch for OTE pullback in discount zone
Pivot Bear CHoCH — bearish Change of Character detected. Watch for OTE pullback in premium zone
Sweep Alerts
Pivot Sweep Low — sell-side liquidity swept below recent lows. Potential long setup developing
Pivot Sweep High — buy-side liquidity swept above recent highs. Potential short setup developing
All alert messages are formatted as const strings for clean webhook and notification platform integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD on M5–M15 , with general suitability for major forex pairs and crypto on the same timeframes:
Pivot Length at 5 — the classic fractal sensitivity for intraday gold and forex. Balances signal frequency with structural significance
Close Only on — body close structure breaks eliminate the vast majority of wick-based false breaks on gold and volatile instruments
Setup B (Sweep + CHoCH) on — the highest-quality setups on gold involve a sweep before the CHoCH, making this setup type particularly effective on XAUUSD
HTF at 60-minute — the standard intraday reference for M5–M15 trading
ADX filter off by default — the OTE + rejection candle requirements already provide strong quality filtering without needing ADX as an additional gate
For other instruments or timeframes, adjust:
M1–M3 scalping — reduce Pivot Length to 3, increase Cooldown to 5, reduce TP Reward to 1.5, use tight session filter
H1–H4 swing trading — increase Pivot Length to 7–10, set HTF to Daily or Weekly, increase TP Reward to 3.0–4.0, increase SL Buffer to 0.5
Crypto (BTC, ETH) — increase Sweep Depth to 0.2–0.3× ATR for the wider wicks typical of crypto, consider enabling ADX filter at 20
Indices (NAS100, US30) — use Pivot Length 5–7, enable Session Filter to 09:30–16:00, enable ADX filter
More signals — lower Min Confluence to 4, disable PD Zone requirement, enable Setup A only, reduce Cooldown
Ultra-selective entries only — raise Min Confluence to 6 or 7, require Setup B only, enable ADX filter, enable Volume Expansion
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🎯 OTE and Fibonacci pullback traders — PIVOT is the definitive quantitative implementation of the Optimal Trade Entry framework. Every component — structure detection, leg computation, Fibonacci zone rendering, and rejection confirmation — is automated and scored
🏦 Smart money concepts and ICT methodology traders — PIVOT encodes the CHoCH → displacement → OTE pullback sequence that forms the core of ICT's entry model. The Sweep + CHoCH setup type specifically captures the stop hunt → reversal → optimal entry sequence
🥇 Gold (XAUUSD) and forex traders — the default settings are calibrated for intraday gold trading, where OTE pullbacks after CHoCH events are among the most consistent institutional patterns available
📊 Traders who want structure-defined risk — the structural stop placement means every trade has a stop at a genuinely meaningful level — the swing that would invalidate the structure thesis — rather than an arbitrary ATR distance
🧠 Systematic traders who want to quantify OTE entries — the 7-layer scoring system removes subjectivity from OTE trading. Every potential entry is scored objectively against the same seven criteria on every bar
📈 Traders who want to enter later at a better price — PIVOT's entire philosophy is about waiting for the pullback. If you consistently enter at breakouts and then watch price retrace before continuing, PIVOT is the solution — it waits for that retracement and enters at the optimal Fibonacci level within it
⚠ Traders who struggle with stop placement — the structural swing reference + ATR buffer produces a stop that makes structural sense. You are not guessing where to put the stop — the market's structure tells you exactly where it belongs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. Pivot detection, structure break logic, OTE zone calculation, and confluence scoring all finalize on confirmed bars only
The pivot detection has an inherent offset of pivotLen bars — a pivot is only confirmed after pivotLen bars have passed on both sides. This is standard behavior for fractal-based pivot systems and is not repainting — it is the mathematical requirement for confirming the fractal pattern
The Structure Leg Box and OTE Zone are redrawn only on the last bar for chart cleanliness. Historical bars retain signal markers and BOS/CHoCH labels but do not show outdated box overlays
The CHoCH window for Setup B (40 bars) means a Sweep + CHoCH setup can fire up to 40 bars after the CHoCH event, as long as the OTE zone is still valid and all other conditions are met. On slower timeframes this window covers a wider clock-time range — adjust if needed
The confluence label near the OTE zone is drawn only on the last bar. It is a real-time awareness tool, not a historical indicator
Maximum 500 labels, 500 lines, and 80 boxes are rendered. On very active charts, the oldest markers may be removed by PulseWire's limits
The session filter is off by default — PIVOT's structural approach is timeframe and session-agnostic. Enable the session filter for instruments where specific sessions (London, NY) produce more reliable structure events
The TP guide is computed dynamically as risk × R multiple. On bars where the swing reference and current price are very close (producing near-zero risk), the fallback is ATR × R multiple
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who know that the move has already started — and who want to enter it at the precise price where the institutions who created the move are still adding to their position. Indicator

Indicator

Precision Price Gamma [PGamma]Here's the full updated description with all the fixes — car analogy corrected, image captions added, ready to copy:
Precision Price Gamma (PGamma) is a second-derivative momentum indicator that measures the acceleration of momentum, not momentum itself.
━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY PGAMMA IS DIFFERENT
━━━━━━━━━━━━━━━━━━━━━━━━━━
Most momentum indicators tell you how strong a move is. PGamma tells you whether that strength is increasing or fading — going one step further by measuring whether momentum is strengthening or weakening. This allows PGamma to identify changes in market pressure before many trend-following indicators respond.
━━━━━━━━━━━━━━━━━━━━━━━━━━
THE FOUR STATES
━━━━━━━━━━━━━━━━━━━━━━━━━━
Γ↑ Accelerating — Bullish momentum is positive and still strengthening.
Γ⌃ Bull Weakening — Bullish momentum remains positive, but buying pressure is beginning to fade.
Γ↓ Bear Pressure — Bearish momentum is dominant and selling pressure continues to strengthen.
Γ⌄ Bear Exhaustion — Bearish momentum remains negative, but selling pressure is beginning to weaken.
━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━
PGamma smooths the source series, then computes the slope of that smoothed series — the first derivative, or Momentum. It then smooths Momentum and computes its slope — the second derivative, or Price Gamma. The four states are determined by the sign of both values simultaneously.
Momentum determines the current direction of market pressure. Gamma determines whether that pressure is strengthening or weakening. They often disagree near turning points — and those disagreements are often the most informative signals PGamma produces.
Think of it like driving a car. Momentum is your speed. Gamma is whether you are pressing the gas or the brake. You can be moving backward while pressing the brake — still moving backward, but slowing. That is negative momentum with positive gamma. In market terms, price may still be making lower lows, but each push down is losing force. That often precedes consolidation, a bounce, or a reversal.
Two examples of this disagreement are illustrated in the first two snapshots — a red candle during a green Gamma Timeline, and a green candle during an amber Gamma Timeline. The third snapshot illustrates when Momentum and Gamma align, showing a green candle with a green Gamma Timeline during Accelerating state.
━━━━━━━━━━━━━━━━━━━━━━━━━━
THE STATE MATRIX
━━━━━━━━━━━━━━━━━━━━━━━━━━
Momentum | Gamma | State
+ | + | Accelerating
+ | - | Bull Weakening
- | - | Bear Pressure
- | + | Bear Exhaustion
Momentum and Gamma often disagree near turning points. A positive Gamma reading while Momentum remains negative does not mean the market is bullish — it means bearish momentum is losing acceleration. Those disagreements are where PGamma is most useful.
━━━━━━━━━━━━━━━━━━━━━━━━━━
UNDERSTANDING THE DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━
State — Combines Momentum and Price Gamma into one of the four market conditions above. Read the State row first.
Momentum — The first derivative of price. Positive = bullish momentum dominates. Negative = bearish momentum dominates.
Gamma — The second derivative of momentum. Above Zero = momentum is accelerating. Below Zero = momentum is decelerating. Gamma often changes direction before Momentum, making it useful for identifying transitions in market pressure.
Bias — A simplified interpretation combining Momentum and Gamma into a single directional context label.
━━━━━━━━━━━━━━━━━━━━━━━━━━
GAMMA TIMELINE
━━━━━━━━━━━━━━━━━━━━━━━━━━
The Gamma Timeline displays the historical sequence of Price Gamma states as a continuous color band along the bottom of the chart. Each colored segment represents one bar, allowing traders to quickly identify transitions between acceleration, weakening, pressure, and exhaustion without obscuring price action. Green for Accelerating, amber for Bull Weakening, red for Bear Pressure, sky blue for Bear Exhaustion. Toggle on or off in Display settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━
GETTING STARTED
━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Add PGamma to any chart. It works on all instruments and timeframes.
2. In Settings → Display, choose your panel position and size.
3. In Settings → Calculation, adjust Momentum Smoothing, Momentum Length, and Gamma Length to suit your timeframe. Default values are calibrated for intraday 1m–60m charts.
4. Read the State row first. Then use Momentum and Gamma to understand why the state is what it is.
5. Use Bias as a quick at-a-glance directional context.
6. Use the Gamma Timeline to read state history across the session at a glance.
━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE IT
━━━━━━━━━━━━━━━━━━━━━━━━━━
PGamma is not a buy or sell signal. Think of PGamma as a market condition indicator rather than a trade signal. Use it as a confirmation layer alongside your existing methodology. Typical applications:
• Confirming trend continuation when State shows Accelerating.
• Identifying weakening rallies before reversals when State shows Bull Weakening.
• Recognizing building pressure before visible breakdowns when State shows Bear Pressure.
• Spotting exhaustion during extended trends when State shows Bear Exhaustion.
When used alongside a GEX level tool, price approaching a Call Wall with Γ⌃ Bull Weakening is a different setup than price approaching the same level with Γ↑ Accelerating. PGamma makes that distinction visible.
Because PGamma analyzes smoothed momentum rather than candle color, bullish candles can appear during Bear Pressure and bearish candles can appear during Bull Weakening. This reflects underlying momentum conditions rather than individual price bars — and is often an early warning of what is developing beneath the surface.
━━━━━━━━━━━━━━━━━━━━━━━━━━
WORKS WELL ALONGSIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━
PGamma complements indicators that identify where important price levels exist.
• Trend indicators
• Moving averages
• Volume Profile
• VWAP
• Options Gamma Exposure (GEX)
• Support and Resistance
• Market Structure
These tools identify where price may react. PGamma helps evaluate how price is behaving as it approaches those levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT THIS TOOL IS NOT
━━━━━━━━━━━━━━━━━━━━━━━━━━
PGamma measures changes in momentum. It does not predict future prices or guarantee reversals. Use it as analytical context alongside your existing trading methodology.
━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━
Calculation: Source, Momentum Smoothing, Momentum Length, Gamma Length
Display: Show Dashboard, Panel Position (6 locations), Panel Size (Small / Normal / Large), Show Gamma Timeline Indicator

Motion Reversal System [BullByte]Motion Reversal System (MRS) - Trend-Failure Bar Detector with Adaptive Pressure Meter, Multi-Mode Signal Engine, and Complete Trade-Level Framework
---
Why This Indicator Exists
Most reversal indicators fall into one of two failure modes. Either they fire constantly in ranging markets because they have no directional filter, or they only confirm reversals long after price has already turned because they rely on lagging momentum oscillators. Motion Reversal System (MRS) was built to solve both problems in a single coherent engine.
MRS is one engine with one purpose: identify the precise bar at which a confirmed trend structurally fails - the moment commitment fades, the bar itself rejects further advance, and the move's energy reverses. From that bar, MRS automatically frames the trade with entry, two targets, and a stop loss, then manages the full trade lifecycle to closure.
---
What Makes This Not a Mashup
A mashup combines independent indicators that each output their own signal, then layers them visually. MRS is the opposite. Every component of MRS feeds into a single decision: "Is the current bar a trend-failure bar?" Remove any one component and the engine stops working correctly.
- The Directional Gate decides IF a trend is present (no trend = no exhaustion to detect)
- The Four Failure Conditions decide IF the current bar is structurally failing that trend
- The Signal Mode decides HOW STRICT the failure must be
- The Pressure Meter provides a live visual reading of building reversal pressure
- The Trade Level Engine decides WHERE to enter, stop, and target
- The HTF Filter decides WHETHER higher-timeframe context confirms the call
These are not independent indicators. They are stages of one detection pipeline. Each stage exists because the next stage cannot function without it.
---
The Engine - How It Actually Works
Stage 1 - Directional Gate (Kaufman Efficiency Ratio, Self-Adapting)
The script computes Kaufman's Efficiency Ratio (ER) over a rolling window. ER measures net price displacement divided by the total path price traveled. Values near 1.0 indicate pure trending motion; values near 0.0 indicate pure noise.
A fixed ER threshold would work well on one instrument and fail on another, so MRS adapts the gate dynamically. The threshold becomes the rolling mean of the ER series plus half a standard deviation, with a user-defined floor. This means the gate raises itself during volatile sessions and lowers during quiet sessions automatically. No re-tuning per instrument.
Only bars that occur inside a confirmed directional move (gate passed + minimum ATR displacement satisfied) are evaluated for failure. This single design choice eliminates the largest source of false signals: exhaustion calls in choppy ranges where there is no trend to exhaust.
Stage 2 - Four Failure Conditions (Evaluated at Bar Close)
For every bar inside a confirmed trend, MRS evaluates four orthogonal failure conditions:
C1 - Velocity Reversal: The bar closed against the direction of the confirmed trend. This is the most basic failure signal. A bull trend bar that closes red, or a bear trend bar that closes green.
C2 - Wick Rejection: The trend-side wick (upper wick in a bull trend, lower wick in a bear trend) is at least N times the size of the bar's body. This measures intra-bar rejection - buyers or sellers pushed price further in the trend direction and were defeated within the same bar.
C3 - Commitment Anomaly: The bar's commitment value (measured via volume-weighted body strength when volume is reliable, or wick-rejection ratio when it is not) is at least N standard deviations below the recent trend's commitment baseline. The current bar is statistically anomalous compared to what the trend has been producing.
C4 - Range Expansion: The bar's true range is at least N times ATR. Filters out small doji bars where wick rejection and velocity reversal become meaningless from microstructure noise.
These four conditions are orthogonal - they measure different physical properties of the bar. C1 measures direction. C2 measures intra-bar struggle. C3 measures volume/commitment. C4 measures magnitude. When multiple conditions align on the same bar, the signal reflects a greater degree of structural confluence - though no combination of conditions guarantees a reversal.
Stage 3 - Signal Mode (Strictness Selector - THE ACTUAL SIGNAL GATE)
This is the decisive gate that determines whether a signal fires. The user chooses how many of the four conditions must align:
Conservative - All 4 conditions required. Rarest signals, highest structural confluence. Best for swing traders, low-noise sessions, or those who prefer fewer signals with stronger multi-condition alignment.
Balanced (default) - Any 3 of 4 conditions required. Middle ground for most users and most timeframes. Allows one condition to be absent if the other three are strong.
Aggressive - Velocity Reversal (C1) is mandatory plus at least one other condition (minimum 2 of 4 total). Most signals, fewer conditions required per signal. Best for scalpers, active intraday traders, or those who prefer earlier detection at the cost of more false positives.
When the chosen condition count is satisfied at bar close, a signal fires. The Pressure Meter (Stage 5) is a separate visual reading and does not gate signals.
Stage 4 - Commitment Measurement (Volume-Aware with Auto Fallback)
Commitment measures how decisively the market voted on each bar. MRS supports three measurement modes:
Auto (recommended) - Uses volume-weighted commitment on instruments with real volume data (crypto, futures, stocks with traded volume). Automatically falls back to wick-rejection ratio on indices and synthetic feeds where reported volume is meaningless. The dashboard surfaces whichever method is actually active.
Volume - Forces volume-weighted measurement. Useful when you want to lock the method explicitly. Silently falls back to wick if data is missing, with a dashboard warning.
Wick - Forces wick-rejection ratio regardless of volume availability. Best for spot Gold (XAUUSD), forex, or any instrument where you don't trust the broker's volume feed.
Stage 5 - Adaptive Pressure Meter (Live Visual Reading)
The pressure meter is the dashboard's live reading of building reversal pressure. It is always populated whenever a trend is confirmed, regardless of whether the four-condition gate has been met. This gives the trader a continuous sense of how strong the reversal pressure has been building.
The meter is normalized against an adaptive baseline calculated from its own rolling history (mean + multiplier x stdev). The dashboard percentage shows where the current meter sits relative to that baseline.
Important: the baseline is a visual reference only. It does not gate signals. The signal authority is the Signal Mode condition count described in Stage 3. The meter and baseline simply help the trader monitor when conditions are increasingly aligned before they actually trigger.
Stage 6 - Higher Timeframe Confirmation (Optional Filter)
When enabled, the engine cross-checks every signal against the directional state of a higher timeframe. A reversal signal on the chart timeframe is marked "Strong" when the higher timeframe direction agrees with the chart trend being reversed against. For example: chart is in a confirmed bull move, HTF is also bullish, and a bear reversal signal fires - this is HTF-Strong, because the HTF confirms the bull trend that is being exhausted.
If the HTF direction disagrees with the chart trend (e.g., chart is in a bull move but HTF is already bearish), the signal is marked "Weak" - visually dimmed but not suppressed. The trader still sees the call but is warned that the HTF backdrop does not align with the underlying chart trend being detected.
The HTF uses request.security with lookahead = barmerge.lookahead_off, eliminating future-data leak across timeframes. The HTF series itself naturally evolves as each HTF candle forms (this is standard Pine behavior), so the script treats HTF as a confirmation filter rather than a guarantee of HTF-bar finalization. The signal trigger itself remains chart-bar-close only.
Stage 7 - Trade Level Engine (Complete Lifecycle)
When a signal fires, the engine automatically computes and draws:
- Entry: signal-bar close
- Stop Loss: fixed ATR distance from entry (not score-scaled - strong signals deserve tighter stops, not wider ones)
- Target 1: intermediate reference level, ATR distance scaled by signal strength (visual only, does not close trade)
- Target 2: decisive level, ATR distance scaled by signal strength (closes the trade on hit)
While the trade is active, four colored horizontal lines extend from the signal bar to the current bar, with monospace pill labels showing the price and R:R for each level. Two zone fills (green Entry to TP2 reward zone, red Entry to SL risk zone) make the risk/reward geometry visible at a glance.
The trade closes when either TP2 or SL is touched at bar close (intra-bar wicks that retreat before close do NOT close the trade). Same-bar TP2/SL tie is resolved as SL hit (conservative backtest assumption).
After closure, the trade-level lines freeze in place as historical record. Labels and fills vanish to keep the chart clean. The cooldown counter starts. By default, all four lines (Entry, SL, TP1, TP2) persist as historical traces for richest backtest visibility. The "Keep TP1/TP2 Historical Lines" input can be turned off to delete TP1/TP2 lines on closure and roughly double the number of historical trades the chart can hold before Pine's 500-line cap is reached.
---
Signal Timing - No Repaint
All signal generation and trade closure is gated to confirmed (closed) bars via barstate.isconfirmed.
- A reversal signal triangle and label appear only at the close of the signal bar
- Entry, SL, TP1, TP2 levels are computed from the signal bar's close
- Trade closure (TP2 / SL hit) is evaluated only after the candle finalizes - intra-bar wicks that retreat before close do not trigger closure
The trade-off is up to one bar of timing on closure for cases where price spikes through a level intra-bar and retraces. The gain is realistic backtest visuals and zero repaint at every stage of the trade lifecycle. This is an intentional architectural choice for honest behavior over flashy intra-bar firing.
---
How to Read the Chart
Signal Markers
Bull Reversal (detected inside a confirmed bear move, reversal up signaled): small cyan triangle below the bar.
Bear Reversal (detected inside a confirmed bull move, reversal down signaled): small red triangle above the bar.
Important: a bearish reversal signal fires inside a confirmed bull move. The signal detects exhaustion of the prevailing trend - not confirmation of a new one. The dashboard will show BULL MOVE while a short is active. This is correct behavior - you are trading the exhaustion of that bull move.
A monospace pill label sits beside each triangle showing the failure score (e.g., "Reversal Up | 2.45"). Higher numbers indicate stronger structural confluence across the four conditions.
When HTF Confirmation is enabled and HTF disagrees with the signal, the triangle and label appear in a dimmed color with "(HTF)" appended to the label text. The signal is still visible but is visually de-emphasized.
Trade Level Lines
Once a signal fires, four horizontal lines appear extending from the signal bar:
- Entry (yellow, solid): the price at which the signal was generated (signal-bar close)
- Target 1 (cyan, dashed): intermediate reference level, visual only
- Target 2 (green, solid): decisive level - trade closes when this is hit at bar close
- Stop Loss (red, solid): risk level - trade closes when this is hit at bar close
Pill labels at the right end of each line show the exact price and R:R distance.
Zone Fills
- Green soft fill between Entry and TP2: the reward zone
- Red soft fill between Entry and SL: the risk zone
At a glance, the green:red ratio visualizes the trade's risk-to-reward geometry.
Directional Background
- Subtle blue tint: a bull trend is confirmed
- Subtle red/orange tint: a bear trend is confirmed
- No tint: no confirmed direction (chop)
Bar Coloring (Exhaustion Gradient)
When the exhaustion meter rises above the trigger threshold (default 50% of baseline), bars are tinted on a gradient:
- Cool color (cyan/red): exhaustion is building but moderate
- Bright color (red on bull trend, cyan on bear trend): exhaustion has reached or exceeded the baseline - conditions for a signal are increasingly met, though no signal fires until the condition count gate is satisfied at bar close
Historical Trade Traces
After a trade closes, by default all four trade-level lines (Entry, SL, TP1, TP2) remain on the chart as a permanent historical record. This builds a visual log of every prior MRS detection directly on the chart. The "Keep TP1/TP2 Historical Lines" input can be turned off if you want to conserve Pine's line-object cap.
---
How to Read the Dashboard (Full Mode)
The dashboard is the live diagnostic panel. Every row tells you something specific about the current state of the engine. From top to bottom:
Row 0 - Title: "MOTION REVERSAL SYSTEM (MRS)" - confirms the indicator name.
Row 1 - Context: ticker symbol, chart timeframe, and active Signal Mode.
Row 2 - Directional State: BULL MOVE / BEAR MOVE / NEUTRAL - large text, colored. Tells you whether a confirmed trend is currently in effect. When a trade is active against the current trend (e.g., short open during a bull move), this row appends "SHORTING EXHAUSTION" or "LONGING EXHAUSTION" so the dashboard reads as a coherent statement rather than an apparent contradiction.
Row 3 - Exhaustion bar: a 10-segment text-based pressure bar with percentage. Shows how close the live meter is to the adaptive baseline. Color escalates from gray to teal to purple to bright red/cyan as pressure builds.
Row 4 - Pressure: numerical value of the live exhaustion meter.
Row 5 - Baseline: the adaptive baseline value (mean + k x stdev) the meter is compared against. Visual reference only - does not gate signals.
Row 6 - Conditions: which of the four failure conditions are currently satisfied. " VEL WICK ANOM RANGE" means C1, C2, C4 are firing; C3 is not.
Row 7 - Count: how many of 4 conditions are firing, with current Signal Mode in parentheses. This is the actual signal authority - when the count satisfies the Signal Mode rule, a signal fires.
Row 8 - Eff Ratio: the current Kaufman Efficiency Ratio value, with the adaptive gate level next to it. Shows whether the directional gate is passing.
Row 9 - ATR: current ATR value at the configured length. Reference for understanding trade-level distances.
Row 10 - HTF Dir: current higher-timeframe directional state, OR "INVALID HTF (set higher than chart)" warning if user has misconfigured the HTF input.
Row 11 - Commit: which commitment measurement method is currently active (Auto -> Volume, Auto -> Wick fallback, etc.), with warning indicator if forced mode silently fell back.
Row 12 - Active Trade Status: "NO ACTIVE TRADE" or "LONG ACTIVE E " / "SHORT ACTIVE E " - color-coded.
Row 13 - Status: "Ready for signal" / "Cooldown: N bars" / "Trade active" - tells you whether the engine can fire a new signal right now.
Row 14 - Session: count of signals fired in the current session (resets daily).
Rows 15 to 19 - Engine Parameters reference: live readouts of the directional window, lookback periods, threshold parameters, ER gate values, and current commitment status. Useful for verifying your settings are applied as expected.
Row 20 - Version and Author footer.
Mobile / Minimal Dashboard Mode
For phone and tablet users, switching "Dashboard Mode" to "Minimal (Mobile)" collapses the dashboard to a single-column 5-row compact layout with larger fonts: Title, State, Exhaustion, Conditions, and Trade Status. Diagnostics are hidden for screen-space efficiency.
---
Default Settings Explained
- Directional Window: 12 bars - measures Efficiency Ratio over a 12-bar lookback
- Directional Threshold (Base): 0.40 - minimum ER for trend confirmation, adapted upward dynamically
- Min Move Size: 1.5 ATR - net displacement must be at least 1.5 ATR for a trend to qualify
- Trend Statistics Lookback: 20 bars - sample size for computing commitment baseline statistics
- Wick Rejection Ratio: 1.5 - trend-side wick must be at least 1.5x the body to count as rejection
- Commitment Anomaly Sigma: 1.0 - current commitment must be at least 1.0 standard deviation below trend mean
- Min Range Expansion: 1.2 ATR - current bar range must be at least 1.2x ATR
- Signal Mode: Balanced - any 3 of 4 conditions required
- Baseline Lookback: 100 bars - rolling history for pressure meter statistics
- Baseline Multiplier: 2.0 - baseline = mean + 2.0 x stdev
- ATR Length: 14 - standard ATR period
- Commitment Mode: Auto - volume on real-volume instruments, wick on indices
- Post-Closure Cooldown: 10 bars - wait 10 bars after trade closure before new signal
- Stop Loss Distance: 1.5 ATR - base SL distance from entry
- Target 1 Distance: 1.5 ATR - T1 at 1:1 with SL
- Target 2 Distance: 3.0 ATR - T2 at 1:2 with SL
- Score-Weight Nudge: 0.3 - stronger signals widen targets by up to 30%
- Min Label Spacing: 0.35 ATR - minimum vertical gap between pill labels for readability
---
Recommended Usage by Trader Profile
Scalper (1m to 5m): Aggressive mode, Cooldown 5 to 8 bars, HTF Confirmation on 15m. Signal frequency will be higher in Aggressive mode; use the dashboard pressure meter to monitor building exhaustion between signals.
Intraday Trader (5m to 30m): Balanced mode (default), Cooldown 10 bars, HTF Confirmation on 1h to 4h. The default settings were designed with this profile in mind as a starting reference point.
Swing Trader (1h to 4h): Conservative mode, Cooldown 15 to 20 bars, HTF Confirmation on Daily. Few signals, maximum condition confluence required.
Position Trader (Daily and above): Conservative mode, HTF Confirmation on Weekly. Signals are rare; when they fire, all four structural failure conditions have aligned on a higher timeframe bar.
---
Recommended Markets
- Crypto (Spot and Perpetuals): well-suited - high volume data availability, clean microstructure, MRS auto-selects volume-weighted commitment
- Index Futures (NQ, ES, NIFTY futures): well-suited - real traded volume available, strong directional character
- FX Majors: usable with Wick commitment mode forced (broker volume is unreliable)
- Spot Gold (XAUUSD): use Wick mode explicitly - most brokers report tick count as volume which is meaningless
- Cash Indices (NIFTY, SPX index): MRS auto-detects index type and routes to Wick mode; verify Commit row on dashboard
---
A Real-World Example Walkthrough
This walkthrough is a constructed illustration of how the engine behaves. It does not represent a historical trade or a performance result.
Scenario: BTCUSDT 15m chart, Balanced mode, Auto commitment.
Bars 1 to 20: Price climbs in a steady bull move. Dashboard shows BULL MOVE, Efficiency Ratio 0.55, Pressure Meter 0.20 (low). No signals fire because exhaustion is not building.
Bar 21: A large green candle prints - Range Expansion (C4) fires but the bar closes strong (no Velocity Reversal C1), and commitment is normal (no C3). Only 1 of 4 conditions. No signal.
Bars 22 to 24: Three smaller green bars with shrinking bodies. The Pressure Meter ticks up to 0.55 (moderate). Bar coloring activates softly. Dashboard "Conditions" row shows - only Wick Rejection is firing intermittently. No signal yet.
Bar 25: A red bar prints with a long upper wick and large range. All four conditions fire:
- C1 Velocity Reversal: bar closed red (against bull trend)
- C2 Wick Rejection: upper wick is 1.8x the body
- C3 Commitment Anomaly: bar's commitment is 1.4 standard deviations below the trend baseline
- C4 Range Expansion: bar range is 1.6x ATR
Dashboard shows "Conditions: VEL WICK ANOM RANGE | Count: 4/4". Pressure Meter reads 1.15.
A red bear reversal triangle prints above the bar with the label "Reversal Down | 3.42". Trade-level lines automatically draw:
- Entry (yellow): 64,210.50 (signal-bar close)
- SL (red): 64,422.00 (1.5 ATR above entry, since this is a short)
- T1 (cyan dashed): 63,999.00 (1.5 ATR x score-scale below entry)
- T2 (green): 63,576.00 (3.0 ATR x score-scale below entry)
Green reward fill appears Entry to T2, red risk fill Entry to SL. Dashboard "Active Trade" row turns red: "SHORT ACTIVE E 64,210.50". Dashboard "Directional State" row reads: "BULL MOVE | SHORTING EXHAUSTION".
Over the next several bars, price drops. The trade-level lines extend bar-by-bar. Dashboard " Status " reads "Trade active". No new signals fire because one trade is already open.
Bar 32: In this example, price reaches T2 at 63,576.00 on this bar's close. The trade closes at the target level. Labels and zone fills vanish. The trade-level lines freeze at bar 32 as historical record. Dashboard "Status" switches to "Cooldown: 10 bars".
Bars 33 to 42: Cooldown period. No new signals possible.
Bar 43: Cooldown complete. Dashboard "Status" reads "Ready for signal". The engine will evaluate the next qualifying bar for failure conditions.
---
Chart Examples
These screenshots show the indicator in use at specific moments in time. They are provided for visual reference only and do not represent performance results or forward-looking outcomes.
1. MRS detected a trend-failure bar inside a confirmed bull move on BTCUSDT 5m. Range expansion (C4) fired as exhaustion pressure reached the adaptive baseline (1.28 vs 1.03). Balanced mode gated the short at bar close - entry 62,553.3, SL 62,681.9, T2 62,273.6 (T2 distance: 2.17R).
2. MRS detected a trend-failure bar at the low of a confirmed bear move on NQ1! 5m. As the engine tracked displacement against path length (ER), exhaustion pressure crossed the adaptive baseline - failure score 0.48. Balanced mode gated the long at bar close - entry 30,553.75, SL 30,489.00, T2 30,706.50 (T2 distance: 2.36R).
---
Parameter Adjustment Guide
If you get too few signals:
- Switch Signal Mode to Aggressive
- Lower Wick Rejection Ratio (1.0 to 1.2)
- Lower Commitment Anomaly Sigma (0.7 to 0.9)
- Lower Min Range Expansion (1.0 to 1.1)
- Reduce Cooldown to 5
If you get too many false signals:
- Switch Signal Mode to Conservative
- Raise Wick Rejection Ratio (2.0 to 2.5)
- Raise Commitment Anomaly Sigma (1.3 to 2.0)
- Raise Min Range Expansion (1.5 to 2.0)
- Enable HTF Confirmation
- Raise Cooldown to 15 to 20
If the T2 zone is reached but price reverses sharply before bar close triggers closure:
- Reduce T2 Distance to 2.0 to 2.5 ATR
- Reduce Score-Weight Nudge to 0.1 (less target widening on strong signals)
If SL is hit too often:
- Increase Stop Loss Distance to 2.0 ATR
- Increase T1 and T2 proportionally to maintain R:R geometry
---
What This Indicator Does Not Do
- It does not execute trades. It is an indicator (overlay), not a strategy. Order placement and trade management decisions remain with the user.
- It does not predict the future. It identifies bars where a confirmed trend has structurally failed based on objective criteria.
- It does not eliminate losses. False signals will occur, especially in news-driven price spikes. Always size positions according to your own risk management rules.
- It does not work on every instrument equally well. Choppy low-liquidity assets produce noisier signals. Test on your specific market before relying on it.
- It does not replace discretionary judgment. Use MRS as one input in your decision process, not the only input.
---
Alerts Available
MRS Bull Reversal (Strong) - bullish reversal signal; HTF confirms the preceding bear trend
MRS Bull Reversal (HTF Weak) - bullish reversal signal; HTF does not confirm the preceding bear trend
MRS Bear Reversal (Strong) - bearish reversal signal; HTF confirms the preceding bull trend
MRS Bear Reversal (HTF Weak) - bearish reversal signal; HTF does not confirm the preceding bull trend
MRS Target 2 Hit - trade closure at T2 level
MRS Stop Loss Hit - trade closure at SL level
---
Disclaimer
This script is provided for educational and analytical purposes only. It is not financial advice, an investment recommendation, or a solicitation to trade. Past performance of any indicator or strategy does not guarantee future results. Trading involves substantial risk of loss. The author and PulseWire are not liable for any losses or damages arising from use of this script. Always validate signals against your own analysis, conduct your own due diligence, and apply prudent risk management. Use at your own risk.
---
Open source under Mozilla Public License 2.0. Code is fully readable in the Pine Editor for those who want to study the math. Thank you.
- BullByte Indicator

Boshmann's Market Direction HistBoshmann's Market Direction Hist
The theory behind a directional histogram is to visually quantify not just the direction of a trend, but its underlying momentum and the distance between moving averages. While identifying a trend regime categorizes the market into a fixed state (bull, bear, or sideways), measuring the spread between a fast and slow moving average reveals whether that trend is accelerating, decelerating, or reaching exhaustion. By projecting this spread as an oscillator around a zero line, traders can easily spot momentum divergences and gauge the true strength of a directional move.
How the Script Works: The script calculates the raw distance between a short-term moving average (20-period SMA) and a long-term moving average (100-period SMA). To ensure the indicator works seamlessly across any asset class or timeframe—whether a stock is trading at $5 or $50,000—it normalizes this distance as a percentage of the current price. It then plots this normalized momentum as a histogram. Finally, the histogram bars are painted using the exact same logic as the Regime Counters script: Green for Strong Bull, Red for Strong Bear, and Yellow for Sideways.
Why You Should Use It: This script is explicitly designed to be used in combination with the Regime Counters and Volatility Histogram scripts to form a complete, three-dimensional view of the market.
A user should use this histogram because while the Regime Counter tells you what state the market is in, the Direction Histogram tells you how strong that state is. For example, if the Regime Counter classifies the market as "Bullish" but you see the green bars on this histogram steadily shrinking toward the zero line, it is a leading indicator that upward momentum is dying long before the official regime flips. Together, the three scripts allow you to trade systematically: the Regime Counter dictates your directional bias, the Volatility script warns you of price expansion, and the Direction Histogram measures the real-time conviction pushing the trend. Indicator

Boshmann's Regime CountersSummary of Boshmann's Regime Counters
At its core, this indicator is designed to remove human subjectivity from chart reading by translating market behavior into purely objective, mathematically defined states. Rather than relying on discretionary trendlines or "gut feelings" about market speed, it uses robust statistical baselines to continuously classify the market into discrete Trend and Volatility regimes.
For PulseWire users, this provides an immediate, systematic context of the market environment, which is crucial because trading strategies (like mean-reversion vs. trend-following) only perform well when aligned with the correct market state.
1. Trend Regime Classification (Directional Bias)
The indicator evaluates moving average alignments to determine the structural trend. It requires both price position and momentum to agree before declaring a strong trend:
Bull: The closing price is strictly above a long-term baseline (200 SMA) AND short-term momentum (20 SMA) is leading the medium-term momentum (100 SMA).
Bear: The closing price is below the 200 SMA AND the 20 SMA has crossed below the 100 SMA.
Sideways: Any state where the price and moving averages are in conflict or tangled.
Visuals: The chart bars are painted dynamically (Green for Bull, Red for Bear, Golden for Sideways) so the current regime is instantly visible.
2. Volatility Regime Classification (Market Speed)
Instead of using fixed point values to measure volatility (which break down across different timeframes and assets), the indicator uses an Adaptive Z-Score of the Average True Range (ATR). By looking back over a large sample size (250 periods), it calculates a rolling mean and standard deviation of the ATR. This normalizes volatility into a universal metric:
Quiet (Z-Score < -0.5): The market is contracting and experiencing significantly below-average movement.
Normal (Z-Score -0.5 to 0.5): The market is operating within its standard, expected historical variance.
Volatile (Z-Score > 0.5): The market is expanding, experiencing statistically significant, out-sized movement.
3. The Statistics Dashboard
The script anchors a real-time statistical dashboard to the chart. It tallies the exact number of bars—and calculates the overall historical percentage—spent in each specific trend and volatility regime.
What this does for PulseWire users:
Strategy Alignment: By quantifying exactly how much time an asset spends trending versus chopping sideways, traders can objectively decide whether to deploy a trend-following system or a range-bound strategy on that specific asset.
Contextual Awareness: The adaptive Z-score prevents users from being caught off guard by volatility expansion, giving them a mathematical warning when the market shifts from "Quiet" accumulation into "Volatile" distribution.
Backtesting Validation: The on-chart percentages give quantitative traders immediate insight into the asset's structural personality over the loaded history (e.g., realizing an asset is only in a "Strong Bull" state 25% of the time helps set realistic win-rate expectations). Indicator

Adaptive Volumetric Reversion Channel Fade ValidatorAdaptive Volumetric Reversion Channel — Fade Validator (AVRC)
What it is
AVRC is an anchored, volume-weighted regression channel that frames mean-reversion ("fade") setups and then gates, scores and validates them — so you can see whether fading stretched price actually has an edge on your symbol and timeframe instead of taking it on faith. It is a study / analysis framework, not a strategy and not a signal service.
Why these components are combined (the mashup rationale)
Fading an extreme asks three different questions, and no single classic tool answers all three. AVRC coordinates several non-redundant lenses on one shared geometry (an anchored regression channel) and one shared volatility unit (residual σ), so each lens can check the others rather than echoing it:
WHERE is price stretched? A volume-weighted regression centerline with residual-σ bands is drawn against a slower macro trend-relative volume map — volume binned by σ-distance from a longer regression line. Whether the tactical band sits in a thin (fast-traversed) or thick (heavily-traded) macro node tells you if a fade is likely clean or absorbed. This cross-read is the connective tissue between the two layers.
Is a reversion ACTUALLY firing? Independent "tells" at the band — a close-back rejection, a band-confluent momentum divergence, an equal-high/low liquidity sweep, and the macro-density read. Because these tells are correlated, their agreement is shrunk by a design-effect correction so echoes can't masquerade as independent confirmation.
Is the market in a reverting STATE? A regime gate (variance-ratio test + a reversion-trust correlation) only passes fades when price increments offset rather than compound. An entry-time ride-risk score (macro-trend alignment, the two-centerline spread, an already-walking band, momentum, mean-reversion half-life, and multi-timeframe trend consensus) flags fades likely to be "walked" rather than reverted.
The components share one geometry and one volatility unit, and each can veto the others. The goal is to suppress low-quality fades more than to generate them.
How the validation layer works (what makes this more than a drawing)
Every fade is logged and, a fixed horizon later, resolved: its forward return is measured in ATR units and tabulated Gate ON vs Gate OFF — follow-through %, a Wilson 95% interval, whipsaw %, and mean R per fade. Outcomes are additionally split Reverted vs Rode, by macro node (thin/thick), and by ride-risk (low/high at the running median). The panel's Edge line synthesizes this into a single read: is Gate ON's follow-through interval clearing the ungated baseline with positive mean R and enough samples? Per-fade rows also export to the Data Window for your own analysis. Every filter has to earn its place against the ungated baseline.
How to use it
Set the Price source (top of settings). Defaults are tuned for an intraday index future; the source is user-selectable so the framework runs on any symbol or market. Volume-based parts (heatmap, profile, POC) need a real volume feed.
Read the panel top-down: Now (live setup) → State (regime + spread + compression) → the A/B scoreboard (Gate OFF, Gate ON, Revert, Ride) → Edge verdict.
A fade arms when price tags the outer band and at least one tell prints, then passes only if the regime (and optional ride-risk) gate agrees. Target is the centerline or the nearest untested POC.
If Gate ON does not beat Gate OFF on follow-through and mean R with non-overlapping intervals and enough samples, the edge isn't there on this symbol/timeframe — change them, don't force it. The signal is clearest on higher intraday timeframes; 1-minute is mostly noise.
What is original here
The original work is the coordination: a shared-σ, timeframe-adaptive regression channel used as a reversion frame; a trend-relative volume map cross-read against the band; decorrelated tells fused by a design-effect shrink; a statistical regime gate; an entry-time ride-risk score; and a built-in A/B + forward-return validation harness — combined so each lens can veto the others and the tool reports its own hit rate. It is not a re-skin of any single indicator.
Concept credits (techniques are standard; this implementation is original)
Volume-weighted least-squares & polynomial regression; residual-σ channels; anchored VWAP (all standard); Volume Profile / Value Area / Point of Control — Market Profile (Steidlmayer / CBOT); Variance-Ratio test — Lo & MacKinlay (1988); design effect / effective sample size — Kish (1965); proportion confidence interval — Wilson (1927); mean-reversion half-life — Ornstein–Uhlenbeck process; ATR, RSI, Parabolic SAR — Wilder; Stochastic — Lane; Supertrend (classic, MTF context). Builds on established open-source regression-channel and anchored-VWAP techniques.
Settings (all defaults are on; tuned for an intraday index future)
Data/Source · Volatility unit · Macro volume heatmap · Tactical channel & bands · Interrelation & band-walk · Ride-risk filter · Density cross-read · Reversion tells · Regime gate · POC targets · Fade signal · Validation & export · Dashboard & theme (auto light/dark) · MTF trend context. The two signal-suppression gates (walk-gate, ride-gate) ship off so the indicator shows its signals and lets the validation panel tell you whether enabling them helps.
Disclaimer
For research and education only. NOT financial advice, NOT a recommendation, and NOT a guarantee of future results. All statistics shown are in-sample on loaded history, close-to-close at the horizon, without costs or slippage — a study aid, not a backtest. Mean reversion fails in trends and during regime breaks. Do your own research and manage your own risk. Indicator

Machine Learning Smart Money Concepts | GainzAlgo
What It Is
This is a PulseWire indicator that fuses two ideas that don't usually share a chart:
Smart Money Concepts (SMC): classic structure-based trading, specifically Change of Character (CHoCH) detection off swing highs/lows.
K-Nearest Neighbors (KNN) : a simple, non-parametric machine learning method — used to score each new structure break against the most similar structure breaks that happened earlier on the same chart, and to project price targets from how those similar setups actually played out.
In plain terms: every time price breaks structure, the indicator asks 'what did the last several breaks that looked like this one actually do?' and uses that historical evidence to assign a probability and a set of price targets, instead of relying on a fixed, one-size-fits-all rule.
Structure first (the SMC layer)
The indicator finds swing points using ta.pivothigh / ta.pivotlow with a configurable pivot length. It tracks a simple internal trend state (marketTrend: up / down / neutral) and flags a CHoCH:
Bullish CHoCH: price closes above the last swing high while the prevailing state was not already bullish (i.e., a flip up).
Bearish CHoCH: price closes below the last swing low while the prevailing state was not already bearish (i.e., a flip down).
This is the standard SMC definition of "change of character", the first sign that the prior trend may be giving way to a new one.
Turning the break into an actionable trade
When a CHoCH fires, the script doesn't just say "structure broke", it measures how it broke, using three features computed over the bars since the prior swing point:
Volume delta: An estimate of buy vs. sell pressure on each bar (derived from where the close sits within the bar's range, weighted by volume), averaged over the move. Positive = buyers dominant, negative = sellers dominant.
Displacement: The size of the price move since the swing point, normalized by ATR. This tells you whether the break was a forceful, large-range move or a weak, barely-there one, independent of the instrument's raw volatility.
Velocity: Displacement divided by the number of bars it took (i.e., how fast the move happened.)
Finding lookalikes (the KNN engine)
The script keeps a rolling database (capped at 2,000 records, with a "Historical Memory Window" limiting how far back it'll search) of every previous CHoCH's fingerprint, along with what actually happened afterward.
For a new CHoCH, it:
Filters the database to past events of the same direction (bullish vs. bearish) within the memory window.
Computes Euclidean distance between the new fingerprint and every stored one.
Pulls the K nearest neighbors (default 5) — the most similar past setups.
Uses those neighbors to calculate:
1. A Significance Score = % of the K neighbors where price moved further in the favorable direction than the adverse direction (i.e., a "win rate" among lookalikes).
2. Three price targets, built from the distribution of how far those neighbor setups actually ran:
TP1 (mean × conservative scalar) — a toned-down average outcome.
TP2 (median) — the typical outcome.
TP3 (75th percentile) — a stretch/aggressive outcome.
These 3 targets are represented by a drawn box on the chart.
How the database learns (the "training" loop)
This is the part that makes it adaptive rather than a static rule set. On every bar, the script checks: did a CHoCH happen exactly lookahead bars ago (default 20)? If so, it now has enough hindsight to grade that old setup:
It walks forward through those 20 bars and finds the maximum favorable excursion and maximum adverse excursion from the price at the time of that old CHoCH.
It labels the outcome (favorable > adverse → success) and records the fingerprint as it existed at that time, plus the result, into the database.
So the model is continuously and only ever trained on fully resolved history, never on the bar currently forming. It's an online-learning loop: today's signal is scored against yesterday's already-graded outcomes, and today's setup itself won't be graded and added to the database until lookahead bars from now.
What's Drawn on the Chart
CHoCH connector line: solid line from the broken swing point to the breakout close.
Broken level marker: dashed line showing the swing high/low that got taken out, plus a short dotted line marking the actual break.
Wick trace: a stylized multi-layer glow line tracing the wicks leading into the break (purely visual/aesthetic).
CHoCH region fill: soft fill color between the wick trace and the broken level.
Probability badge: small label (▲/▼ + %) printed near the break; gets a ★ if direction confidence is ≥85%.
CHoCH tag: secondary tiny label showing "+CHoCH / −CHoCH" and the raw significance score.
Target box — a shaded box from TP1 to TP3 with a dotted TP2 line through the middle, extended a fixed number of bars to the right.
Dynamic Target Ribbon: a smoothed (SMA-based) pair of lines tracking the most recent bull/bear target, with a fill between them, giving a continuously-updating visual "zone."
Side panel (table): live readout of bias (bullish/bearish/neutral), current significance score, last TP1/TP2/TP3 with counts of how many of each tier are still outstanding (unhit), database size, current volume delta, the active swing high/low, and the K / Window settings.
Settings Guide
🧠 Quant Engine
Look-Ahead Window (Bars): how many bars forward the model waits before grading a past CHoCH and adding it to the database. Larger = more patient/accurate labeling but slower to build a dataset.
Historical Memory Window: how far back (in bars) the KNN search is allowed to look for neighbors. Smaller = more regime-adaptive (recent behavior only); larger = more data per query but less responsive to regime shifts.
K-Nearest Neighbors (K): how many lookalikes to average over. Lower K = more reactive/noisy; higher K = smoother but slower to reflect new behavior.
Min Significance Score (%): the threshold below which the indicator visually marks a signal as low-conviction (greyed badge) rather than colored.
ATR Period: used both for the displacement feature and for badge placement offsets.
Pivot Length: swing-point sensitivity; smaller = more (and earlier, but less confirmed) swings.
🎯 Target Levels
Conservative Scalar: multiplier applied to the mean neighbor outcome to produce TP1.
Target Extension (Bars): how far right the target box are drawn.
How to Use It
Wait for a CHoCH badge. Direction is shown by the arrow; the percentage is the KNN-derived probability that this break behaves like the favorable-outcome neighbors.
Check the significance score against your threshold. Setups below your Min Significance Score print in a neutral grey, treat these as "structure broke, but the model has no strong opinion" rather than as a clean signal.
Use the target box as a planning zone, not a guarantee. TP1 is the conservative/likely zone, TP2 the typical outcome among similar past moves, TP3 the stretch target, read it as a probability-weighted range, not a prediction.
Watch "DB Records" in the side panel. Early on a chart, or on a symbol with limited history, the database will be small and the KNN matches less statistically meaningful. The model gets more reliable as it accumulates more graded history.
Use the ★ marker as an extra filter. It only appears when directional confidence (not the raw significance score, but the bull/bear probability split) is ≥85%.
Cross-reference with the bias/volume-delta in the panel for a quick read on whether the broader trend state and the most recent candle pressure agree with the new signal.
Helpful Trade Tips
Tip 1: Works extremely well on larger timeframes. Sweet spot is hourly and daily, which positions this indicator well for swing traders. Let's take a look at some examples:
Example 1: SPY 30-Minute timeframe
Here, with extended hours disabled, SPY snagged 8/9 of its target boxes.
Example 2: QQQ Weekly
Here, QQQ touched all recent targets.
This highlights the strength of SMC to aid traders in having higher timeframe and longer range expectations based on the structural changes of the market.
Let's highlight a few other examples:
Example 3: BTCUSD on the Daily timeframe
Here, BTC shows its loyalty to SMC, hitting the majority of its targets on the daily timeframe.
Note: One thing to be aware of, to prevent the chart from looking overly cluttered, the box length has been sized to the immedate range to prevent a messy looking chart. However, you can manually adjust the size by using the "Manual Extension (Bars)" feature in the settings menu to increase the width of the target boxes. Here is an example:
Alerts
You can set custom alerts with this indicator to trigger buy and sell signals based on a probability threshold. You can set the probability thresholds for bearish and bullish conditions within the indicators setting menus. Then, toggle over to the alerts menu and set your Buy and Sell alerts. From there, you will be notified when there is a CHoCH that meets your specific probability threshold. Indicator

Strategy

APEX Trend & Signal Engine [Viprasol]APEX Trend & Signal Engine — Regime-Aware Dual-Mode Toolkit
═══════════════════════════════════════════════════════════
THE PROBLEM IT SOLVES
═══════════════════════════════════════════════════════════
The single most expensive mistake in trading is using the wrong style for the
conditions — trend-following a sideways range (death by a thousand whipsaws), or
mean-reverting a strong trend (fighting a freight train). Most indicators apply ONE
style blindly and let you find out the hard way.
APEX reads the market REGIME first, tells you which style fits right now, and only
fires signals that match. When the market is trending it trend-follows; when it's
ranging it mean-reverts. Same tool, opposite logic, applied at the right time.
═══════════════════════════════════════════════════════════
HOW THE FOUR PILLARS WORK TOGETHER
═══════════════════════════════════════════════════════════
Every trade decision rests on four questions, and APEX answers each:
1. BIAS — long or short? A multi-factor Trend Midline (your choice of 8 MA types)
colored by a consensus of price position, slope, and directional movement.
2. REGIME — trend or range? ADX + Kaufman Efficiency Ratio classify the regime and
pick the favored mode (trend-follow vs mean-revert). This is the engine's core.
3. LOCATION — where is fair value? A premium/discount model: longs are only allowed
in discount (below equilibrium), shorts only in premium (above). Better entries,
better risk-reward.
4. SIGNAL + FILTER — the trigger, gated by regime, location, and trend-cloud
confluence, so low-quality signals are filtered out.
═══════════════════════════════════════════════════════════
SIGNALS
═══════════════════════════════════════════════════════════
• In a TRENDING regime: momentum entries in the trend direction (baseline reclaim with
rising/falling slope and directional-movement agreement).
• In a RANGING regime: mean-reversion entries when price tags an extreme band and
reverts.
• A colored dot marks a confluent signal; a gray ✕ marks a signal that LACKS confluence
(a hint to exit the opposite position rather than enter).
• Take-profit markers flag when price reaches an ATR-based target after a signal.
═══════════════════════════════════════════════════════════
FOUR OPTIONAL OVERLAYS
═══════════════════════════════════════════════════════════
• TREND MIDLINE — an MA baseline colored by multi-factor consensus (blue long / red
short / gray neutral-exhaustion), filled to price.
• ADAPTIVE ZONE — a Supertrend rendered as a dynamic support/resistance ZONE (support
beneath price in uptrends, resistance above in downtrends) rather than flip signals.
• TREND CLOUD — a modified Ichimoku Kumo (Donchian, EMA, or HMA engine) for trend
context; bullish above, bearish below.
• EXTREME ZONES — multi-band standard-deviation gradient zones marking where price is
statistically stretched and prone to revert (mean-reversion).
Each is independently toggleable so you keep the chart as clean as you like.
═══════════════════════════════════════════════════════════
5-STATE CANDLE COLORING & DASHBOARD
═══════════════════════════════════════════════════════════
Candles paint in five states from a 0-10 trend-strength score: strong buy, buy,
neutral, sell, strong sell (strong states solid, weaker states faded).
The dashboard reports, at a glance: Favored Mode (trend-follow / mean-revert), Regime
(trending/ranging + bias), Trend (increasing/decreasing), Strength (0-10), Volatility
(increasing/decreasing), Location (premium/discount), Session (Tokyo/London/NY/Void),
and the current Signal.
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Leave Mode on "Auto" and read the dashboard's Favored Mode — trade with the regime.
2. Take colored signals that agree with the trend; treat gray ✕ marks as exit cues.
3. Respect Location — favor longs in discount, shorts in premium.
4. Use the Adaptive Zone / Extreme Zones as entry and target reference levels.
5. Tune Trend/Fast lengths and the ADX threshold to your market and timeframe.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS — PLEASE READ
═══════════════════════════════════════════════════════════
• No indicator predicts the future. APEX organizes context and signals; it does not
guarantee outcomes. Confirm on closed bars.
• Regime classification has a transition lag — the first bars of a new trend or range
can be mislabeled. The favored-mode readout is guidance, not gospel.
• Session hours are set in UTC and adjustable; verify they match your instrument.
• Volume-dependent and synthetic-feed instruments may read differently.
• Take-profit markers use a simple ATR target on one tracked signal — they are a
reference, not a backtest. This is a decision-support tool, not financial advice.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
This is an original toolkit built from public-domain technical-analysis methods,
implemented from their published formulas: Supertrend (Olivier Seban), Ichimoku Kinko
Hyo (Goichi Hosoda), Bollinger Bands / %B (John Bollinger), ADX/DMI (J. Welles Wilder),
Efficiency Ratio (Perry Kaufman), and the premium/discount equilibrium concept. The
regime-aware dual-mode architecture, the confluence/location gating, the strength model,
the overlays' construction, and all code are original Viprasol work. No third-party Pine
code is reused and no proprietary algorithms are included.
Indicator

MA Confluence Engine [Viprasol]MA Confluence Engine — 15-MA Consensus Ribbon
═══════════════════════════════════════════════════════════
ONE CROSSOVER IS AN OPINION. FIFTEEN MAs AGREEING IS A TREND.
═══════════════════════════════════════════════════════════
A single moving-average crossover whipsaws constantly — two lines tangle in chop and
fire signal after signal that goes nowhere. MA Confluence Engine replaces that one
fragile opinion with the agreement of a 15-MA ribbon. It only signals when most of the
ribbon agrees on direction, stands aside when the ribbon squeezes together (a
compressed ribbon IS chop), and on every signal it draws a complete trade plan:
Entry, TP1, TP2, TP3 and Stop Loss.
═══════════════════════════════════════════════════════════
HOW THE CONSENSUS WORKS
═══════════════════════════════════════════════════════════
The engine builds a ribbon of 15 moving averages, spaced from a fast base length
upward (e.g. 10, 18, 26 … 122). Every bar it measures two things across all 15:
• How many is price trading ABOVE?
• How many are SLOPING UP?
These combine into a single CONSENSUS SCORE from 0 to 100:
100% = price above all 15 MAs AND all 15 rising (a fully stacked uptrend)
0% = price below all 15 AND all 15 falling (a fully stacked downtrend)
50% = mixed — the ribbon disagrees
A long signal fires only when consensus rises through your bullish threshold
(default 75%), a short when it falls through the bearish threshold (default 25%).
Half-hearted moves where the ribbon disagrees never trigger.
═══════════════════════════════════════════════════════════
THE TRADE PLAN — DRAWN ON THE LAST SIGNAL
═══════════════════════════════════════════════════════════
The moment a signal fires, the engine projects five levels forward and labels each
with its price:
• ENTRY — at the signal close
• STOP LOSS — your risk distance away (ATR or %); this distance defines 1R
• TP1 / TP2 / TP3 — at your chosen R-multiples of that risk (default 1R / 2R / 3R)
Only the most recent signal's plan is shown, so the chart stays clean. The dashboard
mirrors the exact prices, and every alert carries the full plan (Entry/SL/TP1/TP2/TP3)
so it's ready for journaling or automation.
═══════════════════════════════════════════════════════════
THE RIBBON IS ITS OWN CHOP FILTER
═══════════════════════════════════════════════════════════
When a market chops, moving averages of every length collapse onto each other — the
ribbon goes flat and thin. The engine measures RIBBON WIDTH (the spread of the 15 MAs,
normalized by ATR) and skips signals whenever the ribbon is compressed below your
threshold. A second Kaufman Efficiency-Ratio gate confirms price is actually trending.
Filtered crosses are drawn faintly (✕) and counted, so you SEE what was avoided.
═══════════════════════════════════════════════════════════
21 VERIFIED, LICENSE-CLEAN MOVING AVERAGES
═══════════════════════════════════════════════════════════
Build the ribbon from any one of:
SMA, EMA, WMA, RMA, VWMA, DEMA, TEMA, HMA, ALMA, T3, McGinley, ZLEMA, KAMA, FRAMA,
VIDYA, SuperSmoother, Gaussian, Laguerre, Kalman, LSMA, Median.
Each is implemented from its published formula and credited to its author. Jurik's JMA
is deliberately excluded — it is a proprietary, trademarked product whose every
open-source "version" is an unlicensed reverse-engineering.
═══════════════════════════════════════════════════════════
DASHBOARD
═══════════════════════════════════════════════════════════
• Live consensus score, with price-above and sloping-up counts (x of 15)
• Ribbon width + chop state, trend-regime efficiency reading
• Last signal direction and the full Entry / TP1 / TP2 / TP3 / SL prices
• Whipsaws filtered
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• 15-MA ribbon colored by consensus (red → green) or simple bull/bear, with fill
• Entry/TP1/TP2/TP3/SL level lines + labels on the latest signal
• Choppy-regime background shading + faint markers on filtered crosses
• Direction filter (Both / Longs / Shorts)
• Stop in ATR or %, take-profits as R-multiples
• Alerts for long, short, and chop — signal alerts include the full trade plan
• Full MA sub-parameter control (ALMA, T3, KAMA, Gaussian, Laguerre, Kalman, VIDYA, McGinley)
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Choose an MA type, base length, and spacing for the ribbon.
2. Wait for a signal — it only fires when the ribbon fans out and aligns (consensus
through your threshold) in a trending regime.
3. Use the drawn Entry / SL / TP1 / TP2 / TP3 as your trade plan; scale out at the TPs.
4. Raise the consensus thresholds and ribbon-width minimum to make signals stricter
(fewer, cleaner) — the whipsaw-filtered count shows the filter working.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS — PLEASE READ
═══════════════════════════════════════════════════════════
• Signals are evaluated on bar close; act on confirmed bars to avoid intrabar flicker.
• A consensus system enters LATER than a single fast crossover — it trades fewer,
higher-quality moves and will sit out fast reversals. That trade-off is the point.
• The TP/SL levels are a risk framework, not a prediction — markets do not owe you 3R.
• Volume MAs (VWMA) and the regime math need reliable data; some synthetic forex/CFD
feeds are less meaningful.
• This is a decision-support tool, not financial advice. Trade at your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
MA methods credited to their authors: Wilder (RMA), Mulloy (DEMA/TEMA), Hull (HMA),
Legoux & Kouzis-Loukas (ALMA), Tillson (T3), McGinley, Kaufman (KAMA/Efficiency Ratio),
Ehlers (ZLEMA, SuperSmoother, Gaussian, Laguerre, FRAMA), Chande (VIDYA), Kálmán
(Kalman). All formulas are public-domain / published methods. Every line of Pine — the
MA dispatcher, the 15-MA consensus engine, the ribbon chop filter, the trade-plan
projection, and the visualization — is original Viprasol work written from the
published formulas. No third-party Pine code is reused; no proprietary algorithms included.
Indicator

Indicator

Trend Efficiency Exhaustion Regime-Gated & CalibratedTrend Efficiency Exhaustion — Regime-Gated & Calibrated
What it is
A single-pane oscillator that measures when a trend is losing efficiency and turns that into graded, forward-calibrated exhaustion and ignition signals. It is built around one question — "is this efficiency-exhaustion event actually worth acting on?" — and every component in the script exists to answer that one question rather than to add an independent signal.
It plots, in one pane: an efficiency-gap histogram, a fast efficiency line, event markers, a regime "weather-strip" ribbon, and an information table that states the read in plain language. It is symbol- and timeframe-agnostic; defaults are tuned for NIFTY / BANKNIFTY but a Source input and a VIX-symbol input let you use it on any instrument in any market.
The core idea — efficiency, not a magic multiplier
The Efficiency Ratio is the net move divided by the total path travelled over a window: ER = |close − close | / Σ|close − close |, bounded 0–1. A value near 1 means price moved in a straight, efficient line (trend); near 0 means it wandered (chop).
Reading efficiency at two horizons gives the central signal:
Efficiency Gap = ER_fast − ER_slow. When the fast read rolls over while the slow read is still elevated, the trend is losing efficiency under an otherwise intact trend — the classic exhaustion tell.
Displacement percentile ranks the current leg's travel against recent completed legs on this symbol and timeframe, so "stretched" is defined by the instrument's own recent behaviour rather than a fixed price > k·ATR multiplier.
Exhaustion = a stretched leg with fast efficiency rolling over, under a genuine trend. Ignition = fast efficiency surging from a young leg (continuation).
Why these components belong in ONE script (how the mashup works together)
This is a mashup by design, but it is not a stack of indicators each drawing its own signal. Every layer is a gate or a grade on the same event, feeding one decision pipeline:
Efficiency (dual-horizon Efficiency Ratio) — detects the candidate event (exhaustion / ignition).
Regime engine (Efficiency + ADX + a self-exciting volatility-cluster intensity) — decides when the event is even allowed to fire. Exhaustion is only meaningful inside a real trend; it is suppressed in chaotic, news-driven volatility. The regime is rendered as a continuous 5-state read (strong-trend / trend / neutral / reversion / chaos).
Variance ratio (Lo-MacKinlay) — a second, short-window-reliable lens that confirms a real trend existed to exhaust (VR > 1 = trending, < 1 = mean-reverting, ≈ 1 = random walk), with a significance z-statistic.
Ornstein-Uhlenbeck half-life — quality gate: if the estimated mean-reversion half-life is longer than the evaluation horizon, the expected reversion is too slow to pay off in time, so the exhaustion call is rejected.
Implied-volatility (VIX) state — quality gate: exhaustion is more reliable when implied volatility is elevated but stable (fear present, not spiking). The gate blocks exhaustion during a volatility spike.
Divergence quality — grades each exhaustion on the price↔efficiency divergence at the extreme: the slope of the efficiency drop between successive same-side pivots, how developed the swing is, and whether volume waned into the extreme. Weak-divergence setups are filtered out.
Forward calibration — the scorekeeper. Each fired event is logged as a hypothesis and resolved a fixed number of bars later against an ATR-scaled move, then summarised as a realised hit-rate versus an unconditional base rate.
Take any single layer away and the remaining pipeline still describes the same one event — they are complementary measurements of a single hypothesis (a trend running out of efficiency), which is precisely why they belong together rather than as separate scripts. The regime, variance-ratio, OU and VIX layers never plot their own buy/sell calls; they only decide whether the efficiency-exhaustion event is trustworthy.
The part most scripts skip — forward calibration
Most indicators emit a score and never check whether that score was right. Here, every event is queued and resolved N bars later against moveATR × ATR, in R-multiples. The information table reports, per class (Exhaustion / Ignition):
n — resolved sample size
Hit% with a Wilson 95% interval (so you see how stable the rate is)
Base% — the unconditional same-horizon move rate (the honest benchmark)
Edge = Hit% − Base%, marked * when a z-test clears 95%
MFE / MAE in R (how far it ran for you vs against you)
a recency-weighted hit-rate and a regime-conditional hit-rate for the current regime
If Edge is not positive, the signal is not adding information over chance on your chart — and the script tells you so instead of hiding it.
How to use it
Ribbon = context. Don't fade a strong trend; stand aside in chaos.
Histogram rolling over + a marker = the trigger.
Verdict line = the plain-language call (e.g. "TREND · watch for exhaustion", "EXHAUSTION ↓ · fade the up-move (edge +12%*)", "CHAOS · stand aside"), with the calibrated edge appended when the live class is calibrated.
Chart View: Clean (default) shows only the decision elements; Full adds the slow-ER line, displacement %, all reference levels and the divergence glow for analysis.
Information Table: Compact (default) is the key-info panel — verdict, efficiency/displacement/regime, variance-ratio/OU/VIX, best calibrated edge. Pro adds the full per-class calibration table with confidence intervals, recency and regime-conditional rows.
Treat it as a context-and-confirmation overlay on your own process, not an autotrading signal. Paper-trade first and confirm the Edge column is positive on your symbol and timeframe before relying on a class.
Originality
The novelty is not any single formula — those are credited below — but the closed loop: a self-referential displacement percentile (no fixed multiplier), a regime engine and four independent quality gates that all condition one event, and a forward-calibration layer that scores that event against its own base rate with confidence intervals, recency weighting and regime conditioning. Everything is original Pine; no third-party script code is reused.
Inputs, data & markets
Source (group 1) sets the raw series the whole engine reads — change it to use any instrument in any market.
Defaults are tuned for NIFTY / BANKNIFTY; the VIX Symbol defaults to NSE:INDIAVIX. For other markets, change the Source, the ER horizons and the VIX symbol (e.g. CBOE:VIX). A missing VIX symbol auto-disables that gate.
Inputs are organised institutionally: Source & Efficiency · Regime & Variance-Ratio · Displacement · Events · Quality Gates · Calibration · Display · Theme · Exports. The table colour scheme adapts automatically to a light or dark chart background.
Non-repaint
Efficiency is read on confirmed closes, legs are taken from confirmed pivots, events fire on barstate.isconfirmed, and there are no dynamic-length ta.* calls. Forward statistics are in-sample, close-to-close, with no costs, slippage or stops — a study aid, not a backtest.
Concept credits (original Pine re-derivations)
Efficiency Ratio — Perry Kaufman
Variance-ratio test — Andrew Lo & Craig MacKinlay (1988)
ADX / Directional Movement — J. Welles Wilder
Self-exciting (Hawkes) intensity — Alan G. Hawkes (1971)
Mean-reversion half-life — Ornstein & Uhlenbeck process
Score confidence interval — Edwin B. Wilson (1927)
Dominant-cycle homodyne discriminator — John F. Ehlers
Disclaimer
For education and information only. Not financial advice and not a recommendation to buy or sell anything. Past performance does not guarantee future results. The forward statistics are in-sample and idealised (close-to-close, no costs/slippage/stops). Always do your own analysis and manage your own risk; paper-trade before risking real money. Indicator

Efficiency Divergence OscillatorEfficiency Divergence Oscillator
## Overview
The Efficiency Divergence Oscillator turns the **signed efficiency ratio** - net price displacement divided by the total path price actually travelled - into a standardized, bounded oscillator, and then looks for **divergence between price and the efficiency of its travel**. The idea it tests: when price makes a new extreme but reaches it on an increasingly choppy, inefficient path, the move is losing conviction.
It is a single-pane oscillator. It needs no external data and no volume. Every data input is user-configurable, so it runs on any symbol, asset class or timeframe, in any market and on any timeframe. Defaults target NSE NIFTY index futures on intraday charts.
## What it plots
- A z-scored **efficiency oscillator** (clean advance = up, clean decline = down, choppy travel = near zero), with a glow line and sigma-based overbought/oversold levels.
- **Extreme-zone bands** (default +/-3 sigma) with a gradient fill that deepens toward the edge.
- **Divergence lines and labels** on the oscillator - regular (reversal) and hidden (continuation), in two colors.
- **In-band reversal dots** where the oscillator turns inside an extreme zone.
- Optional **price-pane marks** at the confirmation bar (all generated by this one indicator).
- A **background-adaptive status dashboard** (oscillator value in sigma, zone, last divergence, last reversal, signed efficiency in %).
## Why these components are combined (mashup rationale)
This script combines a **derived measure**, a **normalization stage**, a **divergence engine** and a **reversal read**, because each answers a question the others cannot and none is useful here alone:
1. **Signed efficiency ratio (path quality).** Momentum tells you how FAR price moved; it does not tell you how DIRECTLY it got there. The signed efficiency ratio = (price - price ) / sum(|price - price |, len), a value in +/-1 that is positive for efficient up-moves and negative for efficient down-moves. It isolates path quality - a dimension a magnitude-only momentum oscillator cannot show.
2. **Standardization (rolling z-score).** efficiency differs in scale across instruments. The z-score expresses it in standard-deviation units, so "overbought/oversold" and the extreme bands mean the same thing on NIFTY, on a commodity future, or on a crypto instrument. Without this step the divergence thresholds would not transfer between symbols.
3. **Divergence engine.** The original payload is reading **price-versus-efficiency disagreement at confirmed pivots**. The engine pairs each new price pivot with the oscillator value, then requires: a genuine new price extreme; the measure failing to confirm it; a minimum oscillator gap scaled to the oscillator own stdev; the two pivots within a maximum bar distance; and optionally an overbought/oversold reading at the pivot. These gates make the combination produce signal rather than noise.
4. **Reversal read.** Independently, the engine flags oscillator turns that occur inside the extreme bands - a complementary exhaustion cue.
Together the components form one pipeline: **build the signal -> make it comparable (z-score) -> surface where price and that signal disagree (divergence) and where it exhausts (reversal).** Each is incomplete alone.
## How it works (method)
efficiency = (price - price ) / sum(abs(price - price ), len) over the efficiency window, a value in +/-1; this is standardized with a rolling z-score to the oscillator.
Regular and hidden divergence are detected from confirmed pivothigh/pivotlow pivots and filtered by the gates above; reversals are oscillator pivots that print inside the extreme bands. Pivots confirm a few bars after they occur, so a printed signal does not repaint. The confirmation lag equals the pivot length.
## How to use it
1. Add the indicator on any chart; no special data is required.
2. Read divergence as **context, not a trigger**: a bearish divergence (price higher high, efficiency lower high) says the advance is getting choppier; a bullish divergence says the decline is. Confirm with your own structure, levels and risk process.
3. Tune the **pivot length**, **max gap** and **min oscillator gap** to your timeframe; raise them for fewer, cleaner signals.
## Originality
This is an original implementation - not a efficiency line and not a generic divergence script, but the specific combination of efficiency, sigma-standardization that makes the read portable across markets, a multi-gate divergence engine (magnitude + distance + extreme-zone), hidden-divergence and in-band reversal detection, and a background-adaptive dashboard. The code is written from scratch; helper functions use only their arguments and built-ins.
## Credits
The Efficiency Ratio was introduced by **Perry J. Kaufman**. **Price/oscillator divergence** is a long-established, publicly documented technical-analysis technique. This script is not affiliated with, nor endorsed by, any third party.
## Notes / limitations
- Efficiency is a path-quality read, not a direction call; in strong clean trends it stays elevated without diverging.
- Divergence is descriptive context, never a guarantee of reversal.
- Confirmation lags each pivot by the pivot length.
## Disclaimer
Research and educational tool only. NOT financial advice and no guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script.
Indicator

BocchiTheTrader | Quantum Trend Matrix# BocchiTheTrader | Quantum Trend Matrix
## 🚀 OVERVIEW
In modern electronic markets, retail traders suffer from cognitive overload. Managing multiple charts, fragmented timeframes, and dozens of conflicting indicators often leads to analysis paralysis and execution delays.
The **Quantum Trend Matrix** by **BocchiTheTrader** solves this structural problem. It is an enterprise-grade, localized Heads-Up Display (HUD) that synthesizes a high-fidelity technical matrix directly onto your active trading workspace. By evaluating macro trend direction, multi-oscillator momentum, volume health, and volatility boundaries simultaneously, the QTM provides traders with an instantaneous snapshot of market confluence. It functions as a single, centralized source of truth for directional bias, asset strength, and execution validation.
---
## 📐 THE MATHEMATICAL & LOGICAL CORE
The dashboard works as a multi-indicator consensus engine, evaluating individual variables every single tick to update a structural confluence matrix:
* **Tri-Horizon Trend Architecture:** Evaluates directional health by processing price action relative to an optimized Simple Moving Average (SMA) across three distinct temporal planes: Macro-Weekly, Swing-Daily, and Intraday-Current.
* **Linear & Non-Linear Momentum Ensemble:**
* **MACD Line/Signal Cross:** Decodes classic directional velocity shifts.
* **Relative Strength Index (RSI-14):** Evaluates oversold/overbought thresholds based on a centralized 50-level mid-line axis.
* **Stochastic Oscillator (14, 3):** Measures the location of the close relative to the high-low range to catch rapid cyclical swing turns.
* **Gaussian Normalized Fisher Transform:** Applies an algebraic log transform to normalized RSI values, sharpening the turning points into crisp, highly responsive leading triggers.
* **Money Flow Index (MFI-14):** Combines price action with volume to determine institutional capital absorption or distribution.
* **Volatility & Structural Boundaries:**
* **Bollinger Bands (20, 2.0):** Isolates extreme price extensions. If price pierces the lower band, an exhaustion "Buy" state triggers; if it pierces the upper band, a "Sell" state triggers; otherwise, it remains balanced ("Neutral").
* **Trend Strength & Direction Balance (DMI/ADX):**
* **Directional Movement Index (DMI):** Identifies whether the positive ($+DI$) or negative ($-DI$) trend force is dominant.
* **Average Directional Index (ADX):** Quantifies the absolute strength of the move. Values below 25 trigger a "Weak" warning, while values above 25 confirm a true trending market.
* **Dynamic Exponential Ribbon (EMA 20/50):** Monitors the fast-to-slow exponential moving average cross to confirm immediate mechanical trend acceleration.
---
## 🚦 HOW TO TRADE WITH IT
### 🔹 Long-Side Execution Matrix (Confluence Buying)
1. **Macro Validation:** Ensure that the *Daily Trend* and *Current Trend* cells display **Bullish** (Mint Green).
2. **Momentum Alignment:** Look for a cluster of **Buy** signals across leading indicators (specifically *Fisher*, *MACD*, and *RSI*).
3. **Volatility Confirmation:** Verify that the *ADX* row indicates **Trend** ($>25$). This confirms that the bullish move has institutional momentum backing it.
4. **Entry Trigger:** Execute when the *EMA 20/50* row transitions to **Buy**.
### 🔸 Short-Side Execution Matrix (Confluence Shorting)
1. **Macro Validation:** Ensure that the *Daily Trend* and *Current Trend* cells display **Bearish** (Crimson Red).
2. **Momentum Alignment:** Look for a cluster of **Sell** signals across *MACD*, *Stoch*, *MFI*, and *RSI*.
3. **Volatility Confirmation:** If price breaks down past a structural level and *Bollinger* shifts out of neutral into an extreme state or *DMI* reads **Sell**, the downward expansion is confirmed.
4. **Entry Trigger:** Execute when the *EMA 20/50* transitions to **Sell**.
### 🛡️ Risk Management & Trailing Protocol
* **Invalidation Point:** If an established Long trade is running and more than three momentum cells (e.g., MACD, Stoch, Fisher) flip rapidly from **Buy** to **Sell**, it signals an impending distribution phase. Use this as an early warning indicator to tighten stop-losses or harvest partial profits before visual price rotation occurs.
---
## ⚠️ RISK DISCLAIMER
Financial market trading involves substantial risk of capital loss. Quantum Trend Matrix is engineered exclusively as a statistical and analytical workflow assistant. Past performance configurations do not dictate, guarantee, or imply future algorithmic outcomes. Always utilize strict capital allocation and risk mitigation frameworks. Indicator

Market Adaptive Trend [Interakktive]Market Adaptive Trend (MAT) is a diagnostic trend tool that re-tunes its own responsiveness to the live volatility regime — and shows you, in plain English, why it tightened or loosened.
Most "adaptive" trend tools hide their adaptation behind math you cannot audit. MAT does the opposite: it adapts AND it narrates. Every adjustment it makes is shown on the chart, in words, so you can see the reasoning rather than trust a black box.
This is a market-state diagnostic tool, not a signal generator.
█ THE CORE IDEA
A fixed-length moving average has one flaw: it responds the same way in calm markets and violent ones. In a clean trend it lags; in a chop it whipsaws. MAT addresses this by letting the live volatility regime govern how responsive the trend line is — the link most adaptive tools never expose.
MAT continuously measures relative volatility: current ATR divided by its own longer-run average. A reading near 1.00 means volatility is at this market's own baseline; above means more volatile than usual; below means calmer. That single ratio classifies the market into one of three regimes, and each regime changes how the line behaves.
█ THE THREE REGIMES
RIDING (calm) — Volatility below baseline. The line loosens and leans toward its slower estimate, so it rides a clean trend without being shaken out by minor noise.
TIGHTENING (balanced) — Volatility near baseline. The line sits in a balanced blend — neither chasing nor lagging — typical of coiling, pre-expansion conditions.
GUARDED (volatile / stretched) — Volatility above baseline. The line damps its response and becomes slow to flip, and candles tint amber as a caution that conditions are stretched and a flip here is lower-confidence.
█ HOW THE LINE IS BUILT
MAT blends a fast and a slow estimate of price. The blend weight is not fixed — it shifts with the regime above, scaled by an Adaptation Strength input (0 = a fixed blend, 1 = full regime governance). The blended target then drives the visible line through an error-feedback step, so the line moves toward its target proportionally rather than snapping. The calculation uses only confirmed historical data, contains no lookahead, and does not repaint.
█ THE HUD
A compact on-chart panel reports, in plain language:
- Trend — UP / DOWN
- Regime — RIDING / TIGHTENING / GUARDED, with a plain-English volatility descriptor (very calm → below normal → near normal → slightly elevated → high)
- Responsiveness — LOW / MED / HIGH (how reactive the line currently is)
- Read — a one-line summary of the current state
No raw scores are presented as the message — the panel is meant to be read at a glance.
█ HOW TRADERS USE MAT
MAT is designed to provide context, not entries. Common uses:
- Reading whether the current environment favours riding (RIDING) or caution (GUARDED)
- Avoiding low-confidence flips when the regime is GUARDED and conditions are stretched
- Using the regime read as a filter alongside your own entry method
- Framing trend direction with an honest sense of how much to trust it right now
█ SETTINGS OVERVIEW
Adaptive Baseline
- Source, Fast estimate length, Slow estimate length
- Adaptation Strength (how strongly the regime governs responsiveness)
Regime Governor
- Volatility baseline length, ATR length
- Calm threshold (below = RIDING), Volatile threshold (above = GUARDED)
Visual
- Adaptive line, Gradient fill, Edge glow, Color candles, Line width
HUD
- Show HUD, Position, Size
█ DISCLAIMER
This indicator is a market context and diagnostic tool only. It does not generate trade signals, entries, or exits. Past behaviour does not guarantee future price action. Always combine with independent analysis and proper risk management. Indicator

Volumetric Trend Ribbon Pro [ChartPrime]🔶 OVERVIEW
Volumetric Trend Ribbon Pro is a professional-grade trend-following overlay that synchronizes price action with volume-weighted volatility. Unlike standard moving averages that only track price, this indicator uses a Volume-Weighted Standard Deviation (VWSD) engine to create a dynamic "ribbon" that expands during high-conviction moves and contracts during market indecision.
The tool is designed to provide a comprehensive workspace for trend traders, featuring automated breakout targets, institutional volume spike detection, and a real-time analytics dashboard.
• Volume-Weighted Moving Average (VWMA) Core
• NEW: Adaptive Transparency (Volume-to-Average Ratio)
• NEW: Dynamic Breakout Targets (Volatility-Adjusted)
• Institutional Volume Spike Highlighting (Orange Candles)
• Floating "Trend & Longevity" Labels
• Integrated Status Dashboard (Trend Age & Vol Intensity)
• Customizable Themed Candle Plotting
🔶 CORE CONCEPT — VOLUMETRIC ADAPTABILITY
Standard ribbons often suffer from "lag" or "noise" during low-volume consolidation. VTR Pro solves this by integrating volume into every calculation:
• VWSD Expansion: The ribbon’s width is determined by volume-weighted volatility. When "Smart Money" enters the market, the ribbon widens, providing a clear visual of trend strength.
• Adaptive Transparency: The indicator’s visibility reacts to current volume. High-volume moves appear bold and opaque, while low-volume "chop" fades into the background, signaling a lack of institutional interest.
• Volume Spikes: Regardless of the current trend, the script identifies abnormal volume surges (1.5x average) and highlights the candles in Orange , marking potential exhaustion or ignition points.
🔶 DYNAMIC BREAKOUT TARGETS
The indicator features an automated target projection system that appears when price breaks out of the ribbon with high momentum.
Volatility-Based: Targets are not fixed percentages; they are calculated based on the current width of the ribbon (the market's recent volatility).
Adjustable Multiplier: Traders can fine-tune the "Target Distance" input to match their specific strategy (Scalping vs. Swing Trading).
Auto-Hide Logic: Target lines automatically clear once the trend weakens or the level is mitigated, keeping the chart clean and focused.
🔶 TREND DASHBOARD & FLOATING LABELS
To provide institutional-level data at a glance, VTR Pro includes two intelligent UI elements:
Floating Trend Label: Plotted directly at the end of the middle trend line, this label tracks the current "Longevity" of the move (number of bars in trend), allowing you to identify over-extended trends.
Status Dashboard: A top-right table that monitors:
- Trend Status: (Bullish / Bearish / Neutral)
- Trend Age: The exact duration of the current cycle.
- Vol Intensity: A real-time multiplier showing how much volume is flowing relative to the 40-bar average.
🔶 HOW TO USE
Trend Confirmation: Enter long when the ribbon turns Green and price holds above the upper edge. Confirm with a "Strong" momentum signal.
Spotting Exhaustion: Watch the Trend Age on the dashboard. If a trend has lasted 50+ bars without a contraction, look for Orange Volume Spikes as potential signs of blow-off tops or bottoms.
Managing Targets: Use the projected Target Lines as logical take-profit levels or areas to move your stop-loss to break-even.
Avoiding Chop: When the ribbon turns Blue (Neutral) and the transparency fades, the market is in equilibrium. This is a "No-Trade Zone" for trend followers.
🔶 CONCLUSION
Volumetric Trend Ribbon Pro transforms the traditional ribbon into a data-rich environment. By prioritizing volume intensity and providing automated targets, it removes the guesswork from trend-following and helps traders stay on the right side of institutional flow.
Indicator

Structure Break Chain (SBC) [SharpStrat]Structure Break Chain (SBC)
Every trader has been there. You're in a trade, the trend looks healthy, and then suddenly price flips on you. You had no warning. You held too long. The trend was already breaking down you just couldn't see it clearly enough.
That's exactly what Structure Break Chain was built to solve.
SBC is a market structure tracking tool that reads how price is actually moving swing by swing, break by break and builds a real-time picture of trend health. Not with a smoothed line or a lagging oscillator, but by watching the raw structure of the market, the sequence of higher highs and lower lows that every trend is made of.
What is a Break of Structure (BOS)?
In any uptrend, price makes a series of higher highs. Every time price closes above a previous swing high, that's a Break of Structure confirmation that the bull trend is still alive and continuing. In a downtrend, it's the opposite: price keeps breaking below previous swing lows.
SBC detects every single one of these breaks automatically and marks them on your chart with a labeled arrow green for bullish, red for bearish. No manual drawing. No guessing.
What is a CHoCH (Change of Character)?
A CHoCH fires when price breaks structure in the opposite direction to the current trend for the first time. In a bull trend, that means price has just broken below a prior swing low. That single event doesn't confirm a full reversal but it's the earliest possible warning that something has changed in the market's behavior.
Most indicators won't catch this until several bars later. SBC marks it the moment it happens, in yellow so it stands out from the regular BOS signals as shown in the image below.
The Chain Counter
Here's what makes SBC different from a standard structure indicator.
Every time a BOS happens in the same direction without interruption, the chain count goes up by 1. When a CHoCH happens, the chain resets to 1 and starts counting in the new direction.
A chain of 4 means price has broken structure 4 times in a row in the same direction. That's a mature, committed trend. A chain of 1 after a CHoCH means the new trend is unproven and fragile you should be cautious about entries.
A live label on the right edge of your chart shows the current chain count in real time as shown in image above. It updates every bar.
Break Quality Score
When price barely scrapes past a swing level by a few ticks on low momentum, that's a very different signal from a strong, high-volume candle closing well beyond the level.
SBC scores every break as STRONG, NORMAL, or WEAK based on two factors:
How far price closed beyond the broken level (relative to ATR)
How large and decisive the breaking candle's body was
STRONG breaks have brighter, more vivid label colors. WEAK breaks are dimmed and semi-transparent as shown in image below. This lets you visually filter the breaks that matter from the noise.
Failed BOS
Sometimes price breaks a level, you get excited, and then it immediately reverses back inside. That's a trap and it's one of the most common ways retail traders get hurt.
SBC watches every confirmed break for the next 1-3 bars (adjustable). If price closes back inside the broken level within that window, the indicator marks it as a FAILED break in purple as shown in image above. This is your earliest possible warning that the breakout wasn't real, often appearing few bars before the CHoCH confirms the reversal.
Using Failed BOS + CHoCH together gives you two layers of confirmation before you act on a potential trend change.
Pullback Entry Zones
After every confirmed BOS, SBC draws a semi-transparent box between the broken level and the previous swing reference as shown in image below. This is the area where price is most likely to pull back before continuing in the trend direction, the optimal entry zone.
The box extends forward by a user defined number of bars and disappears automatically when a new BOS or CHoCH occurs.
Multi-Timeframe Overlay
You can optionally enable a higher timeframe (HTF) structure overlay. When turned on, SBC also tracks BOS and CHoCH events from your chosen higher timeframe and plots them directly on your current chart as dimmed labels as shown in image above, so you always know what the bigger picture is doing.
Note: HTF labels are designed to appear only once per HTF bar, not on every sub-bar. So on a 15-minute chart with a 1-hour HTF, you'll see the HTF label appear once on the first 15-minute candle of that hour not repeated across all four candles.
The dashboard also shows whether your current timeframe trend and the HTF trend are aligned or in conflict. Trading a bull BOS on the 15-minute chart while the 1-hour is bearish is a generally riskier than when both are pointing in same direction.
The Dashboard Panel
A compact information table sits in the corner of your chart (position is adjustable). It shows everything at a glance without you having to read the price action:
Current trend direction (Bullish / Bearish / Neutral)
Live chain count
Quality of the last break (STRONG / NORMAL / WEAK)
HTF direction and alignment status
HTF chain count
Maximum chain ever recorded on this chart
Average chain length across all completed trends
Total BOS count
Total CHoCH count
The chain count in the table turns yellow when it reaches your milestone number (customizable in settings) a visual nudge that the trend is mature.
How to use SBC
Wait for a CHoCH, this is your signal that the previous trend is over and a new one may be starting. Don't trade it immediately.
Watch the first BOS in the new direction if it's STRONG quality, that's confirmation the new trend has real momentum behind it.
Look for a pullback into the entry zone, the green or red dashed box SBC draws is your optimal entry area.
Check the chain count, if you're entering at chain count 1 you're probably early. If you're entering at 6 or 7 the trend is probably mature and a reversal is likely so adjust your expectations accordingly.
Check HTF alignment, if both your timeframe and the higher timeframe are showing the same direction, the trade has more conviction behind it.
Watch for Failed BOS and CHoCH these are your exit warnings. A Failed BOS followed by a CHoCH is a reliable signal to close or tighten your stop.
Settings guide
Structure settings
Pivot Length - how many bars left and right are needed to confirm a swing high or low. Higher values = fewer but cleaner pivots.
BOS Confirmation - "Close" waits for a candle to close beyond the level (safer, recommended). "High/Low" triggers on the wick (faster but noisier).
Failed BOS Window - how many bars after a break to watch for failure.
Show Swing Lines - draws dashed horizontal lines at each detected pivot.
Show Pullback Entry Zones - draws the dashed box after each BOS.
Zone Extend Right - how far the zone box extends to the right in bars.
Shade Trend Background - adds a background color based on current trend direction.
Visual settings
Full color customization for Bull, Bear, CHoCH, Failed BOS, and Swing Lines.
Toggle quality labels, chain bubble, and dashboard panel on/off.
Choose dashboard position (Top Right / Top Left / Bottom Right / Bottom Left).
Adjust label size.
Multi-timeframe settings
Enable or disable HTF overlay.
Choose any HTF timeframe.
Adjust HTF label transparency.
Why this is better than basic Structure break indicators
Most structure indicators on PulseWire detect BOS and CHoCH but stop there. SBC adds three things:
A chain counter that tracks consecutive structural breaks turning raw signals into a measure of trend maturity and health over time.
A break quality scoring system that grades every break on two factors so you aren't chasing noise.
A Failed BOS detector that watches the confirmed break for the next few bars and warns you before the CHoCH even happens giving you a head start that most traders don't have.
Note - Works on all markets and timeframes. Stocks, forex, crypto, indices, futures etc, if it has candles SBC probably works on it. The pivot length and ATR based quality scoring adapt automatically to the volatility of whatever asset you apply it to. Indicator

Dual Log Regression Channels [BigBeluga]Dual Log Regression Channels is a highly advanced multi-timeframe mathematical modeling terminal engineered for PulseWire. It maps, projects, and blends two independent logarithmic regression channels directly onto your asset layout screen to deliver an institutional-grade perspective on trend structure, market cycles, and structural volume distributions.
By separating price discovery parameters into a long-term Macro Channel and an execution-focused Short Term Channel, this tool effectively resolves the classic trader conflict of assessing structural trend directions while looking for immediate micro execution setups. Rather than treating market space as flat, standard geometric lines, this engine runs an advanced curve-fitting algorithm over your data to follow the exponential nature of capital expansion and distribution.
🔵 INTUITIVE SYSTEM ARCHITECTURE & ENGINE FEATURES
1. Logarithmic Regression Curve Optimization
Non-Linear Structural Tracking: Standard linear regression struggles with volatile crypto or high-growth equity trends over massive lookback structures. This script continuously converts incoming data matrices into mathematical log-space, computes a best-fit ordinary least squares (OLS) linear progression, and converts the output back into exponential value curves.
Dual Horizons Convergence Layer: Tracks an extensive trend anchor block (defaulting to 300 bars) simultaneously with a highly responsive, high-velocity swing lookback matrix (defaulting to 50 bars). This exposes localized micro contractions occurring right at major macro boundary extremes.
Visual Deviation Spacing Bands: Channels automatically map out distinct volatility boundaries based on real-time Standard Deviation multipliers. This defines predictable mathematical risk corridors where asset expansions typically exhaust and snap back toward the median baseline.
2. Predictive Channel Extension & Real-Time Trend Direction Arrows
Dynamic Origin Trend Arrows: The engine processes a dedicated directional diagnostic framework at the precise historical start (origin node) of each lookback channel. It generates sharp, high-visibility glyph trend arrows ( ⇗ for structural uptrends and ⇘ for structural downtrends). These arrows offer an instant, real-time assessment of the mathematically calculated baseline slope, entirely bypassing visual guesswork when channels run relatively flat.
Forward-Projected Space Models: When enabled, both the Macro and Short-Term structural bands project forward into the future chart space blank zone (e.g., 50 bars ahead for Macro, 20 bars for Short-Term). This lets you visually identify intercept locations and major trend crossroads long before price action arrives.
3. Adaptive Embedded Channel Volume Profiles (VP)
Integrated Block Volume Binning Matrix: Moving beyond basic fixed or visible range volume profiles, this module segments and collects transacted volume profiles exclusively inside the exact coordinate boundaries of each respective channel.
Dynamic Coordinate-Aligned Shading Bars: The volume profile rows scale and project outward utilizing advanced polyline geometry arrays, maintaining structural alignment with the slope of the moving channel boundaries.
Point of Control (POC) Trailing Baselines: Automatically tracks and renders a crisp, high-visibility solid horizontal baseline ( POC Line ) marking the exact price bin location that attracted the highest volume concentration throughout that lookback phase.
4. Volumetric Delta Tracking Panels
Buy vs. Sell Volume Accumulation Blocks: Aggregates total execution volume during the lookback period, classifying volume based on bar polarity.
Net Order Flow Delta Percentages: Computes and prints the precise net mathematical buying/selling pressure delta inside the channel. This reveals quiet accumulation behavior or hidden distribution trends directly alongside your spatial boundary drawings.
🔵 SYSTEMATIC EXECUTION STRATEGIES & RISK INTERPRETATION
Confluence Zone Intercept Trading: Look for setups where the Short Term Channel’s outer standard deviation boundaries align directly with the Macro Channel's major structural lines. When a high-velocity micro asset trend exhausts itself at a long-term macro floor or ceiling, it marks a highly efficient, asymmetric inflection zone for trend continuation entries or macro reversals.
Volume Profile POC Mean Reversion Matrix: The volume profile POC lines show where massive institutional blocks shifted hands inside that channel's lifespan. If the market stretches thin near an upper outer boundary but net volumetric volume indicators begin shifting toward seller control, look for a swift mean-reversion move down toward the high-liquidity POC baseline node.
Trend Acceleration vs. Overextended Breakouts: When an asset forces a candle close completely outside the projected log channel boundaries, it flags an exceptional shift in trend velocity. If the Volume Delta percentage prints an explosive spike in that direction, it supports a trend acceleration play. If volume is thin, it warns you of a predatory, overextended fakeout structure that is likely to snap back into the central channel values.
🔵 INTERFACE CONFIGURATION AND PARAMETERS
Lookback & Deviation Tuning Blocks: Customize historical calculation boundaries and volatility widths separately for both trend layers to match any asset class or time frame preference.
Volume Profile Customization: Control the precise resolution of the volume profile by adjusting row count bins and max bar widths to match your specific layout.
Clean Workspace Overrides: Toggle visibility filters to hide median baselines, remove raw background asset lines, or completely customize color theme hex codes to fit cleanly within your setup without causing visual clutter.
Transform your charting environment from basic straight lines into an exponential, volume-weighted structural map with the Dual Log Regression Channels terminal. Indicator

Entropy VZO [Alpha Extract]A sophisticated volume-flow and market-information oscillator that combines pressure-weighted volume, statistical normalization, directional entropy, fractal efficiency, Gaussian smoothing, and signal-line analysis into one complete momentum framework. Entropy VZO is designed to measure whether bullish or bearish price movement is supported by meaningful volume while adapting its sensitivity to the quality and organization of current market structure.
Unlike a conventional oscillator displayed in a separate pane, Entropy VZO projects its momentum structure directly onto price using an ATR-scaled anchor. This provides a clear overlay of volume momentum, signal direction, histogram expansion, threshold zones, and dynamic pulse activity without separating the analysis from the underlying chart.
🔶 Pressure-Weighted Volume Flow Engine
Calculates directional volume using a blend of candle pressure and source-price direction. Candle pressure measures the relationship between the candle body and its full range, while source direction determines whether price is advancing or declining.
candlePressure = (close - open) / priceRange
closePressure = ta.change(src) > 0 ? 1.0 : ta.change(src) < 0 ? -1.0 : 0.0
signedPressure = clamp(candlePressure * 0.65 + closePressure * 0.35, -1.0, 1.0)
signedVolume = volume * signedPressure
volumeBase = math.max(ta.ema(volume, vzoLength), 1.0)
vzo = 100.0 * ta.ema(signedVolume, vzoLength) / volumeBase
This produces a more detailed estimate of bullish and bearish participation than assigning all volume according to candle direction alone.
🔶 Normalized VZO Framework
Standardizes the raw VZO against its recent average and standard deviation. This allows the indicator to evaluate current volume pressure relative to the instrument’s own recent behaviour.
Positive readings indicate stronger-than-normal bullish volume flow, while negative readings represent stronger bearish pressure. Larger absolute readings show that the current volume imbalance is becoming increasingly unusual relative to its recent history.
🔶 Directional Entropy Analysis
Measures how evenly upward and downward price changes are distributed across the selected lookback period.
Low entropy indicates that price direction is more ordered and consistent. High entropy indicates a less predictable environment where upward and downward movements are more evenly balanced.
This allows the indicator to give greater weight to volume signals occurring during organized directional movement and reduce their influence during noisy or indecisive conditions.
🔶 Fractal Efficiency Framework
Evaluates how efficiently price has travelled between the beginning and end of the selected lookback relative to the total path taken.
High efficiency indicates that price is moving directly with limited back-and-forth movement. Low efficiency indicates a more irregular path with greater noise and weaker directional structure.
🔶 Information-Weighted Momentum Engine
Combines directional entropy and fractal efficiency into a unified information-quality weight. This weight adjusts the normalized VZO according to how organized and efficient the current market environment is.
informationWeight = clamp((1.0 - entropy) * 0.55 + efficiency * 0.45, 0.05, 1.0)
spectralInput = vzoZ * sensitivity * (0.65 + informationWeight)
fisherCore = tanhSafe(spectralInput) * maxLevel
Volume pressure receives greater emphasis when price movement is both directional and efficient. Signals are moderated when market structure becomes noisy, balanced, or fragmented.
🔶 Bounded Nonlinear Transformation
Applies a protected nonlinear transformation to compress extreme readings into a stable visual range.
This prevents isolated volume spikes from overwhelming the indicator while preserving momentum direction and relative strength. The result is a bounded oscillator centered around zero.
🔶 Gaussian Signal Polishing
Uses custom Gaussian-weighted smoothing to reduce short-term noise while preserving recent momentum information.
Separate smoothing stages are applied to the main oscillator and histogram. Traders can adjust these settings to make the indicator more responsive or more selective depending on their market and timeframe.
🔶 Bullish, Bearish & Neutral Regimes
Classifies the market into three momentum conditions:
• Bullish when the oscillator is above its signal and above zero
• Bearish when the oscillator is below its signal and below zero
• Neutral when momentum direction and zero-line position are not fully aligned
This dual-confirmation structure helps distinguish established directional momentum from weaker signal-line movements.
🔶 ATR-Scaled Price Projection
Projects the oscillator directly onto the price chart using an EMA-based anchor and an ATR-adjusted visual range.
The projection automatically adapts to current volatility, allowing the indicator to maintain a consistent appearance across different assets, prices, and timeframes. The Visual Height setting controls how widely the oscillator is displayed around its price anchor.
🔶 Soft & Hard Momentum Zones
Displays configurable soft and hard momentum thresholds above and below the central price anchor.
Soft levels highlight developing momentum extremes, while hard levels identify stronger volume-flow displacement. These areas provide context for momentum intensity rather than acting as automatic reversal signals.
🔶 Dynamic Pulse Band
Displays a smoothed measure of absolute oscillator strength around the price anchor.
The pulse band expands as momentum intensity increases and contracts when momentum weakens. Its color follows the active regime, creating a visual representation of both directional bias and momentum amplitude.
🔶 Momentum Histogram
Measures the difference between the main oscillator and its signal line to show whether momentum is expanding or contracting.
Bright bullish readings indicate strengthening positive momentum, while faded bullish readings indicate that positive momentum is slowing. Bright bearish readings represent strengthening negative momentum, while faded bearish readings show bearish pressure losing force.
🔶 Signal Ribbon & Glow Architecture
Plots the main Entropy VZO line with a layered glow and an optional ribbon between the oscillator and signal line.
The ribbon changes color according to the active bullish, bearish, or neutral regime. This makes momentum alignment, crossovers, and transition periods easier to identify while maintaining chart readability.
🔶 Dynamic Candle Coloring
Optionally colors OHLC candles according to the current oscillator regime.
Bullish coloring appears when the oscillator is above both its signal and zero. Bearish coloring appears when it is below both references. Neutral coloring identifies mixed, transitional, or weakly confirmed conditions.
🔶 Real-Time Status Dashboard
Features a compact dashboard displaying the indicator’s most important information:
• Current bullish, bearish, or neutral regime
• Main oscillator value
• Normalized VZO Z-score
• Directional entropy percentage
• Fractal efficiency percentage
• Current volume relative to its EMA baseline
This provides an immediate overview of momentum direction, volume abnormality, market organization, directional efficiency, and participation strength.
🔶 Comprehensive Alert System
Includes alerts for the indicator’s primary momentum events:
• Entropy VZO Bull Swing
• Entropy VZO Bear Swing
• Entropy VZO Bull Trend
• Entropy VZO Bear Trend
Swing alerts trigger when the oscillator crosses its signal line. Trend alerts trigger when the oscillator crosses the zero level, allowing traders to monitor both early momentum shifts and broader directional transitions.
🔶 Why Choose Entropy VZO ?
Entropy VZO expands traditional volume-flow analysis by combining pressure-weighted volume, statistical normalization, directional entropy, and fractal efficiency within one adaptive momentum framework. Instead of treating every increase in volume equally, the system evaluates whether that participation is occurring inside an organized and efficient market environment.
The oscillator and signal line identify direction, the histogram measures momentum expansion, the pulse band displays intensity, and the soft and hard zones provide context for elevated readings. Its ATR-scaled projection keeps the complete framework connected directly to price, while the live dashboard provides fast insight into volume flow, entropy, efficiency, and the active regime.
Perfect for momentum traders, swing traders, trend-following traders, and systematic analysts who want a cleaner way to determine whether directional price movement is supported by meaningful and structurally efficient volume flow. Indicator

NORN WEAVE | THURISAZ# NORN WEAVE ᚦ THURISAZ
---
### Overview
NORN WEAVE ᚦ THURISAZ is the third version of the NORN WEAVE series, built on URUZ as its foundation.
The core logic is unchanged — EMA slope, Dow Theory swing structure, ADX trend confirmation. What changed is the entry filter. THURISAZ adds one question before every trade: *where are we standing on the daily chart?*
URUZ was built to survive. THURISAZ is built to choose. Bad entries don't just lose money — they consume time, margin, and mental bandwidth. The goal of this version is to stop entering trades that look right on the current timeframe but are wrong on the bigger picture.
The philosophy remains: survival first, profit second. THURISAZ adds a third principle — *don't enter where you shouldn't be standing.*
---
### What's New: Daily Fibonacci Filter
THURISAZ introduces a daily timeframe Fibonacci filter as a structural context layer.
When the current timeframe trend and the daily trend align, the strategy behaves exactly like URUZ — no additional friction.
When they diverge, THURISAZ evaluates *where* price sits within the daily swing range using Fibonacci retracement levels (0.382 and 0.618):
- **Mid zone (0.382–0.618)** — Price is in the middle of the daily range. This is the "landing zone": the most likely area for a pullback to stall and reverse, not complete. Entries are blocked.
- **Shallow zone (below 0.382)** — The pullback is still early. Entry is allowed, but TP1 is adjusted to the 0.382 level rather than the standard ATR-based target. Partial profit is taken before the natural resistance zone.
- **Deep zone (above 0.618)** — Price has retraced significantly. Potential reversal territory. Entry is allowed with standard targets.
The daily swing detection period is independently configurable from the current timeframe's Focus Level, giving finer control over what constitutes a "daily swing."
---
### Entry Conditions
**Long:** EMA rising AND Dow Theory trend up AND ADX above threshold AND Daily Fibo zone allows AND Footprint Delta bullish (if filter enabled)
**Short:** EMA falling AND Dow Theory trend down AND ADX above threshold AND Daily Fibo zone allows AND Footprint Delta bearish (if filter enabled)
---
### Exit Conditions
- TP1 — ATR × Factor × 1 → closes 30% (or Fibo 0.382 if shallow counter-trend entry)
- TP2 — ATR × Factor × 2 → closes another 30%
- TP3 — ATR × Factor × 3 → closes a further 30%
- Stop Loss — fixed % from entry → closes full position
- Break Even Stop — once floating profit reaches the BE trigger %, stop moves to entry price and closes on pullback
- Trend Reversal — when Dow Theory swing flips → closes full position
---
### Focus Level & Auto Calibration
Unchanged from URUZ. Focus Level is the primary knob — adjust it first when applying to a new symbol or timeframe.
Auto Calibration computes ADX threshold, ATR factor, and Stop Loss from the chart's own volatility data. When enabled, no manual tuning is required.
---
### Break Even Stop
Unchanged from URUZ. One parameter: how far price must move from entry before the stop activates. Stop is always placed at entry price.
---
### Footprint Delta Filter *(Premium plan required)*
Unchanged from URUZ. Uses BTC or ETH footprint delta as a directional confirmation filter. Blocks entries when order flow contradicts the trade direction.
---
### Parameters
- **Focus Level** (default 13) — Main knob. Controls swing detection and EMA scaling.
- **EMA Scale Ratio** (default 5) — EMA length = Focus Level × this value.
- **Daily Swing Length** (default 10) — Swing detection period for the daily timeframe. Independent from Focus Level.
- **Show Daily Fibo Zone** (default ON) — Displays the 0.382 and 0.618 levels on the chart for visual reference.
- **Auto Calibration** (default ON) — Computes ADX threshold, ATR factor, and SL automatically.
- **BE Trigger %** (default 5.5%) — How far price must move before the BE stop activates.
- **ATR Factor** — Manual mode only. Default 3.8.
- **Stop Loss %** — Manual mode only. Default -10.0%.
- **ADX Threshold** — Manual mode only. Default 20.5.
- **Footprint SMA Period** (default 21) — Smoothing period for delta signal.
---
### On Overfitting
One of the design principles of the NORN WEAVE series has been to minimize the number of configurable parameters. More parameters means more room to fit historical data — and less reason to trust that the results will hold going forward.
THURISAZ adds one new parameter: Daily Swing Length. That's it.
The Fibonacci levels themselves (0.382 and 0.618) are not parameters — they are fixed, widely recognized structural levels used by traders across markets and timeframes. They were not chosen by optimizing against backtest data.
The Daily Fibonacci Filter was validated across six symbols (SOL, DOGE, ETH, SUI, NEAR, PEPE). Five of the six showed improvement in profit factor and drawdown. The one exception — PEPE — deteriorated, which is the expected behavior: PEPE's explosive, non-structural price action doesn't respect daily swing context the way trend-following instruments do. A filter that improves everything uniformly would be suspicious. This result is not.
The filter works because the idea behind it is sound, not because it was tuned to work.
---
### Visual Guide
- **EMA line** — 3-layer glow. Teal when rising, red when falling.
- **Dow Theory zones** — gradient fill from current swing level to current price.
- **Daily Fibo lines** — gold lines at 0.382 and 0.618 of the daily swing. Shaded zone between them marks where entries are blocked.
- **TP lines** — semi-transparent. TP1 faintest, TP3 most visible.
- **BE Stop line** — gold, appears only when active.
- **Gray background** — ADX below threshold. No entries.
- **Orange background** — Footprint Delta Filter blocking entry, or Daily Fibo mid zone active.
- **Status table** — real-time display of all conditions. Japanese/English toggle included. Daily Fibo status shown as: Same Dir / Mid Zone (blocked) / Shallow (TP adjusted) / Deep (reversal watch).
---
---
### 概要
NORN WEAVE ᚦ THURISAZ は、URUZを土台とした NORN WEAVE シリーズ第3バージョンです。
コアロジックは変わっていません——EMAの傾き・ダウ理論のスイング構造・ADXトレンド確認。変わったのはエントリーフィルターです。THURISAZは、すべてのトレードの前に一つの問いを加えます。*日足でみたとき、今どこに立っているのか?*
URUZは「生き残る」ために設計されました。THURISAZは「選ぶ」ために設計されています。悪いエントリーは資金を失うだけでなく、時間・証拠金・集中力を消費します。このバージョンの目標は、現在足ではシグナルが正しく見えても、大きな地形では立ってはいけない場所へのエントリーを止めることです。
哲学は変わっていません。まず生き残る、利益はその次。THURISAZは三つ目の原則を加えます——*立つべきでない場所には立たない。*
---
### 追加機能:日足フィボフィルター
THURISAZは、相場の地形を把握するための「日足フィボナッチフィルター」を新たに導入しました。
現在足のトレンドと日足のトレンドが同じ方向の場合、ストラテジーはURUZとまったく同じ挙動をします——追加の制約はありません。
方向が逆の場合、THURISAZはフィボナッチリトレースメント水準(0.382・0.618)を使い、日足スイングのどの位置に価格があるかを評価します。
- **中間ゾーン(0.382〜0.618)** — 価格が日足レンジの真ん中にある状態。「踊り場」と呼ぶべき位置で、押し目・戻しが途中で止まって反転する可能性が最も高い。エントリーをブロックします。
- **浅いゾーン(0.382以下)** — 押し目・戻しがまだ浅い段階。エントリーは許可しますが、TP1を通常のATRベースから日足フィボ0.382水準に調整します。自然な抵抗ゾーンの手前で部分利確します。
- **深いゾーン(0.618以上)** — 大きく押し込まれた位置。反転の可能性がある水準として通常通りエントリーします。
日足のスイング検出期間は現在足のフォーカスレベルとは独立して設定できます。
---
### エントリー条件
**ロング:** EMA上向き AND ダウ理論上昇 AND ADXしきい値以上 AND 日足フィボゾーン許可 AND フットプリントデルタ買い優勢(フィルター有効時)
**ショート:** EMA下向き AND ダウ理論下降 AND ADXしきい値以上 AND 日足フィボゾーン許可 AND フットプリントデルタ売り優勢(フィルター有効時)
---
### イグジット条件
- TP1 — ATR×倍率×1 → 30%決済(逆張り・浅いゾーン時はフィボ0.382水準)
- TP2 — ATR×倍率×2 → さらに30%決済
- TP3 — ATR×倍率×3 → さらに30%決済
- ストップロス — エントリーから設定%に達したら全決済
- ブレークイーブンストップ — 含み益がBE発動しきい値%に達したらストップが建値に移動。価格が戻ったら全決済
- トレンド反転 — ダウ理論スイングが逆転した時点で全決済
---
### フォーカスレベルとオートキャリブレーション
URUZから変更なし。フォーカスレベルが主軸ノブです。新しい銘柄・時間足に適用するときはここを最初に調整してください。
オートキャリブレーションをONにすると、ADXしきい値・ATR倍率・SLがチャートのボラティリティデータから自動算出されます。
---
### ブレークイーブンストップ
URUZから変更なし。設定項目は一つ——「何%動いたら発動するか」だけ。ストップ位置は常に建値です。
---
### フットプリント・デルタフィルター *(Premiumプラン以上が必要)*
URUZから変更なし。BTCまたはETHのフットプリントデルタを方向性確認フィルターとして使用します。
---
### パラメーター
- **フォーカスレベル**(デフォルト13)— 主軸ノブ。スイング検出・EMAスケールを制御。
- **EMAスケール倍率**(デフォルト5)— EMA期間 = フォーカスレベル × この値。
- **日足スイング検出期間**(デフォルト10)— 日足フィボ計算に使うスイング検出期間。フォーカスレベルとは独立。
- **日足フィボゾーン表示**(デフォルトON)— 0.382・0.618ラインをチャートに表示。
- **オートキャリブレーション**(デフォルトON)— ADXしきい値・ATR倍率・SLを自動算出。
- **BE発動しきい値%**(デフォルト5.5%)— エントリーからこの%動いたらBEストップが発動。
- **ATR倍率**(手動)— オートキャリブレーションOFF時に有効。デフォルト3.8。
- **損切り%**(手動)— オートキャリブレーションOFF時に有効。デフォルト-10.0%。
- **ADXしきい値**(手動)— オートキャリブレーションOFF時に有効。デフォルト20.5。
- **フットプリントSMA期間**(デフォルト21)— デルタシグナルの平滑化期間。
---
### 過剰最適化について
NORN WEAVE シリーズの設計方針の一つは、パラメーター数をできる限り減らすことでした。パラメーターが増えるほど過去データへの過剰適合が起きやすくなり、将来の結果を信頼する根拠が薄れるからです。
THURISAZで追加したパラメーターは「日足スイング検出期間」の一つだけです。
フィボナッチ水準(0.382・0.618)自体はパラメーターではありません——バックテストデータを最適化して選んだ値ではなく、多くのトレーダーが長年にわたって参照してきた普遍的な構造水準です。
日足フィボフィルターは6銘柄(SOL・DOGE・ETH・SUI・NEAR・PEPE)で検証しました。そのうち5銘柄でPFとDDが改善しました。唯一悪化したのはPEPEですが、これは想定内の結果です——PEPEの急騰急落型の値動きは日足スイング構造を参照するロジックとそもそも相性が悪い。すべての銘柄で一様に改善するフィルターの方が、むしろ過剰最適化を疑うべきです。
このフィルターが機能するのは、チューニングの結果ではなく、背後にある考え方が正しいからだと考えています。
---
### チャートの見方
- **EMAライン** — 3層グロー効果。上向きはティール、下向きはレッド。
- **ダウ理論ゾーン** — 現在のスイングレベルから現在価格へのグラデーション。
- **日足フィボライン** — 日足スイングの0.382・0.618をゴールドラインで表示。その間のシェードが「踊り場ゾーン(エントリーブロック)」。
- **TPライン** — 半透明。TP1が最も薄く、TP3が最も濃い。
- **BEストップライン** — ゴールド。発動中のみ表示。
- **グレー背景** — ADXがしきい値以下。エントリーなし。
- **オレンジ背景** — フットプリントデルタフィルターがブロック中、または日足フィボ踊り場ゾーンが有効。
- **ステータステーブル** — 全条件・パラメーター値をリアルタイム表示。日英切り替え対応。日足フィボの状態は「同方向 / 踊り場(ブロック)/ 浅い(TP調整)/ 深い(反転狙い)」で表示。 Strategy
