FVG Sniper [JOAT]═══ FVG SNIPER ═══
A complete Fair Value Gap engine that finds price imbalances, grades their quality, tracks how they fill, mitigate and invert, and then paints a full trade blueprint the moment a clean setup fires. One gap is spotlighted as the strongest, and every signal arrives with entry, three targets, a stop, and colored risk/reward zones — no arrows, no clutter.
▎ WHAT IT DOES
FVG Sniper detects three-candle fair value gaps (imbalances), scores each one from 0–10, and monitors its life cycle: how much of the gap has been filled, whether it has been mitigated (wick-tapped through), and whether price has closed fully through it to flip its role into an Inverted FVG (IFVG) . When a graded gap produces a rejection or an IFVG flip that agrees with the higher-timeframe bias, it draws a structured trade plan and reports the whole picture in a dashboard.
▎ HOW IT WORKS
• Gap detection — a bullish gap forms when the current low sits above the high from two bars back; a bearish gap forms when the current high sits below the low from two bars back.
• Quality filters — each candidate must clear a minimum gap size (as a multiple of ATR ) and a minimum displacement body ratio on the impulse candle, so tiny or weak imbalances are ignored.
• Grade (0–10) — blends gap size, the displacement range of the middle candle, and relative volume into a single score. Only gaps at or above your minimum grade may fire a signal.
• Fill & mitigation — the engine tracks the running extreme inside each gap to compute a live fill percentage, and marks a gap mitigated once a wick fully traverses it.
• Inversion (IFVG) — when price closes fully through a gap, its role flips; the box restyles to a dashed amber accent and the flip is logged.
• Signals — two sources you can mix or isolate: Rejection (price retraces into a live gap and reacts back out with a directional close) and IFVG Flip (a mitigated gap is closed through, confirming continuation).
• HTF bias filter — an optional higher-timeframe EMA bias must agree with the signal direction before it is allowed.
• Trade model — on a fresh signal it sets entry at close, a stop either gap-protected (just beyond the triggering gap boundary) or ATR-based, with risk clamped between a floor and a cap. Targets TP1/TP2/TP3 are placed at your chosen R multiples.
• Non-repainting — all detection, scoring and signals evaluate on confirmed (closed) bars only, and the HTF request uses no lookahead.
▎ HOW TO USE IT
• Trade in the direction of the BUY / SELL pill. The stars and score on the pill show the grade of the gap that triggered it.
• The entry line (chrome), dashed stop , and TP1/TP2/TP3 lines map the plan directly on the chart; level labels on the right print exact prices and R values.
• The green zone is the target/reward area from entry to TP3; the red zone is the risk area between entry and stop — a fast visual read of the trade's R:R.
• A single ★ spotlight tags only the strongest active gap, so you always know the best imbalance in view.
• Use live gaps as decision zones: watch the fill % of the nearest gap, and treat an IFVG flip as a shift in short-term control.
• When a trade closes, a result label prints the outcome (TP hit, stop, or exit at R) so completed setups stay readable.
• Combine with your own structure, session and news context — the gap engine locates the where , you confirm the when .
▎ KEY SETTINGS
• Engine — enable bullish/bearish detection, choose the signal source (Rejection, IFVG Flip, or both), and cap how many gaps stay visible plus their lifetime and box extension.
• Filters — ATR length, minimum gap size, minimum displacement body ratio, minimum grade, the HTF bias filter (timeframe + EMA length), and whether a directional rejection close is required.
• Trade Model — stop basis (Gap-Protected vs ATR), stop buffer/distance, risk floor and cap, TP1–TP3 in R, max trade duration, zone projection, and how many completed trades to keep.
• Visuals — toggle gap boxes, midline, hide-mitigated declutter, grade spotlight, IFVG styling, signal pills, zone boxes, lines, level and result labels, zone-reader candle coloring, optional VWAP + σ bands, and all colors/transparency/sizes.
• Dashboard — show/hide, position, text size, and dark or light panel.
▎ DASHBOARD
The on-chart panel reports: HTF bias, count of active bullish and bearish gaps, the nearest gap price and its fill %, the strongest gap's star grade, the last IFVG flip (with bar age), the active signal, any live trade with its entry, and running totals of bullish / bearish / inverted gaps detected.
▎ ALERTS
• BUY signal
• SELL signal
• Bullish IFVG Flip (inversion up)
• Bearish IFVG Flip (inversion down)
▎ NOTES
• Works on all timeframes and all assets — indices, forex, crypto, stocks, futures.
• Signals and drawings are computed on closed bars, so they do not repaint after the bar confirms.
• Object caps and hide-mitigated / declutter toggles keep the chart clean even on long histories.
• Any on-chart result labels reflect historical signals only and are illustrative, not a performance guarantee.
For research and education only. This is not financial advice. No indicator can predict the future, and past behavior does not guarantee future results — always manage your own risk.
Made with passion by JackOfAllTrades ⚡
Indicator

Renaissance Mean Reversion [JOAT]RENAISSANCE MEAN REVERSION
A tribute to the Medallion-style statistical-arbitrage approach: do not trade price — trade the spread between price and its smoothed expectation , measure how reliably that spread mean-reverts using an AR(1) half-life regression , and only fire signals when the half-life is fast enough to be tradeable. The result is a discipline-enforcing engine that says no more often than yes : it refuses to take a reversion trade until the spread shows it actually reverts.
The synthetic spread
The script builds a synthetic pair from two views of the same instrument:
Leg 1 — current price (configurable source).
Leg 2 — long EMA of price (default 50-bar; configurable).
Spread = price − long EMA (or ln(price) − ln(EMA) when log-spread mode is on, removing scale).
The spread is then Z-scored over a configurable lookback (default 100 bars) to produce a stationary stationary signal that says: "how many standard deviations is the spread from its own mean right now?". This is the textbook stat-arb construction, single-leg version.
Half-life regression — the gate
This is what makes the script institutional rather than retail. Reversion is meaningless if the spread does not actually revert. The script fits an AR(1) regression over a configurable window (default 120 bars):
Δspread_t = α + β · spread_{t−1} + ε_t
The half-life of mean reversion is then:
HL = −ln(2) / ln(1 + β)
When β is negative and close to zero, HL is short — the spread reverts quickly. When β approaches −1, HL is huge — the spread barely reverts. When β is positive, the spread is anti-mean-reverting (trending) and the script will refuse to trade.
A configurable Max Half-Life (default 20 bars) gates signals — entries only fire when HL is below this threshold. A configurable Min Half-Life (default 0.5) floors the estimate to avoid degenerate near-zero values that would otherwise produce explosive signals.
This is the headline filter. Roughly 50–70% of bars on most instruments fail it — which is the point. You only trade when the spread has earned the right.
Entry / Exit logic
R-LONG — fires when Z < −entryZ (default −2.0) AND HL is below the max threshold AND the re-entry cooldown has elapsed. Spread is stretched too far below, will revert.
R-SHORT — fires when Z > +entryZ AND HL is below the max threshold AND cooldown elapsed.
R-EXIT — fires when |Z| drops below exitZ (default 0.25) OR when Max Hold Bars (default 40) has been reached, whichever comes first.
A configurable re-entry cooldown (default 3 bars) prevents immediate re-firing on the same side.
Visual system — minimal mono institutional
The aesthetic is intentionally austere — Renaissance's research-paper minimalism. Pure monochrome:
Z guides on right side of chart — small text labels showing current Z, HL, and tradeable status.
R-LONG / R-SHORT / R-EXIT labels — clean text tags on entry and exit bars.
Half-Life overlay label — current HL value displayed near the live close.
Shaded ribbon between price and slow EMA (configurable transparency).
Trade entry/exit shapes — small markers at signal bars.
Single-hue tradeable-regime tint (off by default) — subtle bgcolor when HL is fast AND Z is stretched.
A locked Minimal Mono palette: white bull / gray bear / pure-black background. No accent colours. The chart looks like a quant research paper. Intentional.
Dashboard
Monospaced table positionable to any of eight corners. Surfaces:
Current spread value and Z score.
Current half-life (in bars) with tradeable / non-tradeable flag.
AR(1) β coefficient (the regression's directional read).
Z thresholds in use.
Last signal direction with bars-ago.
Max-hold bars remaining (when in a position).
Rolling backtest tracker
The script tracks the last N closed reversion trades (configurable, default 200) and surfaces:
Total trades, wins, losses.
Win rate.
Average bars-to-exit.
Average Z magnitude at entry.
Hit-rate by side (R-LONG vs R-SHORT).
This is the script's own performance audit — you see whether the engine is finding genuine reversion or whether the current regime is breaking it.
Alerts
Three alert conditions, each independently controllable:
Reversion Entry (R-LONG or R-SHORT)
Reversion Exit (R-EXIT)
Half-Life crosses Max Half-Life (regime change — reversion is becoming unreliable)
How to read it
Three reads, in order of conviction:
R-LONG / R-SHORT with very fast HL (e.g. HL = 4 bars on a 1H chart) — the script's intended high-conviction setup. The spread is stretched, the math says it will revert quickly, the chart agrees. This is the institutional setup.
Half-life crossing above max (alert) — regime warning. The instrument is shifting from mean-reverting to trending. Any open R-positions should be re-evaluated; new R-entries should be paused until HL re-tightens.
Sustained R-EXIT triggers from time-stop (max-hold) rather than from Z returning to neutral — the script is exiting because the trade ran out of time, not because the thesis played out. Recurring time-stop exits mean the current parameters do not fit the instrument.
The rolling backtest win-rate is your auditor. When it climbs, the engine is finding edge. When it grinds flat or declines, the regime has changed and the parameters need adjustment.
Suggested settings
Defaults (long EMA 50, Z lookback 100, regression window 120, max HL 20 bars, entry Z 2.0, exit Z 0.25) are tuned for 1H–4H on liquid markets where mean reversion is statistically meaningful. For lower timeframes drop everything proportionally (long EMA 25, Z 50, regression 60). For HTF raise everything (long EMA 100, Z 200, regression 200). The max HL is the most sensitive parameter — narrow it (10–15) for high-conviction-only filtering; widen it (25–30) for more frequent signals.
Originality / what's reused
The synthetic-pair Z-score construction is textbook stat-arb. The AR(1) half-life regression is published quantitative finance — the Ornstein–Uhlenbeck-process speed-of-reversion estimator. The implementation here — the dual-leg synthetic spread with optional log construction, the rolling Z-normalisation pipeline, the AR(1) regression with HL formula and min/max-HL gating, the entry/exit state machine with cooldown and max-hold, the rolling N-trade backtest tracker, and the minimal-mono institutional aesthetic — is JOAT-original. No third-party code reused. The script is a tribute to the Medallion-style approach, not a direct replication of any proprietary Renaissance Technologies code.
Limitations
The single-leg "synthetic pair" (price vs its own EMA) is a degenerate stat-arb construction by design — true stat-arb uses two genuinely co-integrated instruments. Pine's per-script symbol limitation makes a two-instrument cointegration construction impractical for a standalone indicator; this script captures the methodology of stat-arb (spread + Z + HL gate) on the single-instrument case. The HL estimate is statistical and needs the regression window populated; early bars give a warm-up read.
—
-made with passion by jackofalltrades
Indicator

Volatility Reversion Bands Pro [JOAT]VOLATILITY REVERSION BANDS PRO
A two-layer reversion envelope: inner Bollinger band for the normal volatility envelope, outer ATR-extended band for the extreme envelope. Signals only fire when price has reached the outer ring — the inner band is context, the outer band is the trigger. The result is a clean mean-reversion engine that respects the difference between "stretched" and "actually stretched".
Two envelopes, one principle
Inner band — classic Bollinger: basis (SMA or EMA) ± stdev × multiplier. The familiar 20-period, 2-sigma defaults are preserved.
Outer reversion band — the outer envelope extends inner band ± ATR × multiplier . This is the band that triggers signals. Setting the ATR multiplier high makes signals rarer but deeper; setting it low makes them frequent and shallower.
Reversion bands using stdev alone collapse in low-volatility regimes (too many false signals) and explode in high-volatility regimes (signals come too late). The ATR extension on top of stdev fixes both: ATR adds a constant-floor protection in quiet markets and scales the outer band proportionally in loud ones.
Strong vs weak signals
Two signal tiers from a single channel-ratio read (close position within the outer band, normalised 0–1):
Strong signals — fire on the outer band itself (ratio ≤ 0 or ≥ 1). The high-conviction reversion read.
Weak signals — fire when ratio reaches a configurable near-band threshold (default 0.10 / 0.90). The "approaching outer band" read — useful for traders who want earlier hints. Easily disabled.
A signal cooldown suppresses same-side repetition; an exhaustion arrow prints when N consecutive bars (default 3) all live in the outer-band zone — a configurable escalating-glyph string ("^", "^^", "^^^"…) makes the run length visible at a glance.
Volatility regime classification
Independent of signals, the script classifies the current volatility regime by comparing current stdev to its own rolling average over a long lookback (default 100 bars):
Low regime — stdev / avgStdev below the low threshold (default 1.0×). Reversion is more reliable here.
High regime — above the high threshold (default 2.0×). Reversion is less reliable here; trends become dominant.
Normal regime — in between. Default mode.
Background tinting (toggleable, transparency-controlled) paints the chart by regime so the trader can see at a glance whether the current environment is suitable for reversion. This is the "do not fight the tape" filter — when the background is hot, every reversion signal is lower-conviction by definition.
Visual system
Bar gradient — bars are coloured by their position-in-band ratio (bull → mid → bear via plasma palette). At a glance you can see where price is sitting in the channel without reading the value.
Inner band fill — toggleable shoulder fill between BB and outer reversal bands with configurable transparency.
Inner BB lines and basis line are each independently toggleable for traders who want a minimalist or full envelope view.
Signal label style — Glyph (compact), Text (verbose), or Both.
A locked Plasma palette (yellow bull, magenta bear, violet mid) on a deep-void background gives the chart a distinctive look without competing with price action.
Dashboard
Monospaced table, positionable to any of nine corners, with togglable legend footer. Rows surface current basis, inner band values, outer reversion band values, channel ratio %, stdev / avgStdev ratio, regime label, last signal direction with age, and an exhaustion run counter.
Alerts
Four alert conditions, each independently controllable:
Strong Long / Short (outer band touch reversion)
Weak Long / Short (near-band threshold)
Vol Regime Change
Exhaustion Arrow (consecutive bars in outer-band zone)
How to read it
Two reads, in order of conviction:
Strong signal in a Low or Normal regime — the script's intended sweet spot. The outer band has been touched, price is statistically far from its mean, and the volatility environment supports the idea of mean-reversion.
Exhaustion arrow — when 3+ bars sit in the outer band, you usually have either a genuine breakout (the bands themselves will start to expand) or an exhaustion (the next reversal candle will be the signal). Either way, the next move is meaningful.
In a High regime, treat strong signals as cautionary at best — the bars are coloured by ratio for a reason; the gradient will tell you when one side is dominating.
Suggested settings
Defaults (length 20, stdev mult 2.0, ATR mult 1.5) are tuned to 1H–4H on liquid markets — the classical Bollinger settings plus a 1.5-ATR outer cushion. For 5m–15m, drop length to 14 and ATR multiplier to 1.0. For daily and above, raise length to 50 and ATR multiplier to 2.0. The regime thresholds (low 1.0×, high 2.0× of the long-run stdev average) are conservative — tighten the bands if your instrument is unusually quiet.
Originality / what's reused
Bollinger Bands and ATR are public-domain primitives. The implementation — the outer-band = inner-band ± ATR construction, the channel-ratio bar gradient, the regime classifier with auto-tinted background, the exhaustion-arrow consecutive-bar run logic, the weak/strong signal tiering, and the dashboard's monospaced regime-aware layout — is JOAT-original and tuned together. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. Section-headed source, tooltips on every input, helper functions documented inline. The band engine, the regime classifier, the exhaustion logic, and the dashboard are independent modules — fork or extend any single one without reading the whole file.
Limitations
Reversion bands are a counter-trend tool by construction. In sustained one-sided moves the outer band will be repeatedly touched without producing a profitable reversion — the High regime tint and the exhaustion-arrow run logic both exist to warn you when you are in this state. Signals are confirmed on bar close (non-repainting), so an intra-bar wick into the outer band that gets reabsorbed will not fire.
—
-made with passion by jackofalltrades
Indicator

Kalman Trend Filter [JOAT]Kalman Trend Filter
Introduction
Kalman Trend Filter is an open-source trend detection indicator that applies a two-state Kalman filter to price, tracking both the filtered price level and its velocity simultaneously. Unlike exponential moving averages — which apply a fixed exponential decay to past data — the Kalman filter dynamically adjusts its responsiveness based on the ratio of process noise to measurement noise. When price is moving consistently in one direction, the filter trusts new measurements more heavily. When price is noisy, it trusts its own model more heavily.
The practical result is a trend line that responds faster than an equivalent EMA during genuine trends while remaining smoother during chop. The velocity state is the direct indicator of trend direction and strength — it is what drives signal generation and candle coloring.
Core Concepts
1. Two-State Kalman Filter
The filter tracks two quantities: price (position state) and the rate at which price is changing (velocity state). The prediction step projects both states forward using simple kinematic equations. The correction step updates them based on how much the current close deviates from prediction:
// Prediction
float xPred = xEst + vEst
float pPred = pEst + qNoise
// Kalman gain
float kGain = pPred / (pPred + rNoise)
// Correction
float xEst = xPred + kGain * (close - xPred)
float vEst = vEst + kGain * (close - xPred)
The process noise (qNoise) and measurement noise (rNoise) parameters control how much the filter trusts its own momentum model versus new price data.
2. Velocity as Trend Proxy
The velocity state is the most analytically useful output. Positive velocity means the filtered price is accelerating upward; negative means downward. The magnitude of velocity indicates trend strength. Velocity crossing zero is a higher-quality trend reversal signal than a moving average crossover because it reflects the momentum of the filtered series, not the level.
3. Gradient Candle Coloring
Candles are painted using a two-sided gradient driven by the velocity state. Strongly positive velocity produces bright cyan candles; strongly negative produces bright magenta. Near-zero velocity transitions to neutral. The gradient intensity scales with velocity magnitude rather than applying a binary color switch.
4. Velocity Oscillator
The velocity state is plotted as a separate sub-indicator below the main chart, providing a visual oscillator that crosses zero at trend reversals. Unlike momentum oscillators derived from price differences, this oscillator represents the Kalman filter's internal estimate of trend rate — it is inherently smooth without additional EMA smoothing.
Features
Two-state Kalman filter: Tracks price level and velocity simultaneously
Configurable noise parameters: Process and measurement noise control filter responsiveness
Filtered price line overlay: Smooth trend line drawn on the price chart
Velocity oscillator: Kalman velocity state as a zero-line oscillator
Velocity zero-cross signals: Bull and bear signals when velocity crosses zero
Gradient candle coloring: Cyan for upward velocity, magenta for downward, scaled by magnitude
Dashboard: Current filtered price, velocity, trend state, and noise parameters
Alerts: Velocity zero-cross and extreme velocity alerts
Input Parameters
Kalman Engine:
Process Noise (Q): How much the filter trusts its own velocity model (default: 0.01)
Measurement Noise (R): How much the filter trusts new price measurements (default: 1.0)
Initial Velocity: Starting velocity state (default: 0.0)
Display:
Show Filter Line toggle
Show Velocity Oscillator toggle
Show Candle Color toggle
How to Use This Indicator
Step 1: Read Velocity Direction
Positive velocity (oscillator above zero, cyan candles) indicates the filter is trending upward. Negative velocity (below zero, magenta candles) indicates downward trend. The magnitude tells you how strong.
Step 2: Use Velocity Zero-Cross as Trend Change Signal
When velocity crosses from negative to positive, the filter's internal momentum model has flipped bullish. This is more reliable than a price crossover because it reflects the rate of change of the filtered series.
Step 3: Tune Noise Parameters to Timeframe
On faster timeframes, increase Q slightly (0.02–0.05) to make the filter more responsive. On weekly charts, reduce Q (0.001–0.005) for a smoother, slower-adjusting filter.
Step 4: Combine with Regime Context
The Kalman filter performs best in trending regimes. Combine with Fractal Dimension Oscillator: when FDO shows a trending regime, Kalman velocity direction provides the trend bias.
Indicator Limitations
The Kalman filter assumes a linear motion model; non-linear price dynamics (sudden gaps, news events) produce temporary distortion in the filter state
Optimal Q and R values are instrument and timeframe dependent; no universal setting works everywhere
Velocity zero-crosses during low-volatility consolidation can produce frequent false signals
Originality Statement
The two-state Kalman filter implementation combined with a velocity-driven gradient candle coloring system, a dedicated velocity oscillator, and dual-input noise parameter configuration in a single publication is the original contribution here. Most published Kalman filter scripts on PulseWire implement a single-state position filter with no velocity tracking and no gradient visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Kalman filter outputs are mathematical estimates based on prior observations and do not predict future price. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Delta Barometer [JOAT]Delta Barometer
Introduction
Delta Barometer is an open-source dual-engine institutional pressure indicator that generates directional signals from two independent momentum measurement systems — an ATR trailing stop with Trend Strength Score, and a cumulative delta volume crossover with Pressure Score — and allows the user to configure how the two engines interact via four hybrid modes.
The core insight is that trend-following signals and momentum signals often disagree during transition periods and agree during high-probability setups. By building both engines independently, assigning each a score that reflects the quality of its reading, and providing modes that require either one engine, either engine, or both engines simultaneously, the indicator lets traders choose the selectivity level appropriate to their strategy. Requiring confluence produces fewer but higher-quality signals; allowing either engine to fire produces more signals with less selectivity.
Core Concepts
1. Engine A: ATR Trailing Stop with Trend Strength Score
A regime-adaptive ATR trailing stop is computed with different multipliers for low, medium, and high volatility environments. The ATR ratio determines the regime. The trail ratchets in one direction only and produces a signal on flip.
A Trend Strength Score (TSS) between 0 and 100 qualifies each trail flip: RSI slope magnitude contributes 40%, volume rate relative to its average contributes 35%, and ATR expansion relative to a shorter ATR period contributes 25%.
float tssScore = (rsiSlopeComp * 0.40 + volRatioComp * 0.35 + atrExpandComp * 0.25) * 100
2. Engine B: Cumulative Delta Volume with Pressure Score
Signed volume (positive when close is above open, negative otherwise) is accumulated into a running cumulative delta. A moving average of the cumulative delta is computed. A crossover of delta above its moving average is a potential bullish signal; a crossunder is bearish.
A Pressure Score between 0 and 100 qualifies each delta crossover: the magnitude of the delta ratio contributes 40%, volume rate relative to average contributes 35%, and candle body size relative to candle range contributes 25%.
3. Four Hybrid Modes
Both Engines: A signal requires both Engine A and Engine B to produce a raw signal simultaneously. Highest selectivity.
Priority A: Engine A signals take precedence; Engine B fills gaps where A is not firing.
Priority B: Engine B signals take precedence; Engine A fills gaps where B is not firing.
Either Engine: A signal fires when either engine produces a raw signal. Highest frequency.
4. Regime Arming
Each engine can be restricted to fire only in compatible volatility regimes — preventing the trailing engine from generating whipsaw signals during volatility compression.
5. Five-State Pressure Candle Coloring
Bar colors reflect the combined pressure state across both engines on a five-level scale: strong bull, moderate bull, neutral, moderate bear, strong bear.
Features
Engine A — ATR trail with TSS: Regime-adaptive trailing stop with Trend Strength Score qualifying each flip signal
Engine B — Delta volume with Pressure Score: Cumulative signed volume crossover with composite Pressure Score qualification
Four hybrid modes: Both Engines, Priority A, Priority B, Either Engine — configurable selectivity
Regime arming: Each engine independently armed for specific volatility regimes
Five-state pressure candle coloring: Strong bull / moderate bull / neutral / moderate bear / strong bear reflected in bar colors
Gradient trail fill: Gradient between trailing stop and close; color inverts with trail direction
Trade block on signal: Entry, stop (correctly positioned above entry for shorts, below for longs), and TP level rendered as colored boxes on confirmed signals. Stop line is bold dashed red with high-contrast label background. Entry always sits visually between the stop and take-profit zones
9-column horizontal dashboard: Mode, regime, TSS, pressure score, trail direction, delta, engine ID, signal state, status — shown in a horizontal table layout at chart bottom
Non-repainting: All signals confirmed on barstate.isconfirmed
Four color themes: Phantom, Neon, Classic, Solar
Backtest tracker: Win rate and expected value tracked per engine type
Input Parameters
Engine A — ATR Trail:
ATR Length, Low/Med/High Regime Multipliers
Regime ATR Lookback, Low/High Vol Thresholds
TSS Lookback and Min TSS Score to fire
Engine B — Delta Volume:
Delta MA Length, Min Pressure Score
RSI Overbought/Oversold gates
Hybrid Mode:
Hybrid Mode: Both Engines / Priority A / Priority B / Either Engine
Engine A and B arming: All / Low Only / Med + High / High Only
Signal:
Cooldown Bars, TP ATR Multiple, SL % from Entry
How to Use This Indicator
Step 1: Select the Hybrid Mode
Start with Either Engine for maximum signal frequency. Switch to Both Engines when you want only the highest-conviction setups. Priority modes are useful when you trust one engine more than the other for a particular asset.
Step 2: Read the 9-Column Dashboard
The horizontal dashboard shows the current state of both engines simultaneously. The ENGINE column shows which engine fired (A, B, or A+B for confluence). The TSS and PRESSURE columns show the raw quality scores of each engine.
Step 3: Verify Trade Block Direction
For LONG signals: the red risk box appears below entry (stop is below) and the green reward box appears above entry (TP is above). For SHORT signals: the red risk box appears above entry (stop is above) and the green reward box appears below entry (TP is below). Entry is always the dividing line between the two zones.
Step 4: Use Regime Arming for Market Fit
If the asset tends to trend strongly, arm Engine A for all regimes. If it is more volatile-momentum driven, arm Engine B for all regimes. Use Med + High arming for Engine A to avoid choppy low-volatility whipsaws.
Indicator Limitations
The TSS score components all lag price by varying amounts. Signals in fast-moving markets may arrive after the optimal entry point
Cumulative delta volume as used here is a proxy. It approximates institutional bias without access to true bid-ask tick data
Both Engines mode will produce very few signals on most assets. Adjust to Priority or Either modes if signal frequency is too low
Regime classification uses ATR ratio, which is a lagging measure. A volatility spike that changes the regime will affect engine arming only after ATR responds
Originality Statement
The dual-engine architecture with four configurable interaction modes — each engine carrying its own qualification score — and per-engine regime arming is an original design not replicated in existing open-source Pine Script v6 publications
The Trend Strength Score weighting RSI slope, volume rate, and ATR expansion as qualification for ATR trail flip signals, combined with a separate Pressure Score for delta crossovers, provides independent signal quality assessment that single-engine indicators do not offer
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past signal statistics do not predict future performance. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Cascade Liquidity Zones [JOAT]Cascade Liquidity Zones
Introduction
Cascade Liquidity Zones is an open-source institutional stop-hunt and liquidity zone detector built around the mechanics of how large participants move price through retail stop clusters before reversing. It identifies demand and supply zones from pivot-impulse structures, scores them by quality, confirms sweep events with multiple filters, and marks potential failure entry patterns — all within a single indicator that requires no additional tools to interpret.
The foundational premise is that price routinely sweeps beyond visible structural levels to trigger stop orders placed by retail participants, before institutional participants absorb the liquidity generated and reverse price. Identifying these events in advance, tracking the zones where they are likely to occur, and confirming them with volume and wick rejection filters produces a framework for anticipating institutional reactions at structural extremes.
Core Concepts
1. Pivot-Impulse Zone Creation
Demand zones are formed from confirmed pivot lows and supply zones from confirmed pivot highs. Each pivot creates a zone spanning a configurable ATR multiple, representing the area of institutional activity around that structural level. Zones are scored using a three-component Impulse Quality Score:
f_score(idx) =>
bodyR = math.abs(close -open ) / math.max(high -low , syminfo.mintick)
volR = volume / ta.sma(volume, 20)
atrR = (high -low ) / ta.atr(14)
(bodyR*40.0) + (math.min(volR,4.0)/4.0*35.0) + (math.min(atrR,3.0)/3.0*25.0)
This scores the impulse candle by three factors: directional body conviction (40%), volume participation relative to average (35%), and range size relative to ATR (25%).
2. Four-Layer Glow Zone Visualization
Each zone is drawn as four concentric boxes expanding outward from the core zone level, with decreasing opacity on each outer layer. This creates a visual glow effect that communicates zone location and zone type at a glance. Demand zones use the bull theme color; supply zones use the bear theme color.
3. Sweep Confirmation Engine
A demand zone sweep is confirmed when all of the following conditions pass simultaneously on a confirmed bar: minimum wick penetration percentage, close back inside or above the zone, volume exceeds average by a configurable multiple, wick rejection percentage exceeds minimum threshold, cooldown period elapsed, and optional pattern filters pass.
4. Failure Entry Engine
An alternative entry mode detects price failure patterns at pivot levels. A bullish failure occurs when price wicks below the most recent confirmed pivot low and closes back above it on the same bar, with the wick exceeding a minimum ATR size and a minimum rejection percentage. This targets trapped short-sellers at pivot extremes.
5. Zone Flip Mechanics
When price closes fully through a demand zone, that zone flips to a supply zone — its color changes from bull to bear theme color and it becomes eligible for short-side sweeps. This reflects the structural concept that broken support becomes resistance.
6. Liquidity Value and Hold Percentage
Each zone tracks cumulative volume × price product from its origin bar, displayed as a liquidity value label ($K, $M, $B). Zones also track how many times price has touched and rejected from them without breaking through, expressed as a hold percentage.
Features
Pivot-impulse zone creation: Demand and supply zones built from confirmed structural pivot points, scored by impulse quality
Three-component impulse quality score: Body conviction, volume participation, and ATR-relative range scored at zone creation
Four-layer glow boxes: Each zone drawn as four concentric boxes with decreasing opacity for a depth visualization effect
Multi-filter sweep confirmation: Wick penetration %, close direction, volume multiple, wick rejection %, cooldown, and optional pattern filters
Failure entry engine: Detects pivot-wick failure patterns as an alternative signal type with independent settings
Zone flip: Broken demand zones automatically flip to supply and vice versa
Liquidity value labels: Volume × price accumulated at each zone's origin bar, displayed in human-readable scale
Hold percentage: Ratio of zone tests that did not break through; used to prioritize zone strength
Trade block on sweep: Entry, stop, and two TP levels rendered as boxes and lines when a sweep confirms
Zone clustering: Overlapping zones within a minimum ATR separation are deduplicated, keeping the higher-quality zone
Backtest tracker: Win rate and expected value tracked across all sweep signals
Non-repainting: All sweep confirmations gated by barstate.isconfirmed
Institutional dashboard: 18-row table with zone statistics, sweep and failure counts, win rate, and expected value
Input Parameters
Zone Detection:
Pivot Lookback: Bars required on each side to confirm a pivot (default: 10)
Max Active Zones Per Side: Maximum simultaneous demand or supply zones (default: 8)
Zone ATR Width: Zone height as ATR multiple (default: 0.4)
Min Zone Separation: Minimum distance between zones in ATR units (default: 1.5)
Sweep Confirmation:
Min Wick Penetration %: Minimum wick extension through zone boundary
Volume Confirmation toggle and minimum volume multiple
Wick Rejection Filter toggle and minimum rejection %
Cooldown Bars Between Sweeps
Failure Entry:
Enable Failure Entry Mode toggle
Pivot lookback, wick ATR minimum, wick rejection minimum, volume confirmation, cooldown
Trade Block:
Show Trade Block toggle
RR Ratio for TP placement
SL Mode: Zone boundary or Wick extreme
SL Buffer in ATR units
How to Use This Indicator
Step 1: Identify Active Zones
Fresh zones (not yet swept) are displayed in full color. Prioritize fresh zones with high hold percentages and large liquidity values for upcoming sweep setups.
Step 2: Wait for Sweep Confirmation
A sweep is confirmed when the bar closes after the wick penetration. The trade block appears automatically with entry at the close of the confirmation bar, stop behind the zone boundary plus buffer, TP1 at 1:1 R, and TP2 at the configured RR ratio.
Step 3: Distinguish Sweeps from Failures
Standard sweeps require price to touch inside the zone boundary. Failure entries detect pivot-level failures at a higher structural level. Enable only one mode at a time to avoid conflicting signals.
Indicator Limitations
Pivot confirmation requires bars after the pivot candle. Zones are plotted with an inherent offset corresponding to the lookback length
All sweep confirmations require a bar close. Price that sweeps and reverses within the same bar without confirming on close will not generate a signal
Volume-based filters are less reliable on assets where volume data is unreported or synthetic
Zone flip mechanics assume that a broken level becomes resistance. This structural assumption does not hold in all market conditions
Originality Statement
The combination of a three-component impulse quality score at zone creation, four-layer glow box visualization, multi-condition sweep confirmation, zone flip mechanics, and a failure entry engine in a single indicator is not replicated in existing open-source Pine Script v6 publications
The liquidity value metric (volume × price at pivot origin) as a zone ranking input alongside hold percentage provides an institutional sizing dimension that simple pivot-based zone indicators do not include
The dual-mode architecture (sweep engine + failure entry engine) with independent settings for each, selectable via a single mode toggle, allows the same structural framework to address two different entry philosophies within one indicator
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Liquidity sweep patterns identified by this indicator represent historical structural events, not predictions of future price behavior. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Prismatic Depth [JOAT]Introduction
Prismatic Depth is an open-source multi-pillar institutional signal filter that scores bullish and bearish market pressure across nine independent analytical dimensions simultaneously. Rather than generating a signal from any single indicator, Prismatic Depth requires a weighted composite score above a configurable threshold, a minimum directional lead between bull and bear scores, and alignment of up to five optional confirmation gates — all at the same time.
The problem this solves is signal noise. Most indicators produce signals from a single input: a moving average crossover, an RSI threshold, a volume spike. Each of these fires constantly in all market conditions, including conditions where it has no historical edge. Prismatic Depth measures nine separate market properties and only produces a signal when a statistically unusual number of them agree simultaneously. The result is a lower-frequency, higher-context signal that reflects a broader institutional consensus rather than a single technical event.
Core Concepts
1. The Nine-Pillar Scoring Architecture
Each pillar measures a distinct market property independently. Pillar weights are user-configurable and sum to produce a maximum possible score of 100. The nine pillars are:
Structure: Detects higher-high / higher-low and lower-high / lower-low sequences using confirmed pivot highs and lows. A bullish structural sequence adds the Structure weight to the bull score.
Volume: Measures the slope of On-Balance Volume using linear regression over 20 bars. A rising OBV slope contributes to the bull score; falling contributes to bear.
Momentum: Blends three momentum inputs — Kaufman Adaptive Moving Average position, RSI relative to 50, and Williams Percent Range relative to midpoint. Each sub-component is weighted equally at one-third.
Liquidity: Detects swing-low sweeps — bars where price wicks below the last confirmed swing low and closes back above it. These represent stop-hunt events followed by institutional absorption.
Volatility: Evaluates whether the ATR-to-SMA(ATR) ratio falls within a productive range (0.8 to 1.6). Markets outside this range are either too compressed for trend signals or too expanded for reliable entries.
Session: Measures the current bar's position relative to the daily session midpoint. Bars in the lower half of the daily range carry a bullish session score; bars in the upper half carry a bearish score.
Higher Timeframe: Compares current close to a 50-period EMA on a user-selected higher timeframe via request.security() with lookahead disabled.
Delta Pressure: Tracks cumulative signed volume and detects when its moving average crossing direction aligns with price movement. A Pressure Score blending the volume delta ratio, volume rate, and bar body ratio is computed.
Fractal Efficiency: Computes the Fractal Efficiency Ratio — the ratio of the net directional price move to the total path length of individual bar changes. An FER above 0.60 in conjunction with ADX above 20 passes the efficiency gate.
// Fractal Efficiency Ratio
float ferNet = math.abs(close - close )
float ferPath = math.sum(math.abs(ta.change(close)), ferLen)
float ferVal = ferPath > 0.0 ? ferNet / ferPath : 0.0
2. Weighted Score Gating
The final bull and bear scores are compared against a minimum threshold (default: 70 of 100) and a minimum directional lead (default: bull must exceed bear by at least 20 points). Both conditions must hold simultaneously before a signal is considered.
bool longSignal = bull >= threshold and (bull - bear) >= scoreGap
and inSession and noiseGate and vwmaGate and stGate and ribbonGate
3. Optional Confirmation Gates
Five binary gates can be independently enabled or disabled: VWMA(200) price relationship, Supertrend direction, 8-line HMA ribbon direction, ADX minimum threshold (noise filter), and session time filter. Each gate is AND-logic — all enabled gates must pass before a signal fires.
4. Kaufman Adaptive Moving Average
The momentum pillar uses KAMA rather than a standard moving average. KAMA adjusts its smoothing constant based on the Efficiency Ratio of recent price movement, reacting quickly during trending phases and becoming nearly flat during choppy periods.
5. 8-Line HMA Gradient Ribbon
Visual context is provided by an 8-line Hull Moving Average ribbon (using every other increment for performance while retaining the full gradient effect). A normalization factor (ribbon spread divided by its 200-bar EMA, clamped to -1 to +1) drives a color gradient from the bear theme color to the bull theme color. The gradient reflects conviction intensity, not just direction.
6. Trade Block Visualization
When a signal fires, entry, stop, and up to four take-profit levels are plotted as horizontal lines and labeled at the right edge of the chart. Risk and reward zones are shown as translucent boxes. All drawn objects are updated every bar to extend rightward until closed.
Features
Nine-pillar weighted confluence scoring: Structure, Volume, Momentum, Liquidity, Volatility, Session, HTF Trend, Delta Pressure, and Fractal Efficiency each scored independently and summed
Configurable pillar weights: Each pillar's contribution to the total score is independently adjustable
Five optional binary gates: VWMA, Supertrend, HMA Ribbon, ADX noise filter, and session filter independently toggled
Threshold and directional lead gating: Score must exceed minimum AND directional lead must exceed gap before any signal fires
Extreme signal tier: Separate threshold for extreme confluence readings with distinct visual treatment
8-line HMA gradient ribbon: rFactor-normalized color gradient reflecting momentum spread intensity vs. its 200-bar historical average, with gradient fills between all adjacent ribbon lines
Gradient glow bar coloring: Glow color mode uses barcolor() to highlight signal bars in the bull or bear theme color; when disabled, falls back to RSI-intensity gradient bar coloring
Regime background tint: Subtle chart background tint on regime transitions, clearing after 10 bars
Four TP levels with live boxes and lines: TP1–TP4 plotted as gradient green lines and translucent boxes extending right in real time
Four stop modes: Supertrend, ATR cap, fixed percentage, pivot-based
Built-in backtest tracker: Win rate, expected value in R, and trade count
Four color themes: Phantom (cyan/magenta), Neon (teal/pink), Classic (green/red), Solar (orange/blue)
Institutional dashboard: 14-row table showing all nine pillar scores, signal state, and performance metrics
Non-repainting: All signals gated by barstate.isconfirmed; HTF request.security() uses lookahead=barmerge.lookahead_off
Input Parameters
Scoring Engine:
Min Score to Signal: Minimum composite score required (default: 70)
Extreme Score: Score for extreme tier (default: 90)
Min Directional Lead: Bull-bear gap required (default: 20)
Pillar Weights:
Individual weight sliders for each of the nine pillars (defaults sum toward 100)
Trend Gates:
VWMA Gate toggle and length (default: 200)
Supertrend Gate toggle, ATR length, multiplier
Ribbon Gate toggle, base length, step
ADX Noise Gate toggle and minimum ADX value
Signal Control:
Cooldown bars between signals (default: 5)
Session filter toggle and session string
Trade Levels:
Show Trade Block toggle
Stop mode: Supertrend / ATR Cap / Fixed % / Pivot
RR multiples for TP1, TP2, TP3, TP4 (defaults: 0.5, 1.0, 1.5, 2.0)
How to Use This Indicator
Step 1: Select a Theme and Configure Gate Sensitivity
Choose a color theme that suits your chart. Start with all five gates enabled and default weights. Observe signal frequency across several recent weeks of history.
Step 2: Interpret the Dashboard Score Rows
Each pillar row in the dashboard shows its current directional score in the stronger direction. A row colored in the bull theme means that pillar is contributing to bullish confluence. The Signal row shows the final output.
Step 3: Use Signals as Context, Not Directives
A signal fires when an unusual number of market dimensions agree. It does not predict how far price will move or guarantee a profitable outcome.
Step 4: Set Stop Mode Before Live Use
The Supertrend stop mode trails the stop with the Supertrend level. ATR Cap limits maximum stop distance. Fixed % uses a fixed percentage of price. Pivot uses the last confirmed structural pivot.
Step 5: Review Backtest Statistics Skeptically
The win rate and expected value displayed are calculated from signal history on the current chart only. They reflect past performance on historical data. Optimizing weights to maximize these numbers on a single chart produces overfitted results that will not generalize.
Indicator Limitations
Pivot-based pillars (Structure, Liquidity) confirm with a lookback offset — the structural event is labeled bars after it occurred. This is non-repainting behavior inherent to pivot detection
The Fractal Efficiency gate may delay signals following sharp, fast moves where path length temporarily normalizes
High pillar weights placed on a single pillar can effectively reduce this to a single-factor indicator. Weight distribution should be reasonably balanced
The session pillar score assumes intraday context. On daily and higher timeframes, it contributes a neutral fixed value
The backtest tracker embedded in this indicator does not account for slippage, commission, or partial fills. It is not a substitute for a properly configured strategy backtest
Enabling all gates simultaneously will produce very few signals. Tune gate selection to the market and timeframe being analyzed
Originality Statement
Prismatic Depth is original in its nine-pillar architecture and the specific combination of inputs it assembles. This publication is warranted because:
The Fractal Efficiency Ratio as a scoring pillar and gate condition — measuring the directional efficiency of price movement over a lookback, distinct from ADX — is not present in existing open-source Pine Script v6 publications as of this writing
Weighted pillar scoring where the user controls the relative contribution of each dimension, combined with both a score threshold and a directional lead gap as dual gatekeeping conditions, produces a more selective output than threshold-only systems
The Delta Pressure pillar — computing a composite of volume delta ratio, volume rate versus average, and candle body compression — is an original implementation distinct from standard OBV or CMF approaches
The combination of nine independently scored dimensions with five independently toggled binary confirmation gates in a single configurable framework, with a built-in per-signal performance tracker, is not replicated in existing open-source publications
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Confluence readings are based on historical price data and do not guarantee any future market outcome. Past win rate statistics shown by the built-in tracker do not predict future performance. Always apply proper risk management. The author accepts no responsibility for trading losses resulting from the use of this indicator.
Made with passion by jackofalltrades
Indicator

Nexus Kinetic Reactor [JOAT]Nexus Kinetic Reactor
Introduction
Nexus Kinetic Reactor estimates price as a noisy state process. It tracks state, velocity, uncertainty, confidence, and optional projection cones.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Recursive State Estimate
A smoothing lambda updates the estimated price state bar by bar.
2. Velocity Regime
Changes in the state estimate create velocity and acceleration-style context.
3. Uncertainty Bands
Noise windows and sigma bands show how uncertain the current estimate is.
4. Confidence Gate
Signals require tracking confidence and expectancy thresholds before labels appear.
state := state + lambdaAdjustment * (price - state)
Features
Recursive price-state estimator
Velocity and acceleration regime logic
Uncertainty bands
Projection cone
Blocked signal markers and dashboard
Input Parameters
Smoothing lambda and noise window
ATR length and velocity threshold
Minimum confidence and expectancy
Band sigma and projection bars
Cone, candle, and panel toggles
How to Use This Script
Use the state estimate and uncertainty bands as kinetic context. Labels only appear when the model clears confidence and expectancy gates.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Nexus is original in combining state estimation, velocity gating, uncertainty bands, expectancy filtering, and projection visualization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicator

Helix Regime Corridor [JOAT]Helix Regime Corridor
Introduction
Helix Regime Corridor is an open-source regime and entry-state indicator built around adaptive ATR bands, structural CHoCH events, regression context, transition memory, and risk rails. It is designed to show when price is moving under bullish control, bearish control, or a less decisive transition state.
The script solves the problem of treating every trend flip the same. It requires directional control, structure, volatility, and confluence scoring before marking a confirmed shift.
Core Concepts
1. Adaptive Regime Corridor
The central trend average and surrounding ATR bands adapt to current market volatility. The corridor shows whether price is operating above, below, or inside the active control area.
2. Confirmed Holds
The script can require price to hold beyond the corridor for a configurable number of bars. This helps reduce single-candle fakeouts.
3. CHoCH-Assisted Structure
Pivot highs and lows identify structural change. Bullish or bearish CHoCH events can support a new regime shift when price breaks prior structure.
4. Regression Context
An optional regression field provides broader directional context and helps identify whether the active shift is aligned with the recent linear price path.
5. Transition Memory
The script tracks transition behavior over a configurable memory window. This adds a probability-style context layer without claiming certainty.
Features
Adaptive ATR corridor: Volatility-adjusted bands frame bullish and bearish control.
Regime shift detection: Identifies confirmed changes into bullish or bearish control.
CHoCH structure: Optional structure-assisted entries using pivot confirmation.
Confluence scoring: Signals require score alignment rather than a single moving-average cross.
Risk rails: Entry, stop, TP1, TP2, and TP3 references can be drawn for confirmed shifts.
Candle tinting: Bars can be colored by current state.
Optional regression channel: Adds broader context when desired.
HUD: Shows regime, score, transition, ADX/ATR, regression, structure, and bias.
Alerts: Long shift, short shift, bull regime, bear regime, bullish CHoCH, and bearish CHoCH.
Input Parameters
Core: Operating Preset, Adaptive Average Length, ATR Length, ATR Band Multiplier, Confirmed Hold Bars.
Structure and Signals: Pivot Left, Pivot Right, Regression Context Length, Transition Memory, Directional Strength Length, Minimum Shift Score, Allow CHoCH-Assisted Entries, Signal Cooldown Bars.
Risk and Visuals: Structure Stop Lookback, Stop ATR Buffer, TP1 R, TP2 R, TP3 R, Rail Projection Bars, Adaptive Bands, Trend Cloud, Regression Channel, Candle Tint, Pivot Marks, HUD.
How to Use This Indicator
Step 1: Read the regime
Use the corridor and dashboard to identify whether price is under bullish control, bearish control, or a weaker transitional state.
Step 2: Wait for score confirmation
Long and short shifts are only marked when the configured confluence score is reached.
Step 3: Compare structure
CHoCH events help explain whether a shift is supported by structural change or only by band behavior.
Indicator Limitations
Pivot structure confirms after the required right-side bars complete.
Adaptive bands can lag sharp reversals because they are volatility-based.
Transition memory summarizes recent behavior; it does not forecast future price.
Risk rails do not account for spread, slippage, or order execution.
Originality Statement
Helix Regime Corridor is original in its combination of adaptive ATR control bands, hold confirmation, CHoCH structure, regression context, transition memory, confluence scoring, and risk rails. The components are combined to classify regime and produce cleaner shift states rather than simply plotting a trend band.
Disclaimer
This script is for educational and informational use only. It is not financial advice and does not recommend any trade. Trend and regime models can fail in ranges, news events, and abnormal volatility. Always manage risk independently.
Made with passion by jackofalltrades
Indicator

Extreme Reversal Channel [JOAT]Extreme Reversal Channel
Introduction
Extreme Reversal Channel is an open-source adaptive channel that tracks persistent upper and lower extremes, gradually resets stale levels, and marks confirmed reversal conditions when price rejects a fresh extreme through the channel midpoint.
The problem it solves is stale channel context. Fixed lookback channels can jump abruptly as old bars roll out. Extreme Reversal Channel uses persistent state and controlled interpolation, creating smoother structural boundaries while still adapting to current price.
Core Concepts
1. Persistent Extreme Tracking
The upper channel updates when a new high exceeds the current upper core. The lower channel updates when a new low breaks the current lower core.
2. Counter-Based Reset
If no new extreme appears after the selected reset length, the stale level interpolates toward current price using the reset alpha setting.
upperCore := upperCore * (1.0 - alpha) + high * alpha
lowerCore := lowerCore * (1.0 - alpha) + low * alpha
3. Midpoint Reversal Confirmation
A bullish reversal requires a fresh lower extreme and a confirmed close back above the midpoint. A bearish reversal requires a fresh upper extreme and a confirmed close back below the midpoint.
4. Channel vs Trail Mode
Channel mode shows the upper, lower, and midpoint. Trail mode shows a single adaptive trailing reference derived from the current trend state.
Features
Adaptive upper/lower extremes: Persistent channel boundaries that update with new highs/lows
Reset interpolation: Stale levels drift toward current price instead of disappearing abruptly
Midpoint reversal logic: Reversal labels require closed-bar confirmation
Gradient channel fills: Upper and lower channel regions are lightly shaded
Optional trail mode: Converts the channel into a single adaptive stop reference
Top-right dashboard: Trend, mode, width, price position, reset age, and signal state
Alerts: Confirmed bullish and bearish reversal events
Input Parameters
Channel:
Reset Length: Bars allowed before an untouched extreme resets
Reset Alpha: Interpolation speed toward current price
Body Filter: Minimum candle body quality for reversal labels
Trailing Mode: Switches from full channel to trail display
How to Use This Indicator
Step 1: Use the channel boundaries as adaptive structural extremes.
Step 2: Watch for midpoint rejections after fresh extremes.
Step 3: Use trail mode when you want a simpler directional reference.
Step 4: Read price position and channel width in the dashboard before interpreting a reversal.
Indicator Limitations
Reversal labels can be early in strong breakout conditions
Very narrow channels require caution because small moves can cross the midpoint easily
The channel is adaptive context, not a complete trade system
Signals are confirmed on closed bars and do not use future references
Originality Statement
Extreme Reversal Channel is original in its combination of persistent extreme tracking, reset interpolation, midpoint rejection logic, optional trail mode, and compact dashboard output. It does not copy third-party source code.
Disclaimer
This open-source indicator is provided for educational and informational purposes only. It is not financial advice. Market conditions can invalidate reversal context, and risk management remains essential.
-Made with passion by jackofalltrades
Indicator

Aegis Arc Framework [JOAT]Aegis Arc Framework
Introduction
Aegis Arc Framework is an open-source anchored-trend overlay built to classify directional pressure through the interaction of three continuously updated reference systems: a confirmed trailing arc, anchored VWAP regime alignment, and ATR-normalized extension pressure. The script is designed to provide structured directional context without relying on repainting shortcuts or visually noisy retail markers.
The main problem Aegis Arc Framework solves is trend persistence versus trend exhaustion. Price can remain above a trailing framework while already becoming stretched relative to value. It can also reclaim value while a trend is still technically intact. Aegis addresses that by combining a ratcheting confirmed trail with session, weekly, and monthly VWAP context so the user can distinguish continuation, weak extension, and blocked transition states.
Core Concepts
1. Anchored VWAP Regime Gate
The indicator maintains manually anchored session, weekly, and monthly VWAP references and checks whether the active trend is aligned with those value anchors. Depending on the selected mode, the gate can require Session, Week, Month, Any, or All alignment before the dashboard and confirmed state fully agree with the direction of the arc.
bool s = bullish ? close >= vwapSession : close <= vwapSession
bool w = bullish ? close >= vwapWeek : close <= vwapWeek
bool m = bullish ? close >= vwapMonth : close <= vwapMonth
2. Ratcheted Arc Trail
The main trail is not a static moving average. It is a ratcheting arc that updates on confirmed bars, accelerates toward the active target band, and decays its internal velocity over time. This makes the line responsive during directional expansions while still preserving a smooth institutional appearance.
3. Extension Pressure
Distance from the active anchored VWAP is normalized by ATR and converted into an acceleration modifier. When price becomes stretched from value, the trail responds more aggressively. This helps expose when a trend is still directional but increasingly extended.
4. Confirmed Flip Logic
A trend flip is only confirmed on closed bars. The trail state does not anticipate future movement or use future references. This keeps the overlay safe for real-time use and consistent with non-repainting publication standards.
5. Forward Flip Levels
Each confirmed directional transition creates a horizontal level that extends forward until invalidated or aged out. These levels act as persistent decision references and help frame whether price is defending or losing prior transition zones.
Features
Anchored value logic: Session, weekly, and monthly VWAP tracking with selectable regime gate modes
ATR-based arc framework: Confirmed-bar ratcheting trail with velocity decay and acceleration logic
Extension awareness: ATR-normalized distance from value used to classify whether the active move is orderly or stretched
Persistent transition levels: Confirmed flip levels extend forward and self-clean when broken or aged out
Institutional visual shell: Trail glow, clean cloud fill, optional candle tint, and compact top-right dashboard
No retail markers: The script avoids arrows and clutter-focused signal decoration
Confirmed-bar logic: Trend transitions and level invalidations are gated by confirmed bars only
Input Parameters
Core Trajectory:
ATR Length
Trail Distance (ATRx)
Base Acceleration
Velocity Decay
Velocity Cap
Minimum Chase / Maximum Chase
Run Window
Minimum Flip Gap
VWAP Regime:
Regime Mode: Session, Week, Month, Any, All
VWAP Speed Boost
Show Selected VWAP
Visual System and Levels:
Bull, bear, and neutral palette controls
Cloud, trail glow, and candle tint toggles
Confirmed flip level styling and retention controls
Dashboard display toggle
How to Use This Indicator
Step 1: Read the active regime
Check whether price is above or below the confirmed trail and whether the dashboard shows value alignment with the selected anchored VWAP mode.
Step 2: Judge extension
Use the extension and acceleration rows in the dashboard to determine whether the move is orderly or increasingly stretched from anchored value.
Step 3: Use flip levels as structure references
When a confirmed transition occurs, the generated forward level becomes a practical decision point for retests, failures, and continuation checks.
Step 4: Combine with execution tools
Aegis is best used as a directional and structural context layer. It can filter other entry models by allowing long setups only when the trail and value regime agree, and short setups only when the opposite condition is present.
Indicator Limitations
Anchored VWAP alignment may temporarily lag during very early reversals, especially when a higher anchor such as the weekly reference is selected
The arc can tighten quickly during extreme volatility because acceleration is intentionally sensitive to extension pressure
Flip levels are contextual structure references, not guaranteed support or resistance
The script classifies directional state and extension; it does not predict future price movement
Originality Statement
Aegis Arc Framework is original in the way it combines a confirmed ratcheting trail, anchored VWAP regime gating, extension-driven acceleration, and managed forward flip levels into one coherent overlay. It is published because the combination is meaningfully different from a standard SuperTrend, a standalone VWAP overlay, or a simple trailing stop line.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice and does not recommend any specific trade or investment. All calculations are derived from historical and real-time chart data and can produce false signals. Trading involves substantial risk. Always use independent judgment and risk management.
Indicator

Self-Aware Trend System [WillyAlgoTrader]🧠 Self-Aware Trend System (SATS) is an adaptive SuperTrend-based trend-following system that continuously measures its own operating environment through a 4-factor Trend Quality Index (TQI) and modulates band width, asymmetry, and flip logic in real time. Unlike a fixed SuperTrend — which uses the same ATR multiplier forever — SATS knows when the market is trending vs. chopping, compresses bands in clean trends to lock profit tighter, widens them in noisy conditions to avoid whipsaws, and can detect regime collapse through a "character-flip" even when price hasn't broken the band yet. Each confirmed signal comes with a full trade plan (Entry, SL, TP1/TP2/TP3 at user-defined R multiples), and the system tracks its own realized R, win rate, drawdown, and per-regime edge — building an honest, instrument-specific performance log directly on your chart.
The name "Self-Aware" refers to one specific property: the indicator measures the quality of its own environment every bar and feeds that measurement back into its band width and flip conditions. It doesn't predict the future — it reacts to present conditions with mathematically defined adaptation rules.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A classic SuperTrend has one problem: its ATR multiplier is fixed. In a clean trending market the bands are too wide, giving back profit on every pullback. In a choppy market the bands are too tight, generating whipsaw after whipsaw. Traders try to fix this by manually switching multipliers per timeframe or per instrument — but that's guesswork.
SATS chains a different approach:
Market state measurement (TQI) → Non-linear band modulation → Asymmetric band widths → Character-flip detection → R-multiple trade plan → Outcome tracking → Regime-aware statistics
The TQI engine measures market quality from four independent angles each bar (efficiency, volatility regime, structure, momentum persistence). The non-linear modulation translates that quality into band width — high quality compresses bands, low quality expands them, using a power curve that avoids both over-reacting to mild fluctuations and under-reacting to severe regime changes. Asymmetric bands tighten the active side (in the direction of the trend) while loosening the passive side — creating a "ratchet with leverage" that locks in profit faster than it invalidates the trend. Character-flip detection catches regime collapses (high quality → low quality) even when price hasn't broken the band — critical for exiting stale trends before they fully reverse. And performance tracking records every signal's realized R, building a real statistical picture of how the system performs on your specific instrument and timeframe.
Without TQI, the bands are blind. Without asymmetry, profit-taking lags. Without character-flip, exits happen too late. Without performance tracking, you have no idea if the system has a real edge on your instrument. All four work together — each layer addresses a specific weakness of classic SuperTrend.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Trend Quality Index (TQI) — 4-factor continuous quality measurement.
TQI is computed every bar as a weighted combination of four independent 0..1 factors:
— 🧭 Efficiency (default weight 0.35) : Kaufman Efficiency Ratio = |close − close | / sum(|close − close |). Measures directional movement vs. total path. 1.0 = perfect straight line, 0.0 = pure noise. Default window 20 bars.
— 📊 Volatility Regime (weight 0.20) : uses Volume Z-score when volume data is available (z = (volume − sma) / stdev, mapped from to ), or falls back to ATR ratio (current ATR vs. long-baseline ATR) on volume-less instruments.
— 🏗️ Structure (weight 0.25) : price position within its recent range. pricePos = (close − lowest) / (highest − lowest). Then tqiStruct = |pricePos − 0.5| × 2. Trends pin price to one edge (1.0), chop oscillates around the midpoint (0.0). No ATR dependency.
— ⏩ Momentum Persistence (weight 0.20) : of the last N bars, what fraction moved in the same direction as the overall window change? alignedBars / N. Default 10 bars.
Final TQI = (factor1 × w1 + factor2 × w2 + factor3 × w3 + factor4 × w4) / sum(weights), clamped to 0..1. Each weight is user-configurable.
2️⃣ Non-linear band modulation with power curve.
Instead of a linear "multiplier × (1 − tqi)", SATS uses a power curve:
qualityDeviation = (1 − tqi)^curvePower
tqiMult = 1 − qStrength + qStrength × (0.6 + 0.8 × qualityDeviation)
With curvePower = 1.5 (default), mild quality drops (from 0.9 to 0.7) cause small band expansion, but severe drops (0.5 to 0.2) cause rapid expansion. This matches how traders actually think: ignore small wobbles, react strongly to clear regime changes.
3️⃣ Asymmetric band widths — ratchet with leverage.
In a strong uptrend, the lower band (active, trailing price up) tightens while the upper band (passive, not used as stop) widens:
activeMult = symMult × (1 − asymStrength × tqi × 0.3)
passiveMult = symMult × (1 + asymStrength × tqi × 0.4)
Effect: as trend quality rises, the trailing stop moves closer to price (locking profit faster) while the opposite band moves away (so an accidental pullback doesn't trigger a flip). This is the "leverage" — asymmetric response to confirmed trend strength.
4️⃣ EMA-smoothed multipliers before ratchet application.
Raw TQI can spike bar-to-bar. If those spikes fed directly into the SuperTrend ratchet logic, bands would compress at a high-TQI bar and stay stuck there (SuperTrend math never loosens active bands against the trend). SATS EMA-smooths the multipliers (alpha 0.15) before ratchet application — preventing stickiness. This is the critical fix that makes adaptive SuperTrend actually work in practice.
5️⃣ Efficiency-weighted ATR.
Used for band construction and SL/TP sizing (not for TQI itself, to avoid circular feedback):
effATR = rawATR × (0.5 + 0.5 × ER)
Clean trending volatility counts full (ER = 1.0 → effATR = rawATR). Noisy chop volatility is halved (ER = 0.0 → effATR = 0.5 × rawATR). This makes SL/TP distances proportional to "useful" volatility, not total volatility.
6️⃣ Character-flip detection with age guard.
Classic SuperTrend only flips on price breaks. But a trend can die internally — quality collapses, momentum fades — before price actually breaches the band. Character-flip catches this:
charFlipDown = prevTQI > 0.55 (high) AND currentTQI < 0.25 (low) AND trendAge ≥ minAge AND close < source
The age guard (default 5 bars) prevents whipsaw on fresh trends — a newborn trend hasn't had time to establish quality, so early TQI noise can't kill it. After the age threshold, a quality collapse triggers an immediate flip even without price break.
7️⃣ Auto-fixed TP order.
If a user accidentally sets TP1 > TP2 (or TP3 < TP2), the indicator automatically sorts them. Math: fixedMin = min(all), fixedMax = max(all), middle = sum − min − max. The three TP lines always end up in correct order on the chart regardless of user input order.
8️⃣ R-multiple trade planning with pivot-anchored SL.
On each signal:
— Entry = close at bar of confirmed flip
— SL = min(pivot − slMult×ATR, entry − slMult×ATR) for longs (mirror for shorts)
— TP1/2/3 = entry ± risk × R-multiple
The SL uses whichever is further from entry — the recent pivot (if available) or a pure ATR distance. This ensures the stop always has a minimum ATR buffer regardless of how close the nearest pivot is.
9️⃣ Performance tracking with realized R accounting.
Every signal is tracked bar-by-bar for TP hits, SL hits, and timeout (default 100 bars). On close-out, realized R is calculated assuming 1/3 position per TP:
— TP3 hit: realized = (tp1R + tp2R + tp3R) / 3 (all three filled)
— SL hit after TP1: realized = (1/3) × tp1R + (2/3) × (−1R)
— SL hit after TP1+TP2: realized = (1/3) × tp1R + (1/3) × tp2R + (1/3) × (−1R)
— Pure SL: realized = −1R
— Timeout: realized = sum of already-hit TP portions (no penalty)
Results feed a rolling buffer (up to 100 signals), which drives:
— Rolling Win Rate
— Rolling Avg R
— Rolling drawdown (window DD)
— All-time drawdown
— Current and max win/loss streaks
🔟 9-cell regime edge tracking.
Every completed signal is bucketed by the market regime at entry time: Efficiency bin (low/mid/high) × Volatility bin (low/normal/high) = 3×3 = 9 cells. Each cell accumulates its own EWMA of realized R. The dashboard shows the current regime's historical edge — e.g., "Trending + High Vol: +0.85R (23 trades)". This lets you see which market conditions the system actually profits in.
1️⃣1️⃣ Experimental self-calibration (off by default).
When enabled, the system monitors its rolling avg R and drifts the Quality Influence parameter toward the user default if recent edge is poor (below threshold). This is explicitly marked experimental — no claim of improved results — and recommended off until validated on your instrument.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — TQI computation : Compute four factors (Efficiency, Volatility Regime, Structure, Momentum Persistence). Weight and combine into a single 0..1 value.
Step 2 — ATR and effective ATR : rawATR = ta.atr(len). effATR = rawATR × (0.5 + 0.5 × ER).
Step 3 — Adaptive multiplier : Apply legacy ER adaptation (optional) and non-linear TQI curve. If asymmetric bands enabled, split into active/passive multipliers.
Step 4 — EMA smoothing : Smooth both multipliers with alpha 0.15 to prevent ratchet stickiness.
Step 5 — SuperTrend bands : upperBand = source + upperMult × effATR. lowerBand = source − lowerMult × effATR. Ratchet logic: lower only rises, upper only falls, until a flip.
Step 6 — Flip detection : Price flip (close crosses opposite band) OR character-flip (TQI collapse + age guard). On flip: reset trend age, start new segment.
Step 7 — Trade plan : On confirmed flip, compute Entry/SL/TP1/TP2/TP3. Draw lines and labels. Cache the market regime (ER bin × Vol bin) for later edge attribution.
Step 8 — Outcome tracking : Each bar, check active trade for TP1/TP2/TP3/SL hits and timeout. On close-out, calculate realized R, push to history buffer, update rolling stats, drawdown, streaks, and regime cell.
Step 9 — Dashboard render : On last bar, render live state (Trend, TQI, regime, performance stats, TQI breakdown, regime edge).
📖 HOW TO USE
🎯 Quick start:
1. Add indicator — preset is "Auto" (adapts to your current timeframe)
2. Green line = bullish trend, red = bearish trend
3. Line transparency reflects TQI: bright = high quality, faded = low quality
4. ▲ BUY / ▼ SELL labels appear on confirmed flips
5. Entry, SL, TP1, TP2, TP3 lines drawn automatically at the signal
6. Copy levels to your exchange, let the dashboard track outcomes
👁️ Reading the chart:
— 🟢 Bright green line = bullish trend with high TQI — aggressive participation
— 🟢 Faded green line = bullish trend with low TQI — cautious, possible regime shift
— 🔴 Bright red line = bearish trend with high TQI
— 🔴 Faded red line = bearish trend with low TQI
— Line flip + label = new trade signal
— Dashed TP lines turning solid + "✓" = TP was hit
— Score on label (e.g., "85/102") = multi-factor confluence strength
📊 Dashboard fields:
— Preset: Auto-resolved (Scalping / Default / Swing / Crypto)
— Trend: Bullish ▲ / Bearish ▼
— TQI: current quality index (0..1)
— Q.Strength: effective Quality Influence (may drift if auto-calibration enabled)
— Signal: current bar signal (BUY / SELL / —)
— Regime: Trending / Mixed / Choppy + Low/Norm/High Vol
— ER / RSI / Vol Z: raw filter values
— TQI Components breakdown: Efficiency / Volatility / Structure / Momentum (each 0..1)
— Performance section: Win Rate, Avg R, Window DD, All-Time DD, Streak W/L, Regime Edge
🔧 Tuning guide:
— Too many whipsaws : increase Quality Influence (0.5–0.7), increase Structure weight, increase Base Band Width
— Missing moves / signals too late : decrease Quality Influence (0.2–0.3), decrease Base Band Width, increase asymmetry
— Choppy instrument : use Swing preset, enable Character-Flip, raise minAge to 10+
— Strong trending instrument : use Scalping preset, enable Asymmetric Bands with strength 0.6+
— No volume data : automatically falls back to ATR ratio for volatility regime — no action needed
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Preset : Auto / Custom / Scalping / Default / Swing / Crypto 24/7 (auto-adapts ATR, band width, ER window, RSI, SL multiplier)
— ATR Length (13), Base Band Width (2.0 × ATR)
📐 Trend Quality Engine:
— Enable TQI (default On)
— Quality Influence (0.4): how strongly TQI compresses/expands bands
— Quality Curve Power (1.5): non-linearity
— Smooth Adaptive Multipliers (On): critical fix for ratchet stickiness
— Asymmetric Bands (On) + Asymmetry Strength (0.5)
— Efficiency-Weighted ATR (On)
— Character-Flip (On) + Min Age (5) + High/Low TQI thresholds (0.55 / 0.25)
— TQI factor weights : ER 0.35, Volatility 0.20, Structure 0.25, Momentum 0.20
🎯 Risk:
— SL Buffer (1.5 × ATR), TP1/2/3 R-multiples (1.0 / 2.0 / 3.0), Trade Timeout (100 bars)
🤖 Self-Learning (experimental):
— Auto-calibration (default Off), calibration window, bad/good R thresholds, quality step, cooldown, floor/ceiling
— Reset Learning Memory button
📊 Dashboard: position, TQI breakdown toggle, performance stats toggle, score breakdown toggle
🔔 Alerts
— 🟢 BUY — ticker, TF, price, TQI, score, SL, TP1, TP2, TP3
— 🔴 SELL — same payload
Plain text and JSON webhook formats supported. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. SuperTrend ratchet logic is monotonic — once the trailing band moves, it cannot move back against the trend until a flip. Character-flip uses only previous-bar TQI and current-bar close, both available at bar close.
— 📊 TQI is descriptive, not predictive. It measures current market quality from 4 factors — it does not forecast future price. A high TQI reading means "the market is currently behaving like a trend" — it can still fail on the next bar.
— 📏 Performance stats are walk-forward, not backtested. The rolling buffer records signals as they happen, bar by bar. Drawdown, win rate, and regime edge are honest forward-looking statistics on your specific instrument and timeframe — not curve-fitted optimization results.
— ⚖️ The realized R accounting assumes 1/3 position per TP . This mirrors a standard "scale out at each target" approach. Traders who hold full position to a single target should interpret the R values accordingly.
— 🔄 Auto-calibration is experimental. It's off by default and should stay off until you've validated it on your specific instrument. The drift is mean-reverting (toward your user default), not profit-maximizing — no claim of improvement is made.
— 🔒 The Reset Learning Memory button clears the rolling buffer, regime cells, drawdown, and streak stats. Use when changing instruments or after significant market regime shifts.
— 🛠️ SATS is a decision-support and trade-planning tool , not an automated bot. It identifies trend conditions, measures environmental quality, provides structured trade plans with R-based targets, and tracks outcomes — trade decisions and execution remain yours.
— 🌐 Works on all markets and timeframes. Volume-dependent features (Volume Z in TQI) auto-fall-back to ATR-based measurement when volume data is unavailable. Indicator

Precision Sniper [WillyAlgoTrader]🎯 Precision Sniper is an overlay indicator that generates entry signals only when a 10-factor confluence scoring engine reaches a configurable threshold — combining EMA alignment, RSI momentum, MACD direction, VWAP position, volume confirmation, ADX trend strength, DI directional pressure, and higher-timeframe bias into a single composite score (0–10). Every signal comes with automatic TP/SL placement using either ATR-based or structure-based stops, plus a progressive trailing stop system that ratchets the stop to breakeven after TP1 and to TP1 level after TP2.
The core principle: instead of using a single crossover or oscillator reading to trigger a signal, this indicator requires multiple independent market dimensions to agree simultaneously. An EMA crossover alone can produce false signals in choppy markets. RSI confirmation alone can be early or late. Volume alone doesn't tell you direction. But when EMA alignment + RSI momentum + MACD direction + VWAP position + volume + ADX + DI + HTF trend all point the same way — and the composite score exceeds your threshold — the probability of a genuine directional move is significantly higher than any single factor alone.
🧩 WHY THESE COMPONENTS WORK TOGETHER
Each factor in the scoring engine measures a different market dimension:
— EMA Fast/Slow crossover → detects the momentum shift that initiates the signal (trigger)
— EMA Trend → confirms the macro direction (structural filter)
— RSI → confirms momentum is in the non-extreme zone (avoids overbought entries)
— MACD histogram + MACD vs signal → confirms momentum is accelerating, not decelerating (2 factors)
— VWAP position → confirms price is on the right side of institutional fair value
— Volume → confirms market participation (not a low-liquidity wick)
— ADX + DI → confirms the market is trending AND directional pressure aligns (not ranging)
— HTF EMA bias → confirms the higher-timeframe trend agrees with the entry direction
These factors are deliberately orthogonal: EMA alignment can occur without volume, MACD can be bullish without RSI confirming, price can be above VWAP while ADX shows no trend. The scoring engine counts how many factors agree — only when enough dimensions align does the signal pass.
The entry signal feeds into the risk management system: structure-based SL provides a structurally meaningful stop (recent swing low/high), the R:R-based TPs create consistent reward targets, and the progressive trailing stop automatically manages the trade after entry — ratcheting protection as each target is hit. Without the trailing system, a signal that hits TP1 can still reverse to SL for a full loss. With it, after TP1 the worst case is breakeven.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ 10-factor confluence scoring engine (0–10 scale).
Every bar, both a bullish and bearish score are computed from 10 independent factors:
Bullish score calculation:
— 📐 EMA Fast > EMA Slow → +1.0 (short-term momentum is upward)
— 📏 Close > EMA Trend → +1.0 (price is above macro trend)
— 📊 RSI > 50 AND RSI < 75 → +1.0 (momentum is bullish but not overbought)
— 📈 MACD Histogram > 0 → +1.0 (momentum is positive)
— 📈 MACD Line > Signal Line → +1.0 (MACD has bullish crossover)
— ⚖️ Close > VWAP → +1.0 (price above institutional fair value)
— 📊 Volume > SMA(20) × 1.2 → +1.0 (above-average participation)
— 💪 ADX > 20 AND +DI > −DI → +1.0 (trending market with bullish pressure)
— 🌐 HTF EMA Fast > HTF EMA Slow → +1.5 (higher timeframe confirms direction)
— ✅ Close > EMA Fast → +0.5 (price is above the fast MA — minor confirmation)
Maximum bullish score: 10.0. Bearish score uses symmetric conditions (< instead of >, −DI > +DI, etc.). The HTF factor carries 1.5× weight because higher-timeframe alignment is the single strongest predictor of signal quality. The close > EMA Fast factor carries 0.5× because it's partially redundant with the crossover — it adds a minor confirmation that price didn't just touch the crossover but is clearly above it.
A signal fires when: EMA crossover occurs + price is on the correct side of both EMAs + RSI is not extreme + composite score ≥ Min Confluence Score (default 5 out of 10).
2️⃣ Structure-based stop loss with ATR fallback.
When enabled (default on), the stop loss is placed at the most structurally meaningful level:
For long trades:
— structureStop = recent swing low (over configurable lookback, default 10 bars) − 0.2× ATR padding
— atrStop = entry − ATR × SL multiplier
— finalStop = max(structureStop, atrStop) — the HIGHER (tighter) of the two
This "pick the tighter stop" logic ensures the SL is always at a meaningful structural level but never further than the ATR-based maximum. A minimum distance of 0.5× ATR is enforced to prevent unrealistically tight stops when the swing low is very close to entry.
For short trades: symmetric logic with min() instead of max(), swing high + padding.
When structure SL is disabled, the stop uses pure ATR: SL = entry ± ATR × multiplier.
3️⃣ Progressive trailing stop system.
After entry, the stop ratchets progressively as targets are hit:
— Initial state : SL at structure/ATR level
— After TP1 hit : SL moves to entry price (breakeven) — worst case is now 0 loss
— After TP2 hit : SL moves to TP1 level — worst case is now TP1 profit locked
— After TP3 hit : SL moves to TP2 level — TP2 profit locked, runner continues
The trailing stop line updates dynamically on the chart (orange dotted line with label). The SL hit check uses the pre-update trail value to prevent same-bar conflicts: if TP1 and the trail are both touched on the same candle, the TP1 hit processes first, then the trail is checked against its PRE-move value.
This progressive system means that once a trade reaches TP1, it can only end in breakeven or profit — never a loss. After TP2, the minimum outcome is TP1 profit locked.
4️⃣ Four presets with parameter scaling.
Each preset adjusts two key parameters:
— Conservative : min score floor 7/10, SL floor 2.0× ATR — requires strong consensus, wider stop
— Default : uses your manual settings
— Aggressive : min score ceiling 3/10, manual SL — accepts lighter consensus
— Scalping : min score ceiling 4/10, SL ceiling 1.0× ATR — lower bar, tighter stop
The preset modifies the effective score threshold and SL multiplier — the underlying 10 factors don't change, only how many must agree and how wide the stop is.
5️⃣ Volatility regime detection.
The dashboard displays the current volatility regime: volRatio = ATR(14) / SMA(ATR, 42). High (ratio > 1.3) = volatility above average — consider wider stops. Low (ratio < 0.7) = volatility compressed — watch for breakout. Normal = standard conditions. This provides at-a-glance context for how the current environment affects your settings.
6️⃣ EMA ribbon with macro trend overlay.
Three EMAs create a visual trend system:
— EMA Fast (default 9) = short-term momentum direction
— EMA Slow (default 21) = medium-term trend
— EMA Trend (default 55) = macro trend filter (shown as dot-style line)
The fast/slow ribbon fills green when fast > slow (bullish momentum) and red when fast < slow. Signals only fire when the EMA crossover occurs AND price confirms by closing on the correct side of both EMAs.
7️⃣ RSI extreme avoidance.
The signal engine requires RSI to be in a non-extreme zone: bullish signals require RSI > 50 AND < 75 (not overbought). Bearish signals require RSI < 50 AND > 25 (not oversold). This prevents the most common failure mode of momentum-based entries: buying into an already overbought market or selling into an oversold bounce.
8️⃣ Direction lock — one signal per trend leg.
After a buy signal fires, the next signal can only be a sell (and vice versa). This prevents signal clustering during strong trends where the confluence score might cross the threshold multiple times. If both buy and sell trigger on the same bar (rare edge case), buy takes priority (mutual exclusion).
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Core indicators: EMA Fast(9), EMA Slow(21), EMA Trend(55), RSI(13), MACD(12/26/9), VWAP(hlc3), Volume SMA(20), ADX/DI(14), HTF EMAs via request.security with + lookahead_on.
Step 2 — Confluence scoring: 10 factors evaluated independently for both bullish and bearish directions. Each factor adds its weight (1.0, 1.5, or 0.5) to the composite score. Max score = 10.0 per direction.
Step 3 — Signal trigger: EMA crossover (fast crosses slow) + price above/below both EMAs + RSI not extreme + composite score ≥ threshold + direction lock → confirmed signal on barstate.isconfirmed.
Step 4 — SL calculation: Structure mode: recent swing low/high ± 0.2× ATR padding, then pick the tighter of structure vs ATR stop. Minimum distance enforced at 0.5× ATR. Risk = |entry − SL|.
Step 5 — TP placement: TP1 = entry ± risk × tp1RR, TP2 = entry ± risk × tp2RR, TP3 = entry ± risk × tp3RR.
Step 6 — Trade monitoring: Each bar: check TP1/TP2/TP3 hits → ratchet trailing stop. Check SL hit against pre-ratchet trail value. Update visual lines and labels.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the EMA ribbon appears showing current trend
2. Select a preset (Conservative for swing, Scalping for 1–5M)
3. Wait for a "Long" or "Short" label — check the dashboard for score
4. Entry, SL, TP1, TP2, TP3 lines appear automatically
5. After TP1 → orange trailing stop line moves to breakeven
6. After TP2 → trail moves to TP1 level. After TP3 → trail moves to TP2.
👁️ Reading the chart:
— 🟢 Green EMA ribbon fill = bullish momentum (fast > slow)
— 🔴 Red EMA ribbon fill = bearish momentum
— ⚫ Dot-style line = EMA Trend (55) — macro direction filter
— 🟢 "Long" label below bar = confirmed buy signal
— 🔴 "Short" label above bar = confirmed sell signal
— 🔵 Blue solid line = entry price
— 🔴 Red solid line = stop loss
— 🟢 Green dashed lines = TP1, TP2, TP3
— 🟠 Orange dotted line = trailing stop (updates after each TP hit)
📊 Dashboard fields:
— Trend: current EMA alignment (Bullish / Bearish / Neutral)
— Score: confluence score (e.g., "7.5 / 10")
— Status: trade state (Active / TP1 ✓ — Trail / TP2 ✓ — Trail / No Trade)
— HTF Bias: higher-timeframe trend (Bullish / Bearish / Neutral)
— Volatility: regime (High / Normal / Low)
— RSI, ADX: current values
— Timeframe, preset, version
🔧 Tuning guide:
— Too many signals: increase Min Score (6–8), use Conservative preset, set HTF filter to a higher TF
— Too few signals: decrease Min Score (3–4), use Aggressive preset
— Stops too tight: increase SL ATR Multiplier (2.0–2.5), increase Swing Lookback (12–20)
— Stops too wide: decrease SL ATR Multiplier (1.0), enable Structure-Based SL
— Scalping 1–5M: Scalping preset, EMA Fast 5/Slow 13/Trend 34, TP1 0.75/TP2 1.5/TP3 2.5
— Swing 4H–1D: Conservative preset, EMA Fast 12/Slow 26/Trend 100, TP3 5.0+
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— HTF Trend Filter (default current TF): higher timeframe for bias. Leave empty = disabled.
— Preset (default Default): Conservative / Default / Aggressive / Scalping
🎯 Entry Engine:
— EMA Fast (default 9) / Slow (default 21) / Trend (default 55)
— Min Confluence Score (default 5): minimum score out of 10 to trigger signal
— RSI Length (default 13)
🛡️ Risk Management:
— ATR Length (default 14) / SL ATR Multiplier (default 1.5)
— TP1/TP2/TP3 R:R (default 1.0 / 2.0 / 3.0)
— Trailing Stop (default On): ratchets SL to BE after TP1, to TP1 after TP2
— Structure-Based SL (default On): recent swing low/high as stop anchor
— Swing Lookback (default 10): bars for structure SL detection
🎨 Visual:
— EMA ribbon, TP/SL lines, trailing stop line, background tint (all toggleable)
— Configurable signal label size (Tiny–Huge)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY / 🔴 SELL — ticker, price, SL, TP1, TP2, TP3, score, timeframe
— 🎯 TP1 HIT / TP2 HIT / 🏆 TP3 HIT — trade progress
— 🛑 SL HIT — stopped out
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. HTF data uses + lookahead_on for non-repainting values. TP/SL hits are checked only on bars after the entry bar (canCheckTPSL = bar_index > entryBar). A warmup period (max of EMA Trend length and 50 bars) prevents signals during insufficient data.
— 📐 The confluence score is not a win-rate predictor . A score of 8/10 means eight market dimensions agree on direction — it measures consensus quality. Higher scores correlate with stronger setups but do not guarantee outcomes.
— ⚖️ Structure-based SL picks the tighter of structure vs ATR stop — not the wider one. This means your actual risk per trade may be less than SL ATR Multiplier × ATR. Check the SL label on each trade for the actual stop level.
— 🔒 The trailing stop uses pre-update values for SL hit detection. If TP1 is hit and the trail moves to breakeven on the same bar, the SL check uses the old trail value — preventing false same-bar stop-outs.
— 📊 VWAP factor auto-falls back to close on instruments where ta.vwap returns na. Volume factor auto-passes (returns true) on instruments without volume data.
— 🔄 If buy and sell trigger simultaneously (extremely rare edge case), buy takes priority and the sell is suppressed.
— 🛠️ This is a signal and risk management tool , not an automated trading bot. It scores confluence, generates signals, places targets, and trails stops — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. All factors auto-adapt to available data. Indicator

Double Edge VP🔷 Double Edge VP
━━━━━━━━━━━━━━━━━━━
Two institutional-grade tools. One indicator. Zero compromise.
This script brings together a dynamic Visible Range Volume Profile and a
non-repainting Double Bottom / Double Top pattern detector into a single
seamless overlay.
If you trade with volume context and price action structure together, this
is the only indicator you need on your chart.
─────────────────────────────────────────────────────────────
🔹 MODULE 1 — VISIBLE RANGE VOLUME PROFILE (VRVP)
─────────────────────────────────────────────────────────────
Most volume profiles are anchored to a fixed session or a manually selected
range. This one is different. The VRVP dynamically recalculates on every
incoming tick based on the exact bars currently visible on your screen.
Scroll left. Zoom in. Zoom out. The profile instantly rebuilds itself to
show the volume distribution for whatever price range you are looking at.
This is how professional traders use volume — not locked to a calendar
session, but alive and responsive to the context they are analyzing.
📌 Point of Control (POC)
The price row with the highest traded volume across the entire visible range.
This is the most accepted price level — the market's center of gravity.
Displayed as a bold golden dashed line spanning the full visible range with
a price label on the right edge. Price has a strong tendency to return to
the POC after extended moves away from it.
📌 Value Area — VAH & VAL
The zone containing 70% of all volume traded in the visible range (percentage
is fully adjustable). Based on the standard Auction Market Theory convention
used by professional futures and equity traders worldwide.
• Price trading inside the Value Area = fair value, expect rotation
• Price trading outside the Value Area = potential imbalance and opportunity
VAH and VAL are rendered as cyan dashed lines with a semi-transparent fill
between them, making the zone immediately readable at any zoom level.
📌 High Volume Nodes (HVN)
Rows where volume is at or above a configurable threshold relative to the POC
(default 75%). These are areas where the market spent significant time and
accepted price — they act as strong support and resistance levels. Price
frequently slows down, consolidates, or reverses at HVNs. Highlighted in teal.
📌 Low Volume Nodes (LVN)
Rows where volume is at or below a configurable threshold relative to the POC
(default 20%). These are price inefficiency zones — areas the market moved
through quickly with minimal acceptance. Price tends to travel rapidly through
LVNs in both directions and often returns to fill them later. Highlighted in red.
📌 Bull / Bear Volume Split
Every profile row is colored by directional dominance — green when buyer-
initiated volume exceeds seller-initiated, red when the opposite is true.
This gives you immediate insight into who controlled each price level, not
just how much volume traded there.
📌 Volume Labels Inside Every Bar
Each profile row displays its actual volume quantity directly inside the bar
itself — for example: 13.926K, 437, 2.8K. This is rendered using Pine
Script's box text parameter rather than label objects, which means every
single row is labeled regardless of Pine's 50-label hard cap. No rows are
ever skipped or silently dropped.
📌 Net Delta Box
The row with the largest absolute imbalance between buyer and seller volume
receives a standalone colored overlay showing the signed delta value —
for example -142 or +3.2K. Red background indicates net selling pressure.
Green background indicates net buying pressure. This single number tells
you where the market's sharpest directional commitment occurred.
─────────────────────────────────────────────────────────────
🔹 MODULE 2 — DOUBLE BOTTOM & DOUBLE TOP DETECTOR (DB/DT)
─────────────────────────────────────────────────────────────
Double Bottoms and Double Tops are among the most reliable reversal patterns
in technical analysis — but most detectors repaint, trigger too early, or
draw signals before the pattern is actually confirmed. This one does not.
Every signal in this detector is generated only after three conditions are
simultaneously true:
1. Two comparable pivot lows (or highs) have been confirmed with full
symmetric lookback on both sides — meaning the pivot cannot be detected
until the required number of bars has passed after it.
2. The price difference between the two pivots falls within your defined
tolerance threshold, ensuring genuine structural similarity.
3. The neckline has been broken by a configurable number of consecutive
bar closes in the signal direction — filtering out wicks, spikes, and
intra-bar noise that would otherwise produce false entries.
Once all three conditions are met, the signal is final and will never be
removed or moved to a different bar.
📌 Double Bottom — Bullish Reversal
Detects two pivot lows of similar price within a configurable bar window.
The neckline is automatically set to the highest high between the two bottoms.
A Long signal fires after the required number of consecutive closes above
the neckline. The indicator draws the "W" pattern connectors, DB labels at
both pivot points, a Long ↗ entry label, and the TP level line.
📌 Double Top — Bearish Reversal
Mirror logic of the Double Bottom. Two pivot highs of similar price within
the bar window. The neckline is the lowest low between the two tops. A Short
signal fires after consecutive closes below the neckline. Draws the "M"
pattern connectors, DT labels, a Short ↘ entry label, and the TP level line.
📌 7 TP / SL Calculation Modes
Choose the method that fits your trading style:
Bottom-to-Neckline → TP projected by the full pattern height (classic AMT)
R/R Ratio → Fixed reward-to-risk multiple, e.g. 2:1 or 3:1
ATR → Levels scaled dynamically by Average True Range
Percent → Fixed percentage distance from entry price
Points → Fixed point distance using syminfo.mintick
Pips → Fixed pip distance for forex instruments
Ticks → Fixed tick distance for futures instruments
📌 Trailing Stop Loss
When enabled, the stop loss moves in the direction of the trade as price
moves favorably, locking in profit while never widening risk. The trail
distance is fixed as the original entry-to-SL gap so your initial risk
profile is always preserved.
📌 TP Visual — Offset Dotted Line
The Take Profit level is displayed as a two-part line: a faint dotted
connector from the signal bar leading to a bold dotted TP segment that
begins a configurable number of bars to the right. This keeps the area
directly around the signal bar clean and readable — the same presentation
style used in institutional strategy publications.
─────────────────────────────────────────────────────────────
📊 LIVE STATISTICS TABLE
─────────────────────────────────────────────────────────────
A performance tracking table displays in your chosen screen position and
updates in real time as new patterns are detected across full chart history.
Tracked separately for Double Bottoms and Double Tops:
→ Total patterns detected
→ Trades triggered (neckline-confirmed signals only)
→ TP hits and SL hits (including trailing stop results)
→ Win rate % — color coded green above 50%, red below
→ Bar distance between pattern points: Min / Average / Median / Max
→ Price % difference between pattern points: Min / Average / Median / Max
Table position is fully configurable: Bottom Right, Bottom Left, Top Right,
Top Left, Middle Right, or Middle Left.
─────────────────────────────────────────────────────────────
🔔 ALERTS
─────────────────────────────────────────────────────────────
Two alert conditions fire on bar close — one for Long signals (Double Bottom
confirmed) and one for Short signals (Double Top confirmed).
Both messages are fully customizable and include the standard PulseWire
dynamic placeholders {{ticker}}, {{interval}}, and {{close}} .
─────────────────────────────────────────────────────────────
⚙️ SETTINGS AT A GLANCE
─────────────────────────────────────────────────────────────
All inputs are organized into clearly labeled groups in the settings panel:
Profile → Rows, Value Area %, HVN threshold, LVN threshold
Visual → Profile width, POC / VA / fill / text / delta toggles
Colors → Full color control for every profile element
Detection → Pivot length, bar range, % tolerance, confirm bars,
enable/disable DB and DT independently
TP/SL → Mode selector, ATR settings, % / Points / Pips inputs,
trailing stop toggle, TP line offset and length
Visual → Colors for dots, necklines, signals, pattern lines,
label size, dot size, show/hide toggles
Table → Show/hide, position, text size
Alerts → Custom long and short alert message text
─────────────────────────────────────────────────────────────
📐 TECHNICAL TRANSPARENCY
─────────────────────────────────────────────────────────────
• max_boxes_count = 500 | max_lines_count = 500 | max_labels_count = 500
• VRVP runs only on barstate.islast — profile boxes are cleared and rebuilt
every tick using pooled drawing arrays
• DB/DT runs every bar using individually named persistent var handles —
the two modules share zero drawing objects
• Volume labels use box.new(text=...) to bypass the 50-label hard cap
• All DB/DT signals are strictly non-repainting — confirmed on bar close only
• Trailing stop ratchets forward only, never widens, preserves original risk
─────────────────────────────────────────────────────────────
📌 RECOMMENDED USE
─────────────────────────────────────────────────────────────
This indicator is designed for traders who combine volume analysis with price
action structure. The VRVP provides the context — where volume was accepted,
where it was rejected, and what the market considers fair value right now.
The DB/DT detector provides the trigger — confirmed structural reversals at
levels where the volume profile gives you a reason to act.
Best suited for:
→ Liquid instruments with reliable volume data
(Equities, Futures, Crypto spot markets)
→ Intraday and swing timeframes (1m through Daily)
→ Traders familiar with Auction Market Theory
→ Traders who want pattern detection without repainting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Use the VRVP to understand where the market has been.
Use the DB/DT detector to anticipate where it is going next.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Disclaimer: This indicator is for educational purposes only. Always practice proper risk management and combine with your own analysis before making trading decisions. Happy trading. Indicator

Indicator

AxMan Exhaustion Detection Reversal Rider1. The "Exhaustion" Phase (The Warning)
The strategy first looks for a Yellow or Orange Diamond. This isn't a signal to buy yet; it’s a warning that the current trend is dying.
The Logic: It looks for a massive spike in volume combined with an "over-extended" RSI.
The Visual: Imagine a car slamming on its brakes at high speed. The tires smoke (Volume Spike), and the car skids (RSI Oversold).
The Filter: This prevents you from entering a trade when the market is "boring" or slowly drifting. You only care about the moments of peak panic or peak euphoria.
2. The "Locked & Loaded" Window (The 12-Candle Rule)
Once that "Exhaustion" diamond appears, the chart background changes color. The strategy is now hunting for a trade.
The Logic: It gives the market exactly 12 candles to prove it can reverse.
Why 12? If the market doesn't reverse within 12 candles, the "exhaustion" was just a pause, and the old trend is likely to continue. This rule keeps you out of "dead zones" where the price just goes sideways.
3. The "Trigger" (The Fast Entry)
This is where the strategy beats traditional indicators. It doesn't wait for a fancy moving average crossover.
The Logic: As soon as a candle closes above the high of the previous candle (for a Long) or below the low (for a Short), it enters.
The Goal: It gets you in at the absolute "bend" of the trend. By the time most traders see a trend change, this strategy is already in profit.
4. The "Ride" (The Exit)
This strategy is not about "scalping" small profits. It is designed to stay in the trade as long as the trend is healthy.
The Exit Rule: It only closes the trade if:
Opposite Exhaustion: It sees the same "panic" signal happening on the other side (The Target).
Trend Break: The price closes on the wrong side of the 50 EMA (The Safety Net).
The Result: This allows you to "Ride the Wave" during massive moon-shots or market crashes, often staying in a single trade for days on the 4H chart.
Why It’s "Adaptive"
Because it uses standard deviations for volume and previous candle breaks for entry, it behaves correctly whether you are looking at a 15-minute chart (fast day trading) or a Daily chart (long-term investing). It scales its "expectations" based on the timeframe you choose.
Summary in one sentence: "We wait for the sellers to get exhausted, wait for the buyers to step in and break one high, and then we hold until the buyers get tired too." Strategy

Kalman Hull Trend Score [BackQuant]Kalman Hull Trend Score
Overview
Kalman Hull Trend Score is a trend-strength and regime-evaluation indicator that combines two ideas, Kalman filtering and Hull-style smoothing, then measures persistence of that filtered trend using a rolling score. The goal is to produce a cleaner, more stable trend read than typical moving average tools, while still reacting fast enough to be practical in live markets.
Instead of treating a moving average as a simple line you cross, this indicator turns the filtered trend into an oscillator-like score that answers: “Is the smoothed trend consistently progressing, or is it stalling and degrading?”
Core idea
The indicator is built from two components:
A Kalman-based smoothing engine that estimates price state and reduces noise adaptively.
A Hull-style construction that uses multiple Kalman passes to create a responsive, low-lag trend filter.
Once the Kalman Hull filter is built, a persistence score is calculated by comparing the current Kalman Hull value to many past values. The result is a trend score that rises in sustained trends and compresses or flips during deterioration.
Why Kalman instead of standard smoothing
Traditional moving averages apply fixed smoothing rules regardless of market conditions. A Kalman filter behaves differently, it is designed to estimate an underlying state in noisy data, adjusting how much it “trusts” new price information versus prior estimates.
This script exposes that behavior through two key controls:
Measurement Noise: how noisy the observed price is assumed to be.
Process Noise: how much the underlying state is allowed to evolve from bar to bar.
Together, these settings let you tune the balance between smoothness and responsiveness without relying on blunt averaging alone.
Kalman filter mechanics (conceptual)
Each update cycle follows the classic structure:
Prediction: assume the state continues, and expand uncertainty by process noise.
Update: compute Kalman Gain, then blend the new price observation into the estimate.
Correction: reduce uncertainty based on how much the filter accepted the new information.
When measurement noise is higher, the filter becomes more conservative, smoothing harder. When process noise is higher, the filter adapts faster to regime changes, but can become more reactive.
Check out the original script:
Kalman Hull construction
The “Hull” component is not a standard HMA built from WMAs. Instead, it recreates the Hull idea using Kalman filtering as the smoothing primitive. The structure follows the same intent as HMA, reduce lag while keeping the line smooth, but does it with Kalman passes:
Apply Kalman smoothing over multiple effective lengths.
Combine them using the Hull-style weighting logic.
Run the combined output through another Kalman pass to finalize smoothing.
The result is a Kalman Hull filter that aims to track trend with less jitter than raw price, and less lag than slow averages.
Another Kalman Hull with Supertrend
Trend scoring logic
The trend score is computed by comparing the current Kalman Hull value to past Kalman Hull values over a fixed lookback range (1 to 45 bars in this script):
If current kalmanHMA > kalmanHMA , add +1
If current kalmanHMA < kalmanHMA , add -1
This produces a persistence score rather than a simple direction signal. Strong trends where the filter keeps advancing will accumulate positive comparisons. Weak trends, chop, or reversals will cause the score to flatten, decay, or flip negative.
Interpreting the score
Read the score as trend conviction and persistence:
High positive values: bullish persistence, the filtered trend is progressing consistently.
Low positive values: trend exists but is fragile, progress is slowing.
Near zero: indecision, range behavior, frequent challenges to structure.
Negative values: bearish persistence or sustained deterioration in the filtered trend.
The rate of change matters:
Score expansion suggests trend is gaining traction.
Score compression often signals consolidation or exhaustion.
Fast flips usually accompany regime transitions.
Signal thresholds and regime transitions
User-defined thresholds convert the score into regimes:
Long threshold: score must exceed this level to confirm bullish persistence.
Short threshold: a crossunder of the score triggers bearish regime transition.
This is intentionally conservative. Long bias is maintained while the score holds above the long threshold. Short transitions are event-triggered on breakdown via crossunder, helping avoid constant flipping during minor noise.
Signals are only plotted on regime changes (first bar of the flip), keeping them clean for alerts and backtests.
Visual presentation
The indicator provides multiple layers depending on how you want to use it:
Kalman Hull Trend Score oscillator, color-coded by active regime.
Optional Kalman Hull filter plotted on the price chart for structure context.
Optional threshold reference lines for quick regime mapping.
Optional candle coloring and background shading for instant readability.
You can run it as a pure score panel or as a combined panel + on-chart trend overlay.
How to use in practice
Trend filtering
Favor long setups when the score remains above the long threshold.
Reduce directional aggression when score compresses toward zero.
Treat a short-threshold breakdown as a regime risk event, not just a signal.
Trend quality assessment
Rising score supports continuation trades and adds confidence to breakouts.
Flat or falling score warns that trend persistence is fading.
If price trends but score fails to expand, trend may be weak or liquidity-driven.
Trade management
Use the Kalman Hull line as dynamic structure reference on chart.
Use score deterioration to scale out before a full regime flip.
Use regime flips as confirmation for bias shifts rather than prediction.
Tuning guidelines
Measurement Noise
Higher: smoother filter, fewer false shifts, slower to adapt.
Lower: more responsive, more sensitive to microstructure noise.
Process Noise
Higher: adapts quicker to sudden changes, but can become twitchy.
Lower: steadier state estimate, but slower during sharp regime transitions.
A practical approach is to first tune measurement noise until the Kalman Hull line matches the “clean trend structure” you want, then adjust process noise to control how quickly it reacts when the regime genuinely changes.
Summary
Kalman Hull Trend Score transforms a Kalman-based Hull-style trend filter into a quantified persistence oscillator. By combining adaptive Kalman smoothing with low-lag Hull logic and a rolling comparison score, it provides a cleaner read on trend quality than basic moving averages or single-condition trend tools. It is best used as a regime filter, trend strength gauge, and structure-aware trade management layer.
Indicator

Volatility Trend Score [BackQuant]Volatility Trend Score
Overview
Volatility Trend Score is a trend-strength and regime-evaluation indicator built to measure directional persistence, not just direction. Most trend tools answer “up or down” using slope, crossovers, or a single condition. This indicator answers a more useful question for real trading: “How consistently is trend structure holding up once volatility is accounted for?”
It does this by building a volatility-scaled trailing structure (ATR-based) and then scoring how that structure evolves over a configurable lookback range. The output is a continuous score that rises when trend is persistent and decays when price action becomes noisy, mean-reverting, or unstable.
What it is measuring (the real goal)
This indicator is not trying to predict reversals. It is trying to quantify whether the market is behaving like a trend market or a chop market. It focuses on:
Persistence: does structure keep pushing in one direction bar after bar?
Stability: are pullbacks being absorbed without breaking the trailing structure?
Regime: is the market trending strongly enough to justify directional bias?
If you already have entries from other systems, this becomes a high-quality trend filter and trade management layer.
Core idea
At its foundation, the indicator combines two parts:
A volatility-adjusted trailing level derived from ATR and a user-defined factor.
A rolling persistence score that compares the current trail to prior trail values over a configurable loop window.
The trailing structure adapts to volatility and enforces one-sided movement, while the scoring logic converts that behavior into a numeric measure of trend quality.
Inputs and what they actually control
Average True Range Period (calc_p)
Defines the ATR window used to estimate volatility. A higher value smooths the volatility estimate and makes the trailing structure less reactive.
Factor (atr_factor)
Scales the ATR band size. Higher values widen the trailing band, filtering more noise, reducing flip frequency, and generally producing slower but more stable regimes.
For Loop Start/End (start/end)
Defines the comparison window used to build the score. It effectively sets how many historical trail values the current trail is compared against.
Shorter ranges produce a faster, more responsive score.
Longer ranges produce a slower, more “confidence-based” score that only climbs when trend persistence is sustained.
Long/Short Thresholds (thresL/thresS)
Convert a continuous score into regime thresholds.
Long threshold is a “trend quality requirement” for bullish bias.
Short threshold is used as a deterioration / breakdown trigger via crossunder logic.
Volatility-adjusted trailing structure
The trailing line is built from ATR bands around price:
up = close + ATR * factor
dn = close - ATR * factor
Then a trailing value is maintained with one-sided ratcheting behavior:
If dn rises above the previous trail, the trail steps up (ratchets upward).
If up drops below the previous trail, the trail steps down (ratchets downward).
This “ratchet” behavior is important. It prevents the trail from oscillating with small countertrend moves, forcing the trail to represent meaningful structure rather than micro-noise. On-chart, this trail often behaves like dynamic support/resistance in trends.
Why the trail is a better base than raw price
Price itself is noisy, and volatility changes the meaning of “big move” vs “small move.” By anchoring structure to ATR:
A move is interpreted relative to current volatility, not in absolute points.
High-volatility chop is less likely to be misread as a trend.
Trend structure is normalized across assets and timeframes more reliably.
This is why the score remains usable even when switching from low-vol assets to high-vol crypto pairs.
Trend scoring logic
The score is built by repeatedly comparing the current trailing value to trailing values from prior bars across a loop window:
If current trail > trail , add +1
If current trail < trail , add -1
This is a persistence test, not a momentum calculation. In a strong trend, the trail should generally keep stepping in the trend direction, so current values will be greater than many past values (bullish) or lower than many past values (bearish). In chop, the trail fails to progress meaningfully, so the score compresses, oscillates, or bleeds out.
How to interpret the score
Think of the score as a “trend conviction meter”:
High positive values: bullish persistence, structure is advancing consistently.
Low positive values: bullish bias may exist, but trend quality is weak or unstable.
Near zero: indecision, range behavior, or frequent structure challenges.
Negative values: bearish dominance or sustained deterioration in structure.
The speed of score change matters too:
Fast expansion suggests a fresh regime gaining traction.
Slow grind suggests mature trend continuation.
Rapid compression often signals consolidation, exhaustion, or a transition phase.
Signals and regime transitions
This script uses two different styles of conditions (important detail):
Long condition: score > long threshold (state-based, persistent while true).
Short condition: crossunder(score, short threshold) (event-based trigger).
That means:
Long bias can remain active as long as score stays above the long threshold.
Short regime flips are triggered at the moment the score breaks down through the short threshold.
On the chart, long/short shapes are only plotted when the regime flips (first bar of the change), not on every bar, using:
Long shape when signal becomes 1 and previous signal was -1
Short shape when signal becomes -1 and previous signal was 1
This keeps signals clean and avoids spam, making it usable for alerts and regime tagging.
Visual presentation
The indicator is designed to work both as a panel oscillator and as an on-chart overlay:
Score plot (oscillator): color reflects active regime state.
Optional trail on price: volatility-scaled structure line on chart.
Optional threshold reference lines: clear regime boundaries.
Optional candle coloring: makes regime obvious without reading the panel.
Optional background shading: useful for quick scanning and backtesting visually.
You can use only the score, only the trail, or both together depending on your workflow.
Practical use cases
1) Trend filter for systems
Use the score as a regime gate:
Allow long entries only when score is above the long threshold.
Avoid longs when score compresses toward zero or loses the threshold.
Treat the short threshold break as “trend is no longer healthy.”
This often improves system expectancy by reducing exposure during low-conviction conditions.
2) Trend quality grading
Instead of treating all uptrends as equal:
Higher score = higher persistence, better continuation odds.
Score plateau = trend losing pressure, continuation becomes less reliable.
Score decay while price rises = trend is getting weaker under the hood.
This is useful for position sizing or deciding whether to add to winners.
3) Trade management and exits
Two complementary tools exist here:
Trail line can act as a dynamic stop reference or structure invalidation level.
Score behavior can be used to scale out when persistence fades (before a full flip).
Many traders use the trail for “hard structure” and the score for “soft deterioration.”
4) Breakout confirmation vs fakeouts
A breakout that immediately fails to build score is often low quality.
Healthy breakouts usually come with score expansion as structure advances.
Fakeouts often revert quickly, score fails to climb, and regime stays unstable.
Tuning guidelines
These are general behaviors you can expect when adjusting settings:
Higher ATR period and factor: slower regimes, fewer flips, cleaner structure.
Lower ATR period and factor: faster reaction, more sensitivity, more noise risk.
Longer loop range: score becomes more “confidence-based,” slower to change.
Shorter loop range: score becomes more “tactical,” faster but more jittery.
A good way to tune is to pick the trail behavior first (ATR period and factor), then tune the score window (loop) to match how quickly you want “trend conviction” to build.
Market behavior focus
Volatility Trend Score is most valuable in markets where volatility shifts frequently and fake trends are common, especially crypto. It is designed to:
Stay out of low-quality chop where most indicators whipsaw.
Quantify when volatility is being expressed directionally (constructive trend).
Provide a clean regime framework for filtering, alignment, and management.
Summary
Volatility Trend Score converts volatility-adjusted structure into a quantified measure of trend persistence. By combining an ATR-based trailing mechanism with a rolling comparison score, it provides a more reliable read on trend quality than single-condition indicators. It is best used as a regime filter, a trend strength gauge, and a trade management layer, helping you stay aligned with strong directional phases while avoiding low-conviction envir
Indicator

Zero-Lag ATR Trend [BackQuant]Zero-Lag ATR Trend
Overview
Zero-Lag ATR Trend is a volatility-adaptive trend-following overlay designed to identify directional market regimes with minimal delay while preserving structural clarity. The indicator combines a zero-lag moving average framework with a zero-lag volatility model to produce a trailing trend line that reacts quickly to meaningful price changes without becoming unstable or overly sensitive.
Unlike conventional ATR-based trend tools that rely on lagging averages and delayed volatility estimates, this indicator applies zero-lag logic to both the trend centerline and the volatility calculation. The result is a trend structure that aligns more closely with real-time price action while still maintaining the discipline required for trend continuation trading.
Core design philosophy
The core idea behind Zero-Lag ATR Trend is simple:
Reduce signal delay without sacrificing trend integrity.
Adapt dynamically to changing volatility regimes.
Provide a single, clean structure that defines trend direction, continuation, and invalidation.
Instead of stacking multiple indicators, the script builds a complete trend framework from two tightly integrated components: a zero-lag trend spine and a zero-lag ATR trailing mechanism.
Zero-lag trend spine
The trend spine is constructed using a zero-lag moving average (ZLMA). This is achieved by applying a corrective step to a traditional moving average, effectively compensating for smoothing delay.
Conceptually, the process works as follows:
A base moving average is calculated from the selected price source.
That moving average is then passed through a zero-lag correction.
The correction pulls the line closer to current price without introducing noise.
This produces a trend line that reacts faster than standard EMA, SMA, or HMA signals, particularly during early trend acceleration phases. Multiple moving-average types can be used inside the zero-lag framework, allowing traders to fine-tune responsiveness based on asset behavior and timeframe.
Zero-lag volatility model
Volatility is measured using True Range, but instead of applying classic ATR smoothing, the indicator uses a zero-lag smoothing pass on the True Range itself.
This approach offers several advantages:
Volatility expands more quickly during impulse moves.
Volatility contracts faster during consolidations.
Band width adjusts in near real-time to changing conditions.
The smoothed zero-lag ATR is multiplied by a user-defined factor to create adaptive upper and lower boundaries around the trend spine. These boundaries define how much counter-movement price is allowed before the trend structure is invalidated.
Volatility-aware trailing structure
The trailing output is the defining feature of the indicator. It behaves as a one-directional trailing structure:
In bullish conditions, the trailing line can only move upward.
In bearish conditions, the trailing line can only move downward.
Minor pullbacks inside the volatility envelope do not flip the trend.
This logic prevents the indicator from reacting to shallow retracements and focuses instead on structural trend changes. Because the trailing behavior is volatility-scaled, the indicator remains stable during high volatility while still responding promptly during regime shifts.
Trend flips and regime transitions
Trend direction is determined by changes in the trailing structure itself rather than raw price crosses. A trend flip occurs only when price movement is strong enough, relative to current volatility, to force the trailing line to reverse direction.
This means:
Bullish flips represent genuine transitions into upward regimes.
Bearish flips represent genuine transitions into downward regimes.
Sideways noise is largely filtered out.
As a result, the indicator is well suited for identifying medium-to-long trend phases rather than short-term oscillations.
Visual structure and chart clarity
The visual design is intentionally minimal and functional:
The main trailing line is color-coded by trend direction.
An optional ribbon or cloud reinforces directional bias.
Optional candle coloring aligns price bars with the active trend.
These elements allow traders to assess trend state instantly without interpreting multiple signals or overlays.
How to use for trend following
Trend bias
Maintain a bullish bias while price holds above the trailing line.
Maintain a bearish bias while price holds below the trailing line.
Entries
Trend flips can be used as initial directional entries.
Pullbacks toward the trailing line often act as continuation opportunities.
Momentum confirmation can be layered on top for additional confluence.
Trend management
The trailing line naturally functions as a dynamic stop reference.
As long as price respects the trailing structure, the trend remains valid.
A flip in direction signals a full regime transition rather than a minor correction.
Why zero-lag matters for trend trading
Traditional trend indicators often react late, especially during fast expansions, resulting in delayed entries and early exits. By reducing lag in both the trend calculation and the volatility model, Zero-Lag ATR Trend aims to capture a larger portion of directional moves while maintaining consistency and discipline.
This makes it particularly effective for momentum-based trend following, breakout continuation strategies, and traders who prioritize staying aligned with dominant market structure rather than predicting reversals.
Summary
Zero-Lag ATR Trend is a complete trend-following framework built around responsiveness, adaptability, and clarity. Its zero-lag architecture allows it to respond earlier to meaningful price changes, while its volatility-aware trailing logic ensures that trends are only invalidated when structure truly breaks. The result is a clean, intuitive tool that supports disciplined trend participation across assets and timeframes.
Indicator

Lakshmi - Low Volatility Range Breakout (LVRB)⚡️ Overview
The Low Volatility Range Breakout (LVRB) indicator is designed to identify consolidation phases characterized by suppressed volatility and generate actionable signals when price breaks out of these ranges. The underlying premise is rooted in the market principle that periods of low volatility often precede significant directional moves—volatility contraction leads to expansion.
Important Note on Optimization: The default parameter settings of this indicator have been specifically optimized for BTCUSDT on the 2-hour (2H) timeframe. While the indicator can be applied to other instruments and timeframes, users are encouraged to adjust the parameters accordingly to suit different trading conditions and asset characteristics.
This indicator automates the detection of "quiet" accumulation/distribution zones and provides clear visual cues and alerts when a breakout occurs.
⚡️ How to Use
1. Add the indicator to your chart. Default settings are optimized for BTCUSDT 2H.
2. Wait for a gray box to appear—this indicates a qualified low-volatility range is forming.
3. Monitor for breakout signals:
• LONG (green triangle below bar): Price broke above the range. Consider entering a long position.
• SHORT (red triangle above bar): Price broke below the range. Consider entering a short position.
4. Set alerts using "LVRB LONG" or "LVRB SHORT" to receive notifications on confirmed breakouts.
5. Adjust parameters as needed for different instruments or timeframes.
Tip: Combine with volume analysis or trend filters for higher-probability setups.
⚡️ How It Works
1. Low Volatility Bar Detection
A bar is classified as "low volatility" when it meets the following criteria:
• True Range (TR) is at or below the average TR (Simple Moving Average) multiplied by a user-defined threshold.
• (Optional) Candle Body is at or below the average body size multiplied by a separate threshold.
This dual-filter approach helps isolate bars that exhibit genuine compression in both range and directional commitment.
2. Range Box Formation
When consecutive low-volatility bars are detected, the indicator begins constructing a consolidation box:
• The box expands to encompass the high and low of qualifying bars.
• A minimum number of bars and a minimum fraction of low-volatility bars are required for the box to become "qualified" (active).
• A configurable tolerance allows for a limited number of consecutive non-low-vol bars within the sequence, accommodating minor noise without invalidating the range.
• If the box height exceeds a maximum threshold (defined as a multiple of the base ATR at sequence start), the range is invalidated.
3. Breakout Detection
Once a qualified range is established, the indicator monitors for breakouts:
• Wick Mode: Requires both a wick pierce beyond the range boundary AND a close outside the range.
• Close Mode: Requires only a close beyond the range boundary.
• (Optional) Breakout Body Filter: The breakout candle's body must exceed a multiple of the average body size at range formation.
• (Optional) Candle Direction Filter: Bullish breakouts require a green candle; bearish breakouts require a red candle.
Signals are displayed in real-time and confirmed upon bar close.
⚡️ Inputs & Parameters
• Volatility Window: Lookback period for calculating average TR and average body size.
• TR Multiplier: A bar's TR must be ≤ avgTR × this value to qualify as low-vol.
• Body Multiplier: A bar's body must be ≤ avgBody × this value (if body filter is enabled).
• Use Body Filter: Toggle the body size filter on/off.
• Min Bars in Box: Minimum number of bars required for a range to become qualified.
• Min Low-Vol Fraction: Minimum proportion of bars in the sequence that must be low-vol.
• Allowed Consecutive Non-Low-Vol Bars: Tolerance for consecutive bars that do not meet low-vol criteria.
• Max Box Height: Maximum allowed range height as a multiple of the base ATR.
• Breakout Mode: Choose between "Wick" (pierce + close) or "Close" (close only).
• Breakout Body Multiplier: Require breakout candle body ≥ avgBody × this value (1.0 = OFF).
• Require Candle Direction: Enforce green candle for LONG, red candle for SHORT.
⚡️ Visual Features
• Consolidation Boxes: Displayed in neutral (gray) color during formation. Upon a confirmed breakout, the box is colored green for bullish breakouts or red for bearish breakouts.
• Breakout Signals:
• LONG: Green upward triangle displayed below the price bar with "LONG" label.
• SHORT: Red downward triangle displayed above the price bar with "SHORT" label.
• Range Levels: Optional horizontal plots for the active range's high and low.
• Invalidated Boxes: Optionally retained in neutral (gray) color or deleted from the chart.
• Full Customization: Colors, transparency, and border width are all adjustable.
⚡️ Alerts
Two alert conditions are available:
• LVRB LONG: Triggered on a confirmed bullish breakout (bar close).
• LVRB SHORT: Triggered on a confirmed bearish breakout (bar close).
⚡️ Use Cases
• Breakout Trading: Enter positions when price escapes a well-defined low-volatility range.
• Volatility Expansion Plays: Anticipate increased volatility following periods of compression.
• Filtering Choppy Markets: Avoid trading during extended consolidation; wait for confirmed breakouts.
• Multi-Timeframe Analysis: Use on higher timeframes to identify major consolidation zones.
⚡️ Notes
• Best used in conjunction with volume analysis, trend context, or support/resistance levels for confirmation.
• Performance varies across instruments and timeframes; backtesting and parameter optimization are recommended.
⚡️ Credits
Developed by Lakshmi. Inspired by volatility contraction principles and range breakout methodologies.
⚡️ Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a guarantee of profits. Trading financial instruments involves substantial risk, and you may lose more than your initial investment. Past performance, whether indicated by backtesting or historical analysis, does not guarantee future results. The use of this indicator does not ensure or promise any profits or protection against losses. Users are solely responsible for their own trading decisions and should conduct their own research and/or consult with a qualified financial advisor before making any investment decisions. By using this indicator, you acknowledge and accept that you bear full responsibility for any trading outcomes. Indicator

Indicator

RSI+BOLLINGER (LONG & SHORT)This indicator combines two of the most popular tools in technical analysis, the Relative Strength Index (RSI) and Bollinger Bands (BB), to generate both long (BUY) and short (SELL) trading signals.
Strategy:
Entries (Buy/Short): Entry signals are based on the RSI.
A BUY is suggested when the RSI crosses above an oversold level (default: 29), indicating a possible upward reversal.
A SHORT is suggested when the RSI crosses below an overbought level (default: 71), indicating a possible downward reversal.
Exits (Position Closure): Exit signals are based on Bollinger Bands.
A long position is closed when the price crosses below the upper Bollinger Band.
A short position is closed when the price crosses above the lower Bollinger Band.
Key Features:
Cascade Filter: Includes a smart filter that prevents opening new consecutive trades if the price hasn't moved significantly in favor of a new entry, optimizing signal quality.
Automation Alerts: Generates detailed alerts in JSON format for each event (buy, sell, close), designed for easy integration with trading bots and automated systems via webhooks.
Fully Configurable: All parameters of the RSI, Bollinger Bands, and strategy filters can be adjusted from the indicator’s settings menu. Indicator

Fuzzy SMA with DCTI Confirmation[FibonacciFlux]FibonacciFlux: Advanced Fuzzy Logic System with Donchian Trend Confirmation
Institutional-grade trend analysis combining adaptive Fuzzy Logic with Donchian Channel Trend Intensity for superior signal quality
Conceptual Framework & Research Foundation
FibonacciFlux represents a significant advancement in quantitative technical analysis, merging two powerful analytical methodologies: normalized fuzzy logic systems and Donchian Channel Trend Intensity (DCTI). This sophisticated indicator addresses a fundamental challenge in market analysis – the inherent imprecision of trend identification in dynamic, multi-dimensional market environments.
While traditional indicators often produce simplistic binary signals, markets exist in states of continuous, graduated transition. FibonacciFlux embraces this complexity through its implementation of fuzzy set theory, enhanced by DCTI's structural trend confirmation capabilities. The result is an indicator that provides nuanced, probabilistic trend assessment with institutional-grade signal quality.
Core Technological Components
1. Advanced Fuzzy Logic System with Percentile Normalization
At the foundation of FibonacciFlux lies a comprehensive fuzzy logic system that transforms conventional technical metrics into degrees of membership in linguistic variables:
// Fuzzy triangular membership function with robust error handling
fuzzy_triangle(val, left, center, right) =>
if na(val)
0.0
float denominator1 = math.max(1e-10, center - left)
float denominator2 = math.max(1e-10, right - center)
math.max(0.0, math.min(left == center ? val <= center ? 1.0 : 0.0 : (val - left) / denominator1,
center == right ? val >= center ? 1.0 : 0.0 : (right - val) / denominator2))
The system employs percentile-based normalization for SMA deviation – a critical innovation that enables self-calibration across different assets and market regimes:
// Percentile-based normalization for adaptive calibration
raw_diff = price_src - sma_val
diff_abs_percentile = ta.percentile_linear_interpolation(math.abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff_raw = raw_diff / diff_abs_percentile
normalized_diff = useClamping ? math.max(-clampValue, math.min(clampValue, normalized_diff_raw)) : normalized_diff_raw
This normalization approach represents a significant advancement over fixed-threshold systems, allowing the indicator to automatically adapt to varying volatility environments and maintain consistent signal quality across diverse market conditions.
2. Donchian Channel Trend Intensity (DCTI) Integration
FibonacciFlux significantly enhances fuzzy logic analysis through the integration of Donchian Channel Trend Intensity (DCTI) – a sophisticated measure of trend strength based on the relationship between short-term and long-term price extremes:
// DCTI calculation for structural trend confirmation
f_dcti(src, majorPer, minorPer, sigPer) =>
H = ta.highest(high, majorPer) // Major period high
L = ta.lowest(low, majorPer) // Major period low
h = ta.highest(high, minorPer) // Minor period high
l = ta.lowest(low, minorPer) // Minor period low
float pdiv = not na(L) ? l - L : 0 // Positive divergence (low vs major low)
float ndiv = not na(H) ? H - h : 0 // Negative divergence (major high vs high)
float divisor = pdiv + ndiv
dctiValue = divisor == 0 ? 0 : 100 * ((pdiv - ndiv) / divisor) // Normalized to -100 to +100 range
sigValue = ta.ema(dctiValue, sigPer)
DCTI provides a complementary structural perspective on market trends by quantifying the relationship between short-term and long-term price extremes. This creates a multi-dimensional analysis framework that combines adaptive deviation measurement (fuzzy SMA) with channel-based trend intensity confirmation (DCTI).
Multi-Dimensional Fuzzy Input Variables
FibonacciFlux processes four distinct technical dimensions through its fuzzy system:
Normalized SMA Deviation: Measures price displacement relative to historical volatility context
Rate of Change (ROC): Captures price momentum over configurable timeframes
Relative Strength Index (RSI): Evaluates cyclical overbought/oversold conditions
Donchian Channel Trend Intensity (DCTI): Provides structural trend confirmation through channel analysis
Each dimension is processed through comprehensive fuzzy sets that transform crisp numerical values into linguistic variables:
// Normalized SMA Deviation - Self-calibrating to volatility regimes
ndiff_LP := fuzzy_triangle(normalized_diff, norm_scale * 0.3, norm_scale * 0.7, norm_scale * 1.1)
ndiff_SP := fuzzy_triangle(normalized_diff, norm_scale * 0.05, norm_scale * 0.25, norm_scale * 0.5)
ndiff_NZ := fuzzy_triangle(normalized_diff, -norm_scale * 0.1, 0.0, norm_scale * 0.1)
ndiff_SN := fuzzy_triangle(normalized_diff, -norm_scale * 0.5, -norm_scale * 0.25, -norm_scale * 0.05)
ndiff_LN := fuzzy_triangle(normalized_diff, -norm_scale * 1.1, -norm_scale * 0.7, -norm_scale * 0.3)
// DCTI - Structural trend measurement
dcti_SP := fuzzy_triangle(dcti_val, 60.0, 85.0, 101.0) // Strong Positive Trend (> ~85)
dcti_WP := fuzzy_triangle(dcti_val, 20.0, 45.0, 70.0) // Weak Positive Trend (~30-60)
dcti_Z := fuzzy_triangle(dcti_val, -30.0, 0.0, 30.0) // Near Zero / Trendless (~+/- 20)
dcti_WN := fuzzy_triangle(dcti_val, -70.0, -45.0, -20.0) // Weak Negative Trend (~-30 - -60)
dcti_SN := fuzzy_triangle(dcti_val, -101.0, -85.0, -60.0) // Strong Negative Trend (< ~-85)
Advanced Fuzzy Rule System with DCTI Confirmation
The core intelligence of FibonacciFlux lies in its sophisticated fuzzy rule system – a structured knowledge representation that encodes expert understanding of market dynamics:
// Base Trend Rules with DCTI Confirmation
cond1 = math.min(ndiff_LP, roc_HP, rsi_M)
strength_SB := math.max(strength_SB, cond1 * (dcti_SP > 0.5 ? 1.2 : dcti_Z > 0.1 ? 0.5 : 1.0))
// DCTI Override Rules - Structural trend confirmation with momentum alignment
cond14 = math.min(ndiff_NZ, roc_HP, dcti_SP)
strength_SB := math.max(strength_SB, cond14 * 0.5)
The rule system implements 15 distinct fuzzy rules that evaluate various market conditions including:
Established Trends: Strong deviations with confirming momentum and DCTI alignment
Emerging Trends: Early deviation patterns with initial momentum and DCTI confirmation
Weakening Trends: Divergent signals between deviation, momentum, and DCTI
Reversal Conditions: Counter-trend signals with DCTI confirmation
Neutral Consolidations: Minimal deviation with low momentum and neutral DCTI
A key innovation is the weighted influence of DCTI on rule activation. When strong DCTI readings align with other indicators, rule strength is amplified (up to 1.2x). Conversely, when DCTI contradicts other indicators, rule impact is reduced (as low as 0.5x). This creates a dynamic, self-adjusting system that prioritizes high-conviction signals.
Defuzzification & Signal Generation
The final step transforms fuzzy outputs into a precise trend score through center-of-gravity defuzzification:
// Defuzzification with precise floating-point handling
denominator = strength_SB + strength_WB + strength_N + strength_WBe + strength_SBe
if denominator > 1e-10
fuzzyTrendScore := (strength_SB * STRONG_BULL + strength_WB * WEAK_BULL +
strength_N * NEUTRAL + strength_WBe * WEAK_BEAR +
strength_SBe * STRONG_BEAR) / denominator
The resulting FuzzyTrendScore ranges from -1.0 (Strong Bear) to +1.0 (Strong Bull), with critical threshold zones at ±0.3 (Weak trend) and ±0.7 (Strong trend). The histogram visualization employs intuitive color-coding for immediate trend assessment.
Strategic Applications for Institutional Trading
FibonacciFlux provides substantial advantages for sophisticated trading operations:
Multi-Timeframe Signal Confirmation: Institutional-grade signal validation across multiple technical dimensions
Trend Strength Quantification: Precise measurement of trend conviction with noise filtration
Early Trend Identification: Detection of emerging trends before traditional indicators through fuzzy pattern recognition
Adaptive Market Regime Analysis: Self-calibrating analysis across varying volatility environments
Algorithmic Strategy Integration: Well-defined numerical output suitable for systematic trading frameworks
Risk Management Enhancement: Superior signal fidelity for risk exposure optimization
Customization Parameters
FibonacciFlux offers extensive customization to align with specific trading mandates and market conditions:
Fuzzy SMA Settings: Configure baseline trend identification parameters including SMA, ROC, and RSI lengths
Normalization Settings: Fine-tune the self-calibration mechanism with adjustable lookback period, percentile rank, and optional clamping
DCTI Parameters: Optimize trend structure confirmation with adjustable major/minor periods and signal smoothing
Visualization Controls: Customize display transparency for optimal chart integration
These parameters enable precise calibration for different asset classes, timeframes, and market regimes while maintaining the core analytical framework.
Implementation Notes
For optimal implementation, consider the following guidance:
Higher timeframes (4H+) benefit from increased normalization lookback (800+) for stability
Volatile assets may require adjusted clamping values (2.5-4.0) for optimal signal sensitivity
DCTI parameters should be aligned with chart timeframe (higher timeframes require increased major/minor periods)
The indicator performs exceptionally well as a trend filter for systematic trading strategies
Acknowledgments
FibonacciFlux builds upon the pioneering work of Donovan Wall in Donchian Channel Trend Intensity analysis. The normalization approach draws inspiration from percentile-based statistical techniques in quantitative finance. This indicator is shared for educational and analytical purposes under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Past performance does not guarantee future results. All trading involves risk. This indicator should be used as one component of a comprehensive analysis framework.
Shout out @DonovanWall
Indicator
