StealthTrail SuperTrend ML Pro [WillyAlgoTrader]🤖 StealthTrail SuperTrend ML Pro is an overlay indicator that builds on the adaptive SuperTrend core from StealthTrail and adds three layers of intelligence: an instrument profiling engine that classifies the market into Trending, Ranging, or Volatile regimes and auto-tunes all SuperTrend parameters accordingly; a 13-feature machine learning scoring system that evaluates every candidate signal on momentum, trend, volatility, structure, volume, HTF alignment, divergence, session quality, and regime context — producing a 0–100 confidence score; and a self-learning mechanism that tracks signal outcomes over time and dynamically adjusts the confidence gate to optimize signal quality. The result is a SuperTrend that configures itself, scores its own signals, and learns from its results.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A standard SuperTrend has fixed parameters that work well in one market regime and fail in another. Manually tuning ATR length, multiplier, and filters for each instrument and timeframe is time-consuming and becomes outdated when conditions change.
This indicator solves the problem through a three-layer intelligence stack:
Layer 1 — Regime classification → Auto-tuning: The instrument profiler continuously measures efficiency ratio (trend strength), autocorrelation (serial dependence), volatility clustering, and normalized volatility — classifying the market into TRENDING, RANGING, or VOLATILE. Each regime produces different optimal SuperTrend parameters. The auto-tuner interpolates ATR length, multiplier, cushion, cooldown, and RSI threshold using regime-weighted blending — so the SuperTrend self-configures for current conditions.
Layer 2 — ML signal scoring: Even with auto-tuned parameters, not every SuperTrend flip is a good trade. The 13-feature ML engine evaluates each flip against momentum, volume, trend efficiency, volatility shock, band distance, MACD, price structure, regime confidence, MTF alignment, ADX strength, RSI divergence, volume profile zone, and session quality. Each feature is normalized to 0–100, weighted, passed through a sigmoid function, and combined into a single confidence score. Signals below the confidence gate are rejected — they pass the classic SuperTrend logic but fail the multi-dimensional quality check.
Layer 3 — Self-learning gate: The ML confidence gate itself adapts over time. The system tracks each signal's outcome (win/loss evaluated after N bars using the ATR at entry for fair comparison). When the win rate exceeds 70%, the gate lowers (allowing more signals). When it drops below 50%, the gate raises (becoming stricter). A decay factor prevents old signals from dominating. This creates a feedback loop: the indicator learns which confidence level produces profitable signals on this specific instrument and timeframe.
Without auto-tuning, the SuperTrend uses static parameters. Without ML scoring, good and bad flips are treated equally. Without self-learning, the confidence gate is a fixed guess. Each layer eliminates a specific category of bad signals that the previous layer can't catch.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Instrument profiling and regime classification.
The profiler computes four metrics over a configurable lookback (default 100 bars):
— 📐 Efficiency Ratio : ER = |close − close | / sum(|close − close |, N). Measures net directional movement vs total path. ER → 1.0 = pure trend, ER → 0.0 = pure chop.
— 🔄 Autocorrelation : correlation between return and return over a sliding window. High positive autocorrelation = trending persistence. Near-zero = random. Negative = mean-reverting.
— 📏 Volatility Clustering : ratio of short-term ATR (20 bars) to long-term ATR (lookback). Values > 1.0 indicate a volatility spike (breakout or crash). Values < 1.0 indicate compression.
— 📈 Normalized Volatility : ATR / close × 100. Measures absolute volatility as percentage of price — allows cross-instrument comparison.
These are smoothed with EMA and combined into three regime scores:
— trendScore = ER × regimeSensitivity
— rangeScore = (1 − ER) × (1 − |autocorrelation|) × regimeSensitivity
— volatScore = clamp(volClustering − 1, 0, 2) × regimeSensitivity
The highest score determines the regime: TRENDING, RANGING, or VOLATILE. Regime confidence = highest_score / total_scores × 100%.
2️⃣ Regime-weighted auto-tuning (6 parameters).
Each SuperTrend parameter is computed as a weighted blend of regime-optimal values:
effectiveParam = wT × trendOptimal + wR × rangeOptimal + wV × volatileOptimal
Where wT, wR, wV are the normalized regime weights. The parameters and their regime-optimal ranges:
— ATR Length: Trending=10, Ranging=16, Volatile=21 (further scaled by normalized volatility)
— Base Multiplier: Trending=2.0, Ranging=3.2, Volatile=3.8 (scaled by normalized vol)
— Flip Cushion: Trending=0.05, Ranging=0.25, Volatile=0.15
— Signal Cooldown: Trending=2, Ranging=5, Volatile=3
— RSI Threshold: Trending=40, Ranging=52, Volatile=45
— RSI Length: derived as ATR Length × 0.9
— Adaptive Smoothing: ATR Length × 4.0
This means in a trending regime, the SuperTrend uses shorter ATR, lower multiplier (tighter bands), minimal cushion, and permissive RSI — catching trends early. In a ranging regime: longer ATR, wider multiplier, large cushion, strict RSI — avoiding chop. In volatile conditions: intermediate settings with wider bands to accommodate spikes.
3️⃣ 13-feature ML scoring engine.
Each feature is normalized to 0–100, multiplied by its weight, summed, normalized by total weight, and passed through a sigmoid function to produce the final 0–100 confidence score.
Features and their weights:
— 💪 F1: Momentum (RSI alignment with trend) — w=0.15
— 📈 F2: Volume Surge (volume / SMA ratio) — w=0.08
— 📐 F3: Trend Efficiency (ER × 100) — w=0.15
— ⚡ F4: Volatility Shock (inverted vol clustering) — w=−0.08 (negative = penalizes vol spikes)
— 📏 F5: Band Distance (sigmoid of close-to-band ATR distance) — w=0.10
— 📊 F6: MACD (normalized histogram vs ATR) — w=0.08
— 🏗️ F7: Price Structure (HH/HL for bull, LL/LH for bear over 10 bars) — w=0.08
— 🧠 F8: Regime Confidence (% confidence in current regime) — w=0.04
— 🌐 F9: MTF Confluence (aligned with HTF = 100, not = 0) — w=0.12
— 💪 F10: ADX Strength (ADX × 2.5, capped at 100) — w=0.10
— 🔀 F11: RSI Divergence (aligned div = 100, counter div = 10) — w=0.08
— 📊 F12: Volume Profile Zone (proximity to highest-volume bar) — w=0.06
— 🕐 F13: Session Quality (hour-based scoring for optimal trading sessions) — w=0.04
The raw weighted sum is normalized, then passed through: mlScore = 100 / (1 + exp(−0.08 × (normalizedScore − 50))). This sigmoid compresses extreme values and centers the output around 50.
All 13 weights plus the bias term are user-configurable — you can adjust how much each factor contributes. Negative weights penalize a factor (e.g., W4 = −0.08 means high volatility shock reduces the score).
4️⃣ Self-learning confidence gate.
The system maintains 5 pending signal slots. Each stores the entry price, direction, bar index, and ATR at entry. After the evaluation horizon (default 15 bars), the outcome is assessed:
win = (close − entryPrice) × direction > 0.5 × entryATR (profitable by at least half an ATR, using the ATR at entry time — not current ATR — for fair comparison)
A decay factor (0.98) is applied to historical totals before adding new results, preventing stale data from dominating. When total tracked signals ≥ 8:
— Win rate > 70% → gate decreases by 1.5 (more permissive)
— Win rate < 50% → gate increases by 1.5 (more restrictive)
— Gate is clamped to
The dashboard shows the current gate value, whether it's auto-adjusted, and the tracked win rate with sample size.
5️⃣ Multi-timeframe confluence with auto-HTF selection.
The indicator automatically selects the appropriate higher timeframe based on your current TF: 1M→15M, 5M→30M, 15M→1H, 1H→4H, 4H→D, D→W. Or you can manually specify the HTF.
Three strictness levels:
— Loose: MTF misalignment adds negative ML score but doesn't block
— Moderate: MTF misalignment reduces signal quality
— Strict: MTF misalignment hard-blocks the signal entirely
HTF trend is determined by EMA(20) vs EMA(50) on the higher timeframe.
6️⃣ Adaptive SuperTrend core (from StealthTrail).
The band calculation uses pre-computed interpolated ATR values (ATR bank at 9 fixed periods with lerp interpolation) for smooth adaptation to any auto-tuned ATR length. Same mechanics as StealthTrail: adaptive multiplier (ATR / SMA ratio), band ratcheting, flip cushion, and cooldown — but now all parameters are regime-driven.
7️⃣ Three-mode trailing TP/SL system.
Three SL modes: ATR (entry ± mult × ATR), Band (SuperTrend band as SL), Fixed % (percentage from entry).
Three trailing modes:
— ATR : trail at fixed ATR distance from price — simple, consistent
— Band : use the SuperTrend band itself as trailing stop — structurally anchored
— ATR → Band (hybrid) : start with tight ATR trail, switch to band when it catches up — best of both
The trail only ratchets in the profit direction (never moves away from price). TP1/TP2/TP3 hit markers (✓) appear on the chart. On TP3 or SL hit, the trade closes and lines are removed.
8️⃣ RSI divergence detection.
Scans for bullish divergence (price lower low, RSI higher low, RSI < 40) and bearish divergence (price higher high, RSI lower high, RSI > 60). Divergences aligned with the signal direction boost the ML score (F11 = 100). Counter-divergences penalize it (F11 = 10). Optional visualization as dots on the chart.
9️⃣ Volume profile zone proximity.
Tracks the highest-volume bar in the last 50 bars. Proximity to this bar's price level is scored: within 1.5× ATR = 100 (near institutional activity), further = proportionally lower. Signals near high-volume zones tend to have more follow-through.
🔟 Session quality scoring.
For intraday timeframes, each hour receives a quality score based on typical institutional activity: London/NY overlap (13–17 UTC) = 100, European session (8–12) = 80, US afternoon (18–20) = 70, Asian session (0–7) = 30. An optional kill zone filter suppresses all signals during specified hours.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Instrument profiling: ER, autocorrelation, vol clustering, normalized vol → EMA-smoothed → regime classification (TRENDING / RANGING / VOLATILE) with confidence %.
Step 2 — Auto-tuning: Regime weights blend optimal parameters for ATR length, multiplier, cushion, cooldown, RSI threshold/length.
Step 3 — SuperTrend calculation: Interpolated ATR from pre-computed bank → adaptive multiplier (ATR/SMA ratio) → upper/lower bands → ratcheting → flip detection with cushion + cooldown.
Step 4 — Classic filters: Momentum (RSI), volume, session, MTF hard-block (if strict).
Step 5 — ML feature extraction: 13 features normalized to 0–100 from current market state.
Step 6 — ML scoring: Weighted sum → weight normalization → sigmoid → 0–100 confidence score.
Step 7 — Signal decision: Classic filters pass AND (ML disabled OR mlScore ≥ gate) → confirmed signal.
Step 8 — Self-learning: Signal stored in pending slot → evaluated after horizon bars → win rate updated → gate adjusted.
Step 9 — TP/SL placement: SL from band/ATR/fixed% → TPs as ATR multiples → trailing stop ratchets per mode.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — Auto-Tune is ON by default, parameters self-configure
2. The SuperTrend band and Long/Short labels appear
3. Dashboard shows: trend, strength, regime, ML score, gate, win rate, TP/SL status
4. Enable ML Filter for quality scoring (off by default — enable after reviewing signal quality)
5. Self-Learning auto-adjusts the gate over time
👁️ Reading the chart:
— 🟢 Green band + "Long" label = confirmed bullish signal
— 🔴 Red band + "Short" label = confirmed bearish signal
— ⚫ Gray dot = classic filter blocked the flip
— 🟡 Yellow triangle = ML rejected the signal (score below gate)
— 🟢 Green dot below bar = bullish RSI divergence
— 🔴 Red dot above bar = bearish RSI divergence
— 📈 Regime badge = current market classification (📈 TRENDING / 📊 RANGING / ⚡ VOLATILE)
— 🟢 Green dashed = TP1/TP2/TP3, 🔴 Red dashed = SL, 🔵 Blue dotted = entry
— "TP1 ✓" / "SL ✗" labels = outcome markers
📊 Dashboard sections:
— Main: trend, signal, strength, ADX, HTF alignment
— 🤖 ML Engine: ML score, confidence gate (fixed or auto), win rate with sample size
— 🎯 Position: status (LONG/SHORT/FLAT), entry, SL (with trail mode icon), TP levels (✓ for hit), R:R ratio
— 🧠 Regime: classification + confidence %
🔧 Tuning guide:
— Start simple: Auto-Tune ON, ML OFF — let the regime engine handle parameters
— Add ML: Enable ML Filter after 50+ signals to see which score level produces winners
— Enable Self-Learning: after 100+ bars of ML being active — let the gate auto-calibrate
— Adjust weights: if you know your market (e.g., volume is unreliable on forex → set W2 to 0)
— Strict MTF: for higher-timeframe alignment — reduces signals, increases quality
— Trail Mode: Band for trend-following, ATR for scalping, ATR→Band for hybrid
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Auto-Tune (default On): regime-driven parameter self-configuration
— ATR Length / Base Multiplier : manual overrides when auto-tune is off
🧠 Adaptive Engine:
— Profiling Lookback (default 100): bars for regime classification
— Regime Sensitivity (default 1.0): scaling factor for regime scores
📐 Multi-Timeframe:
— MTF Confluence (default On): Auto/Manual HTF selection
— Strictness (default Moderate): Loose / Moderate / Strict
🤖 ML Signal Filter:
— Enable ML (default Off): activate 13-feature scoring
— Confidence Gate (default 21): minimum ML score to pass
— Self-Learning (default On): auto-adjust gate from tracked outcomes
— Evaluation Horizon (default 15 bars): outcome assessment window
— 13 individual weights + bias : fully configurable feature importance
🔍 Filters:
— Flip Cushion, Cooldown, RSI Momentum, Volume, Session Kill Zone
🎯 TP/SL:
— SL Mode (default Band): ATR / Band / Fixed %
— Trail Mode (default Band): ATR / Band / ATR → Band
— TP Levels (1–3): ATR multipliers (default 1.5 / 2.5 / 4.0)
🔔 Alerts
— 🟢 LONG / 🔴 SHORT — ticker, price, TF, band, ML score, ADX, HTF, SL, TP1, regime
— 🎯 TP1 / TP2 / 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. The confirmed trend direction is stored separately from the real-time calculation — signals only fire on closed bars. HTF data uses lookahead_off. A warmup period (max of profiling lookback and 55 bars) prevents signals during insufficient data.
— 🤖 The ML scoring is not machine learning in the neural network sense . It's a weighted linear model with sigmoid activation — a logistic regression analog. The 13 features are hand-crafted from market microstructure, and the weights are configurable by the user. There is no gradient descent, backpropagation, or training phase. The "self-learning" adjusts only the confidence gate threshold, not the feature weights.
— 📐 Auto-tuning produces different parameters on every bar as the regime shifts. The ATR length and multiplier change continuously — this is by design. If you prefer fixed parameters, disable Auto-Tune.
— ⚖️ The self-learning gate requires at least 8 tracked signals before it begins adjusting. With the decay factor (0.98), the effective sample is weighted toward recent signals. The gate moves slowly (±1.5 per adjustment) and is clamped to .
— 📊 Win rate evaluation uses ATR at entry time , not current ATR. A signal is a "win" if price moves > 0.5× entry ATR in the signal direction within the evaluation horizon. This prevents volatile periods from inflating win counts.
— 🔄 The pre-computed ATR bank (9 fixed periods with lerp interpolation) is a performance optimization that allows smooth ATR adaptation to any auto-tuned length without calling ta.atr() dynamically — which Pine Script doesn't support with variable-length arguments.
— 📏 Volume Profile Zone tracks the single highest-volume bar in the last 50 bars, not a full volume profile. It decays after 50 bars with no new volume peak.
— 🕐 Session scoring uses UTC-based hours. On daily or higher timeframes, session quality defaults to 50 (neutral) as intraday session distinctions don't apply.
— 🛠️ This is a signal scoring and analysis tool , not an automated trading bot. It classifies regimes, scores signals, tracks outcomes, and manages TP/SL — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume features auto-adapt to instruments without volume data. Indicator

Indicator

Adaptive SuperTrend Oscillator [QuantAlgo]🟢 Overview
The Adaptive SuperTrend Oscillator transforms the classic SuperTrend indicator into a normalized momentum score that adapts to changing market conditions. Instead of displaying a simple above/below signal on the price chart, it measures how far price has moved from the SuperTrend line and scales that distance against an Efficiency Ratio-driven ATR that automatically adjusts between trending and ranging environments. The result is a centered oscillator with dynamically calculated overbought and oversold thresholds, helping traders read the strength behind a trend rather than just its direction, across different markets and timeframes.
🟢 How It Works
The foundation of the indicator is the distance between the closing price and the SuperTrend line:
= ta.supertrend(active_multiplier, active_atr_length)
price_distance = close - supertrend_line
A positive distance means price is above the SuperTrend line, indicating a bullish condition. A negative distance indicates price is below it, reflecting a bearish condition. The raw distance alone is not directly comparable across instruments or timeframes, so the indicator normalizes it using an adaptive ATR.
The normalization layer is driven by an Efficiency Ratio, which measures how directionally efficient recent price movement has been. It compares the net price change over the lookback window against the total path length traveled:
price_change = math.abs(close - close )
path_length = math.sum(math.abs(close - close ), active_er_length)
efficiency_ratio = path_length != 0 ? price_change / path_length : 0.0
A high Efficiency Ratio means price is moving in a consistent direction with little back-and-forth. A low ratio indicates choppy, non-directional movement. This reading is then used to blend between a fast and slow ATR period:
adaptive_atr = efficiency_ratio * ta.atr(active_norm_fast) + (1.0 - efficiency_ratio) * ta.atr(active_norm_slow)
score = adaptive_atr != 0 ? price_distance / adaptive_atr * 100 : 0.0
During trending conditions the fast ATR period is weighted more heavily, allowing the score to move more freely. During choppy conditions the slow ATR period dominates, dampening the score and reducing low-conviction readings. The final score is expressed as a percentage of the adaptive ATR, making it directly comparable across different instruments and volatility environments.
Overbought and oversold levels are derived dynamically from the rolling standard deviation of the score itself rather than fixed values:
score_deviation = ta.stdev(score, 100)
ob_extreme = score_deviation * 3
ob_level = score_deviation * 2
os_level = -score_deviation * 2
os_extreme = -score_deviation * 3
This means the threshold levels expand during volatile periods and contract during quiet ones, keeping the overbought and oversold zones statistically consistent relative to recent score behavior.
🟢 Signal Interpretation
▶ Bullish Trend (Score Above Zero, Outside Neutral Zone, Green): When the score is positive and exceeds the neutral threshold, the oscillator confirms that price is above the SuperTrend line and momentum is directionally efficient enough to register. The score's gradient intensity reflects how far momentum has extended relative to the adaptive ATR baseline. The trend remains bullish until the score crosses back below zero or into the neutral zone.
▶ Bearish Trend (Score Below Zero, Outside Neutral Zone, Red): When the score is negative and falls below the neutral threshold, the oscillator confirms that price is below the SuperTrend line. A deeper negative score indicates stronger downside momentum relative to the normalization baseline. The trend remains bearish until the score crosses back above zero or into the neutral zone.
▶ Neutral Zone (Score Within Threshold, Grey): When the absolute score value is within the neutral threshold, the oscillator treats the reading as non-directional regardless of which side of zero it sits on. This filters out low-conviction conditions where the SuperTrend distance is small relative to the adaptive ATR, preventing the indicator from registering trend signals during consolidation or choppy price action.
▶ Overbought and Oversold Levels (2σ and 3σ Bands): When the score reaches the 2σ or 3σ bands, it indicates that momentum has extended significantly relative to its own recent history. These are not reversal signals by themselves, but they mark zones where the trend is stretched and worth monitoring for potential exhaustion.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" uses moderate SuperTrend sensitivity for swing trading on 4-hour and daily charts. "Fast Response" tightens the SuperTrend bands and shortens normalization windows for intraday use on 5-minute to 1-hour charts. "Smooth Trend" widens the SuperTrend bands and extends normalization windows for position trading on daily and weekly timeframes.
▶ Built-in Alerts: Seven alert conditions cover the full range of oscillator states. Trend transition alerts fire when the score crosses into bullish, bearish, or neutral territory. Separate alerts trigger when the score reaches the 2σ overbought or oversold levels and again when it reaches the more extreme 3σ levels, enabling graduated monitoring without requiring constant chart observation.
▶ Visual Customization: Six color presets (Classic, Aqua, Cosmic, Cyber, Neon, plus Custom) coordinate colors across the score line, ribbon fills, overbought/oversold bands, and optional bar coloring. The ribbon uses three fill layers between the score line and zero, each at increasing transparency, creating a gradient that visually represents the weight of momentum behind the current reading. Optional bar coloring applies trend state colors directly to price bars for quick multi-timeframe reference.
Indicator

Viprasol Multi-Timeframe Trend Signal EngineOverview
The Multi-Timeframe Trend Signal Engine is a comprehensive overlay indicator that combines SuperTrend signals, a 5-EMA trend ribbon, EMA cloud, chaos trend line, order blocks, and an RSI-based take profit system with a 6-timeframe ADX trend dashboard. The core system — originally developed by Zakaria Safri — is a mature, feature-rich trading toolkit. This version adds a confluence quantification layer that transforms the dashboard's six independent timeframe readings into a single scored consensus metric, turning passive multi-timeframe observation into an actionable alignment signal.
How It Works
SuperTrend Signal Engine:
A custom SuperTrend calculation generates buy and sell signals using ATR-based dynamic bands. All signals require bar-close confirmation to prevent repainting on confirmed bars. Two modes are available: "All Signals" shows every crossover, while "Filtered Signals" adds an EMA gate requiring price to be above (for buys) or below (for sells) the main EMA before a signal qualifies.
Multi-Timeframe ADX Dashboard:
The indicator fetches ADX trend quality from six timeframes (5m, 15m, 1H, 4H, 12H, Daily) using an anti-repaint security pattern (previous bar value with lookahead — confirmed bars only). Each timeframe is classified as Bullish, Bearish, or Neutral based on an adaptive threshold derived from the median ADX value multiplied by a configurable factor. This means trend classification adjusts to the instrument's own volatility regime rather than relying on fixed levels.
MTF Confluence Score (Viprasol Addition):
The six individual timeframe trend readings are aggregated into a Confluence Score ranging from 0 to 6. The score counts how many timeframes currently show a bullish ADX trend. A separate bear confluence count tracks bearish alignment independently. The score is color-coded in the dashboard: green at 5-6 (strong bullish consensus), yellow at 3-4 (mixed), red at 0-2 (weak or bearish-dominant). This transforms what would otherwise be six separate readings requiring manual interpretation into a single quantified alignment metric. Two dedicated alert conditions fire when 5 or more timeframes agree on direction, providing automated detection of high-confluence setups.
Trend Ribbon:
Five EMAs (20, 25, 35, 45, 55) form a color-coded ribbon. The ribbon is bullish when the fastest EMA leads and bearish when it trails, shifting state on crossover. It provides a visual trend context layer independent of the SuperTrend signal system.
EMA Cloud:
A 150/250 EMA cloud identifies longer-term structural trend direction. Green fill indicates bullish structure, red fill indicates bearish structure. This serves as a backdrop for assessing whether shorter-term signals align with the broader trend.
Chaos Trend Line:
An adaptive trend line using pivot-based detection with ATR channels. It tracks the prevailing trend using highest and lowest pivot levels and changes color on confirmed reversals, providing another independent trend perspective.
Order Blocks:
Structural order blocks based on pivot break-of-structure logic. Bullish order blocks form at swing lows when higher highs break structure; bearish order blocks form at swing highs when lower lows break structure. Boxes fade when price tests them and are removed when fully invalidated.
RSI Take Profit System:
A sequential TP system using RSI crossovers at configurable levels (default 70/85/100 for bullish, 30/15/5 for bearish). Each TP level only fires after the previous one has triggered within the current signal cycle, creating a staged exit framework. TP1 must trigger before TP2 becomes active, and TP2 before TP3.
Reversal Signals:
A 25-period RSI-based reversal detector that fires when RSI crosses above the oversold level or below the overbought level, using bar-close confirmation.
Risk Management Lines:
Visual-only TP and SL lines plotted relative to entry price. These are for reference only and do not execute trades.
Key Features
- SuperTrend buy/sell signals with bar-close confirmation (no repainting on confirmed bars)
- Two signal modes: All Signals and EMA-Filtered Signals
- 6-timeframe ADX trend dashboard (5m, 15m, 1H, 4H, 12H, Daily)
- MTF Confluence Score (0-6) quantifying multi-timeframe bullish/bearish alignment
- 5-EMA trend ribbon with directional color coding
- EMA 150/250 cloud for structural trend context
- Adaptive chaos trend line with pivot-based detection
- Structural order blocks with fade-on-test and auto-invalidation
- RSI-based sequential take profit system (TP1, TP2, TP3)
- Visual TP/SL risk management lines
- RSI reversal signals at extreme levels
- Channel breakout levels from pivot highs and lows
- Three candle coloring modes (Scalper RSI, Trend Ribbon, EMA Direction)
- RSI background zones for overbought/oversold visualization
- Configurable dashboard position and font size
- All visual elements individually toggleable
- 10 alert conditions with dynamic messages
How to Use
Reading the Dashboard:
Start with the MTF Confluence Score. A score of 5-6 out of 6 indicates strong multi-timeframe bullish alignment — the majority of timeframes from 5-minute through Daily are trending in the same direction. A score of 0-1 indicates strong bearish alignment. Scores of 3-4 represent mixed conditions where caution is warranted. The individual timeframe rows below the score show exactly where agreement and disagreement exist, letting you identify which timeframes are diverging.
Signal Workflow:
Use "Filtered Signals" mode for higher-quality entries that align with the main EMA direction. Use "All Signals" mode when you want to capture more frequent opportunities in ranging or transitional markets. Reversal signals (purple labels) flag potential exhaustion at RSI extremes. The sequential TP markers (TP1, TP2, TP3) provide staged exit targets based on RSI momentum progression.
Combining Confluence with Signals:
The confluence score is most valuable as a directional filter. A buy signal firing when the confluence score is 5 or 6 carries more weight than one firing at a score of 2. Similarly, a sell signal at confluence 0 or 1 has stronger multi-timeframe backing. This is the core analytical addition — rather than visually scanning six rows, you get a single number that quantifies alignment strength.
Suggested Starting Points:
- Scalping (1m-5m): Sensitivity 2.0, ATR Factor 8, Filtered mode
- Intraday (15m-1H): Sensitivity 2.5, ATR Factor 11, All Signals mode
- Swing (4H-1D): Sensitivity 3.0, ATR Factor 14, Filtered mode
Settings
Main Settings — Sensitivity (controls signal frequency), Signal Mode (All or Filtered), ATR Factor (band width)
Trend Settings — Toggle trend ribbon, EMA cloud, chaos trend line, order blocks; configurable main EMA period
Signal Settings — Show/hide buy-sell signals, candle coloring mode selection, RSI background zones, channel breakouts
Dashboard Settings — Show/hide dashboard, position selection, font size
Risk Management — Visual-only TP/SL lines, TP strength multiplier, individual TP level toggles
Alerts
1. Buy Signal — SuperTrend crossover buy confirmed at bar close
2. Sell Signal — SuperTrend crossover sell confirmed at bar close
3. Filtered Buy — Buy signal with price above main EMA
4. Filtered Sell — Sell signal with price below main EMA
5. Reversal Up — RSI crosses above oversold level
6. Reversal Down — RSI crosses below overbought level
7. Ribbon Turned Bullish — EMA ribbon state change to bullish (edge-detected, fires once on crossover bar)
8. Ribbon Turned Bearish — EMA ribbon state change to bearish (edge-detected, fires once on crossover bar)
9. Strong Bullish MTF Alignment — 5+ of 6 timeframes showing bullish ADX trend
10. Strong Bearish MTF Alignment — 5+ of 6 timeframes showing bearish ADX trend
All alerts include dynamic message variables: {{ticker}}, {{close}}, and {{interval}}.
Limitations & Disclaimer
- MTF data uses the anti-repaint pattern (previous bar value with lookahead) to avoid repainting on confirmed bars. The current bar's data updates in real-time until that bar closes.
- ADX trend classification uses an adaptive threshold (median ADX multiplied by a configurable factor). "Neutral" readings are relative to the instrument's recent volatility, not fixed levels. This means the same ADX value may be classified differently across instruments or time periods.
- The RSI TP system is sequential — TP2 only becomes active after TP1 fires, and TP3 after TP2. If TP1 never triggers during a signal cycle, later levels will not fire.
- Order blocks use a simplified break-of-structure method based on 3-bar pivots. They are structural levels, not institutional order flow data.
- The Risk Management TP/SL lines are visual references only — they do not place or manage trades.
- This indicator is for educational and analytical purposes only. It is not financial advice. Always use proper risk management and validate signals with your own analysis. Test on a demo account before live trading.
Credits & Attribution
This script is derived from "Multi-Timeframe Trend Indicator with Signals" v4.4 by Zakaria Safri. The original is a substantial, feature-rich indicator that provides the SuperTrend signal engine, 5-EMA trend ribbon, EMA cloud, chaos trend line, 6-timeframe ADX dashboard, order block detection, RSI sequential take profit system, TP/SL risk management lines, reversal signals, channel breakout levels, three candle coloring modes, volatility measurement, and 8 alert conditions. The vast majority of the analytical logic in this script is Zakaria Safri's work.
Viprasol's additions: MTF Confluence Score (aggregating 6 timeframe readings into a 0-6 quantified alignment metric with color coding), separate bear confluence tracking, MTF alignment alerts (firing at 5+ timeframe agreement), and ribbon trend change alerts using edge detection for single-bar precision. These additions layer a confluence quantification system on top of the original's multi-timeframe dashboard.
Published open-source per PulseWire House Rules governing derivative works of open-source scripts. Indicator

Volatility Regime Switch [Metrify]VRS is a regime classifier that tries to separate two things most indicators mix together: direction and tradability. It doesn’t just ask "is price above/below a line?". it estimates whether the market is currently behaving more like a trend regime or a noise/chop regime, then adapts its switching logic and trailing structure accordingly. The output is a state machine (bull/bear) with a volatility-normalized corridor, plus explicit markers for switch accepted vs switch rejected.
Core idea: switching should depend on regime
Most trend flip tools fail in choppy markets because they apply the same confirmation rules everywhere. VRS tries to avoid that by measuring a continuous regime score:
trreg ≈ how “trend-like” conditions are
nsreg ≈ how “noise-like” conditions are
That regime estimate is then used to:
shape the trailing band distance (wider in chop, tighter in trend),
change the required confirmation for a switch (more strict in noise), and
demand follow-through after a candidate switch (acceptance check).
Regime estimation: how it decides “trend-like” vs “noise-like”
The regime score is built from three normalized features, then blended using inverse-variance weighting again:
Efficiency ratio (ER): Measures directional efficiency: net displacement over a horizon vs total movement. Trends have higher efficiency; chop has lower.
ADX-like trend strength: A custom ADX calculation is normalized (adxn), giving a bounded “trend strength” component.
Volatility ratio (fast/slow): Compares fast ATR to slow ATR and normalizes it. This helps distinguish active expansion vs quieter conditions.
These three components are combined into trreg (0..1). Noise regime is nsreg = 1 - trreg.
The important part is it can behave differently when the market is structurally trending versus when it is structurally noisy.
The anchor + adaptive bands: how the corridor is built
VRS uses two EMAs:
a fast EMA (emaf)
a slower EMA (emas)
It then creates an anchor that interpolates between them based on regime:
when trend regime is strong (trreg high), the anchor leans toward the fast EMA (more responsive)
when noise regime is strong (nsreg high), it leans toward the slow EMA (more stable)
Band distance is bdist = volc * bmult, and bmult is also regime-dependent:
in noise, bmult becomes larger → bands widen → fewer false flips
in trend, bmult tightens → better trailing sensitivity
Finally, the trailing bands (fup, flo) use a classic "non-decreasing band" logic similar to trailing-stop structures: the band only moves in the favorable direction unless price invalidates it, preventing constant band oscillation.
Bias and conviction layer
A switch is not triggered merely by close above/below a band. VRS computes conviction, which mixes:
Intra-bar price action bias
Two normalized elements are used: CLV (close location value) inside the candle range and body direction/strength relative to candle range. Both are Z-scored and squashed (atan-based) to avoid extreme outliers dominating.
Trend bias
Difference between fast and slow EMA, normalized by volatility, then Z-scored and squashed.
Displacement breakout quality
If price breaks above fup or below flo, it computes a breakout 'distance' normalized by volatility, then converts it into a Z-score relative to recent breakout behavior (dbullz, dbearz)
These get blended into a conviction signal that is smoothed, and then compared against a dynamic trigger threshold built from the average + stdev of conviction magnitude. A flip should happen when price action + trend bias + breakout quality jointly exceed what is normal for this market recently.
Practical reading notes
VRS generally behaves best when read as "current regime context + boundary + switch events" rather than as a constant entry/exit engine. In trending conditions, the trail will tend to hug price more tightly and switches will be less frequent. In noisy conditions, the corridor widens and the script becomes more conservative, often producing rejected switch attempts rather than rapid flips.
The rejected-switch markers (yellow X) are explicit evidence that the script detected an attempted regime change but did not see enough acceptance. For discretionary use, those rejection points can be useful as information about failed break attempts or lack of follow-through.
This script is designed to be adaptive, but it still has structural constraints. It uses volatility normalization and regime weighting to reduce parameter brittleness, yet extreme regime changes (sudden volatility spikes, news-driven moves, illiquid gaps) can still cause behavior that looks late or 'overly strict', because acceptance and confirmation are intentionally conservative in high-noise conditions. Conversely, on very smooth trend legs, the trail can appear tight and switches may look clean, but that depends on how the chosen lengths match the instrument’s tempo.
Also, because this is a state machine with acceptance logic, you should expect situations where price briefly breaks a boundary and then returns—those are exactly the environments that produce rejected switches. The indicator surfaces that behavior explicitly instead of hiding it. Indicator

Alpha SuperTrend Signal [identityKa]Overview
The Alpha SuperTrend Signal is a highly optimized trend-following system designed to fix the inherent lagging issues found in traditional SuperTrend indicators. While standard SuperTrends use fixed ATR multipliers across all timeframes, this script features a proprietary Auto-Adaptive Sensitivity Engine. It dynamically adjusts its own mathematical parameters based on the chart's timeframe, ensuring rapid response times during intraday scalping while maintaining robust, noise-free structural integrity on macro swing charts.
The Auto-Adaptive Engine Logic
Standard SuperTrends often fail because a 3.0x multiplier is too slow for a 15-minute chart and too volatile for a Daily chart. This script solves that computationally:
Intraday Scalping (≤ 15m): The engine automatically drops the ATR multiplier to 1.8x, hugging the price action tightly to catch micro-reversals early.
Day Trading (≤ 60m): The engine adjusts the multiplier to a balanced 2.2x, filtering out mid-session noise while capturing the dominant daily trend.
Swing/Macro (≥ 4H): The engine defaults to a wider 2.6x to 3.0x multiplier to prevent premature stop-outs from standard market pullbacks.
(Note: Traders can disable the Auto-Adaptive engine in the settings and manually input their preferred fixed multiplier).
Flawless Visuals & Aesthetics
To maintain a clean, institutional-grade chart, the script features "Flawless Label Positioning." Instead of plotting BUY/SELL signals randomly above or below candle wicks (which often causes visual clutter during high volatility), the script mathematically anchors the signal labels directly to the exact pivot coordinate of the SuperTrend line itself. This creates a visually perfect and undeniable invalidation point.
HUD Dashboard & AI Trade Logic
The integrated on-chart panel evaluates the distance between the live price and the active SuperTrend line to output a mechanical suggestion:
Dangerous: Triggered whenever the current closing price enters within a 0.5 ATR threshold of the SuperTrend line. This mathematically indicates that the trend is actively being tested, stop-losses are vulnerable, and a structural flip is highly probable. Traders should exercise extreme caution and avoid entering new trend-continuation setups.
LONG / SHORT: Triggered when the price is trending safely in the direction of the SuperTrend (LONG for a green line, SHORT for a red line) and is comfortably outside the 0.5 ATR danger zone.
How to Use It
Traders should use the painted candlesticks and the Alpha ST Line to define their strict directional bias. When a new BUY or SELL label prints, wait for a pullback. Execute trades only when the AI Suggestion reads "LONG" or "SHORT," and use the step-line itself as a trailing stop-loss to manage risk mathematically. Indicator

Indicator

AI-SuperTrend (KNN Machine Learning)AI-SuperTrend (KNN Machine Learning)
▶️Overview
The AI-SuperTrend (KNN Machine Learning) is a trend-following indicator that integrates a K-Nearest Neighbors (KNN) classification engine into the classic SuperTrend algorithm. Rather than attempting to "predict" the future in the traditionally volatile and noise-heavy financial markets, this tool treats the market as a multi-dimensional state to be estimated.
By continuously sampling historical data, the engine identifies clusters of past conditions that mirror the present. It then analyzes the trend of those neighbors to deduce the "True State" of the current market, using this statistical consensus to validate SuperTrend signals and filter out deceptive market noise.
▶️Why KNN for Financial Markets?
In the noise-heavy environment of financial markets, complex parametric models like Support Vector Machines (SVM) or Deep Neural Networks often struggle with stability. These models frequently suffer from convergence issues during training, or they produce outputs that stagnate around the mean due to the low signal-to-noise ratio of financial data. Most critically, they are highly prone to overfitting, capturing random price fluctuations as if they were true alpha.
KNN offers a distinct advantage through its Robustness and Adaptability:
Non-parametric Nature:
KNN makes no underlying assumptions about the distribution of data, allowing it to adapt to non-linear and evolving market regimes.
Rolling Window Learning:
The model utilizes a rolling "Learning Window" that naturally aligns with the bar-by-bar execution of Pine Script. This approach ensures that the engine is always synchronized with the most relevant, recent market structures while remaining computationally efficient within the platform's resource constraints.
▶️Core Methodology: KNN and State Estimation
1. The KNN Engine
K-Nearest Neighbors is a non-parametric "Lazy Learning" algorithm. Instead of building a static model, it looks at the current market "Feature Vector" and searches the historical database for the K most similar instances.
Distance Metric: Uses the Minkowski Distance. This is adjustable via the p-parameter, where p=1 represents Manhattan distance and p=2 represents Euclidean distance.
Gaussian Weighting: Not all neighbors are equal. The script applies a Weighting kernel where neighbors closer to the current state carry significantly more weight in the final prediction than those further away.
2. State Estimation (Bayesian-like Approach)
The state estimation logic implemented in this script follows the methodology used by myself in the "KNN Machine Learning Momentum Indicator." By applying this approach to the SuperTrend framework, the indicator achieves a higher level of precision in trend validation.
Probability Calculation: The probability of a Bullish state is calculated as (Sum of Weights of Bullish Neighbors) divided by (Total Weights of all K Neighbors).
Synergistic Robustness: By combining the volatility-based boundaries of SuperTrend with the KNN state estimation, the system significantly improves robustness against market noise. A SuperTrend flip is only considered a "Major" signal if the AI confirms that the underlying market state has truly shifted, based on historical probability.
Confirmation: A signal is only triggered if the estimated probability exceeds the user-defined Prediction Threshold (e.g., 0.9 or 90%).
3. Sampling Stride (Efficiency and Diversity)
To balance computational load and data diversity within Pine Script's limits, the engine utilizes a Stride mechanism:
Computational Efficiency: Instead of checking every single bar in the lookback window, the script samples data at intervals defined by the Stride (e.g., every 15th bar).
Pattern Diversity: By skipping adjacent, highly correlated bars, the "Learning Window" covers a broader range of market structures. This ensures the KNN engine sees various types of volatility and price action rather than redundant near-term data.
▶️Key Features
Multi-Dimensional Feature Engineering
The AI analyzes a "Feature Space" consisting of:
RSI Momentum Clusters: Captures momentum across three different time horizons (Short, Medium, Long) to detect lead/lag convergence.
MA Deviations: Measures the "stretch" or distance from the mean using various Moving Average types (ZLSMA, HMA, etc.).
PCA Compression: An optional Dimensionality Reduction toggle that merges correlated features into 3 Principal Components. This reduces the "Curse of Dimensionality" and focuses the AI on the most impactful data trends.
▶️Parameter Guide
🔲SuperTrend Settings
ATR Length: The lookback period for volatility calculation.
Factor: The multiplier that determines the distance of the SuperTrend line from price.
🔲Machine Learning Engine
K-Neighbors (K): The number of historical patterns to compare. A smaller K is more sensitive to recent changes, while a larger K is more robust but may lag.
Learning Window Size: How far back in history the AI "remembers" or searches for neighbors.
Stride: The sampling interval. A stride of 15 means the AI learns from every 15th bar, increasing the effective historical range without hitting script calculation limits.
Prediction Threshold: The confidence level (0.1 to 1.0) required to trigger a signal. A value of 0.9 means the AI must be 90% certain based on historical weights.
🔲Feature Engineering
Feature MA Type: Choose the baseline for deviation (e.g., ZLSMA for zero-lag, HMA for speed).
Normalizing Window: The lookback for Z-Score normalization, ensuring all features are on the same scale (mean=0, std=1).
Minkowski Parameter (p): Controls the distance logic. p=1 is Manhattan, p=2 is Euclidean.
Shape Parameter: Controls the sensitivity of the Gaussian weighting. Higher values make the weights drop off more aggressively as distance increases.
▶️Visual Analytics
Major Signals (▲/▼): High-confidence trend changes confirmed by the AI. These are plotted only when the SuperTrend direction aligns with the AI's predicted direction and its probability exceeds the defined threshold.
Probability Labels: At every SuperTrend reversal point, the indicator displays a label showing the AI's estimated probability for that trend direction (e.g., "Pred 92%"). This allows for real-time visual assessment of the AI's confidence in the SuperTrend flip.
Major Signals: High-confidence trend changes confirmed by the AI.
ST Dots: Standard SuperTrend flips without full AI confirmation.
Dynamic Bar Color: A gradient representing the real-time AI confidence score.
Blue/Cyan: High Bullish Confidence.
Red/Pink: High Bearish Confidence.
Gray: Neutral or Indecisive state.
Disclaimer
Past performance does not guarantee future results. This indicator is a tool for statistical analysis and should be used in conjunction with a complete risk management strategy. Indicator

StealthTrail SuperTrend [WillyAlgoTrader]📡 StealthTrail SuperTrend is an overlay indicator that takes the classic SuperTrend concept and adds five layers of noise reduction: an adaptive multiplier that scales bands to current volatility, a flip cushion that requires price to push beyond the band by a configurable ATR distance before confirming a trend change, a cooldown timer that enforces a minimum gap between flips, an RSI momentum filter that blocks trend changes without directional confirmation, and a composite trend strength score (0–100) that quantifies how committed the current trend is. The result is a SuperTrend that stays in trends longer, flips less often in chop, and gives you a real-time confidence reading on every trend leg.
🧩 WHY THESE COMPONENTS WORK TOGETHER
The standard SuperTrend has one well-known problem: whipsaws. In ranging or choppy markets, price repeatedly crosses the band boundary, triggering rapid bullish→bearish→bullish flips that produce losing signals. The root causes are:
1. Fixed multiplier — the band width doesn't adapt when volatility contracts or expands, so the same multiplier is too tight in high-vol and too wide in low-vol
2. Instant flip — a single close beyond the band triggers a trend change, even if it's a minor wick-driven overshoot
3. No recovery time — the indicator can flip back on the very next bar, creating same-bar or next-bar whipsaws
4. No momentum context — the flip happens regardless of whether momentum actually supports the new direction
StealthTrail addresses each root cause with a dedicated mechanism:
Adaptive multiplier → solves #1 : bands automatically widen when ATR is above its average (high volatility) and tighten when below (low volatility), keeping the band distance proportional to current market conditions.
Flip cushion → solves #2 : price must close beyond the band by an additional cushion (configurable fraction of ATR) before the flip is accepted, filtering out marginal crossovers.
Cooldown timer → solves #3 : after a flip, the indicator ignores further flip attempts for N bars (default 3), preventing rapid back-and-forth in chop.
Momentum filter → solves #4 : a bullish flip requires RSI above a threshold, a bearish flip requires RSI below the symmetric threshold, confirming that momentum actually supports the direction change.
Trend strength scoring → provides context : combines price distance from band + RSI alignment into a 0–100 score, so you know whether the current trend is strong, fading, or about to flip.
These five mechanisms work as a pipeline: the adaptive multiplier sets the right band width → the cushion prevents marginal crossovers → the cooldown prevents rapid reversals → the momentum filter confirms directional support → and the strength score tells you how committed the trend is. Removing any one layer reintroduces the specific whipsaw pattern it was designed to prevent.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Adaptive volatility multiplier.
Instead of using a fixed ATR multiplier (classic SuperTrend), StealthTrail scales the multiplier dynamically:
adaptiveMult = baseMultiplier × (currentATR / SMA(ATR, adaptationPeriod))
Where currentATR = ta.atr(atrLength), and SMA(ATR) is the volatility baseline over the adaptation smoothing period (default 55 bars). The ratio currentATR / averageATR measures whether volatility is currently above (ratio > 1.0) or below (ratio < 1.0) its recent norm.
The adaptive multiplier is clamped between configurable min (default 1.0) and max (default 5.0) to prevent extreme values. When volatility spikes (e.g., news event), the multiplier increases → bands widen → the trend doesn't flip on a volatility-driven spike. When volatility compresses (consolidation), the multiplier decreases → bands tighten → the indicator catches the breakout earlier.
This can be toggled off for classic fixed-multiplier behavior.
2️⃣ Flip cushion — requires extra ATR distance beyond the band.
A standard SuperTrend flips the moment close crosses the band. StealthTrail requires:
Bullish flip: close > upperBand + cushion × ATR
Bearish flip: close < lowerBand − cushion × ATR
The cushion (default 0.15× ATR) creates a dead zone around the band boundary. Price must push meaningfully beyond the band — not just touch it — before a flip is accepted. This single mechanism eliminates a large portion of marginal crossover whipsaws where price briefly clips the band before returning.
Setting the cushion to 0.0 restores classic SuperTrend behavior (flip exactly at the band).
3️⃣ Signal cooldown timer.
After every confirmed trend flip, a counter starts. No new flip can occur for N bars (default 3). This prevents the most destructive whipsaw pattern: a bearish flip immediately followed by a bullish flip on the next bar (or vice versa), which generates two consecutive losing signals.
The cooldown is tracked as barsSinceFlip, incremented each bar, and checked before any flip is processed. Only when barsSinceFlip ≥ cooldownInput can a new flip occur. This is independent of the cushion — both must pass.
4️⃣ RSI momentum filter.
On every raw trend flip (band crossed + cushion passed + cooldown passed), an additional RSI check is applied:
Bullish flip requires: RSI(rsiLength) ≥ rsiThreshold (default 45)
Bearish flip requires: RSI(rsiLength) ≤ (100 − rsiThreshold) = 55
This is deliberately asymmetric around the center by design (threshold 45, not 50): a bullish flip only needs RSI ≥ 45 (slightly below center), meaning it passes unless momentum is actively bearish. A bearish flip only needs RSI ≤ 55. This permissive threshold blocks the worst counter-momentum flips without being so strict that it delays legitimate trend changes.
When the filter blocks a flip, the trend direction does not change and the band continues ratcheting in the original direction. An optional "Show Filtered Flips" setting displays a muted dot where a flip was blocked — useful for understanding filter behavior.
5️⃣ Composite trend strength score (0–100).
On every bar, a strength score is calculated from two components:
Distance score (0–50): How far price is from the SuperTrend band, measured in ATR units:
distScore = min(|close − band| / ATR × 20, 50)
A large distance means price is well away from the band — the trend has room before a potential flip.
Momentum score (0–50): How well RSI aligns with the current trend direction:
For bullish: momScore = min(max(RSI − 50, 0), 50)
For bearish: momScore = min(max(50 − RSI, 0), 50)
RSI reading that confirms the trend direction contributes up to 50 points.
Total: strength = round(min(distScore + momScore, 100))
Classification: Strong ≥ 70, Medium ≥ 40, Weak < 40. Displayed in the dashboard and included in alert messages. This gives you a real-time confidence reading: a Strong reading means price is far from the band with confirming momentum — the trend is well-established. A Weak reading means price is near the band or momentum is fading — a flip may be imminent.
6️⃣ Filtered flip visualization.
When "Show Filtered Flips" is enabled, a muted gray dot appears on the band at every point where a raw flip occurred but was blocked by a filter (momentum or volume). This is a transparency feature: instead of silently suppressing signals, the indicator shows you exactly where it intervened and what it filtered out. You can evaluate whether the filter saved you from a bad signal or delayed a good one.
7️⃣ Gradient fill between price and band.
The space between close and the SuperTrend band is filled with a directional gradient: bullish trends fade from green (near band) to transparent (near price), bearish trends fade from red to transparent. The gradient uses fill() with top/bottom color mapping — the visual intensity naturally increases as the band is further from price, creating an intuitive "strength of trend" visual without needing to read the dashboard.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — ATR calculation: ta.atr(atrLength) with a high-low fallback for early bars where ATR is unavailable.
Step 2 — Adaptive multiplier: If adaptive mode is on: multiplier = baseMultiplier × (ATR / SMA(ATR, adaptSmoothing)), clamped to . If off: multiplier = baseMultiplier (fixed).
Step 3 — Band calculation: upperBand = hl2 + multiplier × ATR. lowerBand = hl2 − multiplier × ATR. Bands are calculated from hl2 (midpoint) for symmetry.
Step 4 — Band ratcheting: In an uptrend, the lower band can only rise — it is set to max(current_lowerBand, previous_band). In a downtrend, the upper band can only fall — min(current_upperBand, previous_band). This ratcheting prevents the band from retreating during a trend, which would prematurely trigger a flip.
Step 5 — Flip detection: In an uptrend: if close < band − cushion × ATR AND barsSinceFlip ≥ cooldown → raw bearish flip. In a downtrend: if close > band + cushion × ATR AND barsSinceFlip ≥ cooldown → raw bullish flip. On flip, the band resets to the opposite band value and barsSinceFlip resets to 0.
Step 6 — Filter gate: If RSI momentum filter is on: bullish flip requires RSI ≥ threshold, bearish requires RSI ≤ (100 − threshold). If volume filter is on: volume must exceed SMA(volume, 20) × multiplier. Both must pass for the flip to become a confirmed signal. If either fails, the flip is recorded as "filtered" (visualizable) but the trend direction reverts — no signal is emitted.
Step 7 — Signal emission: Confirmed flip + barstate.isconfirmed + warmup check → Buy (▲) or Sell (▼) label appears. Strength score is calculated and updated.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator — the adaptive SuperTrend band appears immediately
2. Green band = bullish trend, red band = bearish trend
3. ▲ label below bar = confirmed buy (trend flipped bullish through all filters)
4. ▼ label above bar = confirmed sell (trend flipped bearish)
5. Check dashboard for strength score — Strong trends are more reliable
👁️ Reading the chart:
— 🟢 Green step-line = SuperTrend band in bullish mode (following lower band)
— 🔴 Red step-line = SuperTrend band in bearish mode (following upper band)
— 🟢 Large green dot on band = confirmed bullish flip
— 🔴 Large red dot on band = confirmed bearish flip
— ⚫ Gray dot on band (optional) = raw flip that was blocked by a filter
— 🟩🟥 Gradient fill = visual trend strength (denser = further from band = stronger trend)
— Background tint (optional) = overall trend direction shading
📊 Dashboard fields:
— Trend: current direction (Bullish / Bearish)
— Signal: last confirmed signal with bars elapsed
— Strength: 0–100 score with classification (Strong / Medium / Weak)
— Multiplier: current adaptive multiplier value (e.g., 2.83×)
— RSI: current RSI reading
— Timeframe and version
🔧 Tuning guide:
— Too many whipsaws: increase Flip Cushion (0.2–0.3), increase Cooldown (4–6), enable Momentum Filter
— Signals too late: decrease Flip Cushion (0.05–0.10), decrease Cooldown (1–2), lower Base Multiplier
— Bands too wide in low-vol: decrease Min Adaptive Mult (0.8), decrease Adaptation Smoothing (30–40)
— Bands too tight in high-vol: increase Max Adaptive Mult (5.0–6.0), increase Base Multiplier
— Ranging/choppy market: enable Momentum Filter, increase Cooldown, increase Cushion — all three work together to suppress chop signals
— Strong trending market: decrease Cushion (0.05), decrease Cooldown (1), disable Momentum Filter — let the indicator react faster to trend continuation
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— ATR Length (default 13): volatility measurement period
— Base Multiplier (default 2.5): base ATR multiplier for band width
— Adaptive Multiplier (default On): scale bands by current/average ATR ratio
— Adaptation Smoothing (default 55): SMA lookback for ATR baseline
🔍 Filters:
— Flip Cushion (default 0.15× ATR): extra distance beyond band required for flip
— Signal Cooldown (default 3 bars): minimum gap between flips
— Momentum Filter (default On): RSI confirmation for trend changes
— RSI Length (default 13) / RSI Threshold (default 45): momentum filter parameters
— Volume Filter (default Off): above-average volume confirmation
🔧 Advanced:
— Min Adaptive Mult (default 1.0): floor for adaptive scaling
— Max Adaptive Mult (default 5.0): ceiling for adaptive scaling
🎨 Visual:
— Band line, gradient fill, filtered flip dots, trend background (all toggleable)
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 BUY — ticker, price, band level, timeframe, strength score
— 🔴 SELL — same fields
Both support plain text and JSON webhook format. Bar-close confirmed, filter-gated, cooldown-enforced.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. Band ratcheting is deterministic — the band value on a closed bar never changes retroactively. A warmup period (max of ATR length, adaptation smoothing, and 50 bars) prevents signals during insufficient data.
— 📐 This is not a standard SuperTrend. The adaptive multiplier, flip cushion, cooldown, and momentum filter fundamentally change the signal generation logic. A classic SuperTrend flip would occur significantly earlier (or later, depending on volatility) than a StealthTrail flip — they are not interchangeable.
— ⚖️ The flip cushion and cooldown work independently . Both must pass for a flip to occur. In chop, the cooldown may block a flip even after the cushion is satisfied, or the cushion may prevent a flip even after the cooldown expires. This dual-gate design is intentional.
— 📊 Trend strength is a real-time reading , not a prediction. A strength of 85 means price is far from the band with confirming momentum right now — it does not predict how long the trend will continue.
— 🔄 "Filtered Flips" (gray dots) show where a trend change would have occurred in a classic SuperTrend but was blocked by the momentum or volume filter. This transparency helps you understand the filter's impact and tune the threshold accordingly.
— 📈 Volume filter auto-disables on instruments without volume data (many forex pairs). On these instruments, only the momentum filter, cushion, and cooldown provide noise reduction.
— 🛠️ This is a trend-following signal tool , not an automated trading bot. It identifies trend direction, scores trend strength, and generates filtered signals — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. The adaptive multiplier self-calibrates to any instrument's volatility profile. Indicator

SmartTrend Pro [WillyAlgoTrader]📡 SmartTrend Pro is an overlay indicator built around a custom trend detection algorithm — the Adaptive Volatility Trend Engine (AVTE) — that replaces the standard Supertrend approach with Ehlers Super Smoother filtering and Kaufman adaptive ATR bands. Every trend flip is scored by a multi-factor confluence system (0–100) before becoming a signal. The result is a trend-following tool that adapts to current volatility conditions, filters out low-confidence entries, and provides dynamic TP/SL levels — all with full anti-repaint protection.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A traditional Supertrend uses a simple moving average of True Range to calculate bands. This works in steady markets but produces false signals during volatility spikes and misses early reversals during compression. SmartTrend Pro replaces every component of this pipeline with an adaptive alternative, creating a system where each stage feeds the next:
Ehlers-filtered price → Kaufman-adaptive ATR → Volatility bands → Trend direction → Confluence scoring → Filtered signal → Risk levels
The Ehlers Super Smoother removes high-frequency noise from the price before the trend bands are calculated — this prevents the trend engine from reacting to random wicks. The Kaufman adaptive ATR widens bands when volatility is real (sustained directional movement) and tightens them during choppy, low-efficiency conditions — making the trend change threshold automatically adjust. The confluence scoring system then evaluates each trend flip against five independent market factors before allowing the signal to fire. And the TP/SL system freezes its risk distance at entry (using the ATR at signal time) so targets don't drift as volatility changes post-entry.
No single component here is sufficient on its own. An Ehlers filter without adaptive bands still produces false crossovers. Adaptive bands without scoring still trigger on weak trend flips. Scoring without frozen TP/SL creates drifting targets. The integrated pipeline solves all three problems simultaneously.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Adaptive Volatility Trend Engine (AVTE) — custom trend algorithm.
The AVTE replaces the standard Supertrend calculation at every stage:
Stage 1 — Price filtering: Instead of using raw price, the AVTE applies an Ehlers 2-pole Super Smoother to the source. The Ehlers filter uses the transfer function:
ss = c1 × (src + src ) × 0.5 + c2 × ss + c3 × ss
where c1 = 1 − c2 − c3, c2 = 2a × cos(√2 × π / period), c3 = −a², and a = exp(−√2 × π / period). This produces zero-lag frequency-domain filtering — it removes high-frequency noise without the phase distortion that a simple moving average introduces. The filter period is derived from the ATR period (ATR_period / 2, minimum 3).
Stage 2 — Adaptive volatility measurement: Instead of a fixed-length ATR, the AVTE uses a Kaufman Adaptive ATR. First, a standard ATR(period) is calculated. Then the Kaufman Efficiency Ratio (ER) is computed: ER = |close − close | / sum(|close − close |, period). The ER measures how much net directional movement exists relative to total path traveled — ranging from 0 (pure chop) to 1 (clean trend). The ER then modulates a smoothing constant: sc = (ER × (fast − slow) + slow)², where fast = 2/3 and slow = 2/31. The adaptive ATR blends: aATR = aATR + sc × (rawATR − aATR ). In trending conditions (high ER), the adaptive ATR reacts quickly to volatility changes. In choppy conditions (low ER), it smooths aggressively, preventing false band expansions.
Stage 3 — Band calculation and trend direction: Upper band = filtered_price + sensitivity × adaptive_ATR. Lower band = filtered_price − sensitivity × adaptive_ATR. Bands ratchet in the trend direction: the lower band can only rise (never fall) during uptrends, the upper band can only fall during downtrends. When close crosses above the upper band, trend flips bullish. When close crosses below the lower band, trend flips bearish. The trend line follows the lower band in uptrends, upper band in downtrends (step-line visualization).
The Sensitivity parameter (default 2.5) controls how far the bands sit from filtered price. Lower = tighter bands, more signals, faster reaction. Higher = wider bands, fewer signals, smoother.
2️⃣ Multi-confluence scoring system (0–100).
Every AVTE trend flip is evaluated against five independent market factors before becoming a signal:
Factor 1 — EMA alignment (±15 pts): Checks whether close > EMA(50) > EMA(200) for bullish alignment, or close < EMA(50) < EMA(200) for bearish. Full alignment = +15 (bull) or −15 (bear). No alignment = 0. This confirms the trend flip aligns with the broader trend structure.
Factor 2 — RSI position (±10 pts): RSI(14) between 50–70 = +10 (bullish momentum without overextension). RSI 30–50 = −10 (bearish). Extremes (>70 or <30) score 0 — avoiding signals at overbought/oversold levels where reversals are more likely.
Factor 3 — MACD histogram direction (±12 pts): MACD(12,26,9) histogram > 0 and rising = +12 (accelerating bullish momentum). Histogram < 0 and falling = −12 (accelerating bearish). This captures momentum acceleration, not just direction.
Factor 4 — Volume confirmation (0–8 pts): Volume > 20-period SMA × 1.2 = +8. This confirms institutional participation. Auto-disabled on instruments without volume data (forex).
Factor 5 — ADX strength (0–10 pts): ADX(14) > 25 = +10, ADX > 20 = +5. Confirms the market is trending, not ranging.
The base score starts at 50. Bullish factors add, bearish factors subtract. Final score is clamped to 0–100. A buy signal fires when the AVTE flips bullish AND score ≥ Min Signal Score (default 55). A sell signal fires when AVTE flips bearish AND score ≤ (100 − Min Signal Score), creating symmetric thresholds around 50. Signals with score ≥ 75 (buy) or ≤ 25 (sell) are classified as "Strong" and receive a distinct label.
3️⃣ Ehlers Super Smoother trend cloud.
A dual-band cloud system using two Ehlers Super Smoothers at different periods. The fast period depends on the Cloud Style setting:
— Adaptive: auto-adjusts between 13 and 55 based on current volatility — calculated as 34 × (1 + stdev(close, 20) / adaptive_ATR × 0.5)
— Fast: fixed at 21 (tight cloud for scalping)
— Smooth: fixed at 55 (wide cloud for swing)
— Minimal: fixed at 34 (single line, no fill)
The slow period = fast period × 2.618 (golden ratio). Cloud is bullish when fast > slow (green fill), bearish when fast < slow (red fill). The AVTE step-line is overlaid on the cloud for immediate trend-direction clarity. An optional trend tracer (EMA, default 233-period) provides institutional-level long-term bias.
4️⃣ Four-preset system with parameter scaling.
Presets modify three core parameters simultaneously using multipliers:
— Conservative : sensitivity × 1.4, ATR period × 1.3, min score floor 70 — fewer but higher-quality signals, for swing trading
— Balanced : no modification — default parameters, good for 15M–4H
— Aggressive : sensitivity × 0.7, ATR period × 0.8, min score ceiling 45 — more signals, faster entries
— Scalping : sensitivity × 0.5, ATR period × 0.6, min score ceiling 40 — optimized for 1–5M, tightest bands
Each preset adjusts the effective sensitivity, ATR length, and minimum score threshold proportionally, so one selection adapts the entire signal pipeline rather than requiring manual tuning of individual parameters.
5️⃣ Dynamic TP/SL with frozen risk distance.
Three stop-loss modes:
— ATR : SL distance = adaptive ATR × configurable multiplier (default 1.5×)
— Percentage : SL distance = fixed percentage of entry price
— Structure : SL distance = half the recent swing range (highest high − lowest low over swing lookback)
TP levels are calculated as multiples of SL distance: TP1 = SL × 1.5 (default), TP2 = SL × 2.5, TP3 = SL × 4.0. The SL distance is frozen at entry — once a signal fires, the risk distance is locked and does not change with subsequent volatility. This prevents TP/SL levels from drifting as ATR changes post-entry. TP hit markers (×) appear on the chart as each level is reached. An optional Chandelier Exit trailing stop follows price using the ATR multiplier, ratcheting in the profit direction.
6️⃣ Pullback signals within established trends.
In addition to trend-flip signals, the indicator detects pullback entries within an existing trend:
— Bullish pullback: AVTE trend is bullish (no flip), price retraces to EMA(pullback_sensitivity × 3), RSI(pullback_sensitivity) drops below 35 then starts rising — catching the bounce off trend support
— Bearish pullback: AVTE trend is bearish, price rallies to EMA, RSI exceeds 65 then starts falling
Pullback signals appear as small circles (distinct from the main Buy/Sell labels), providing additional entries within a confirmed trend direction. They are bar-close confirmed and warmup-protected.
7️⃣ Volatility gauge with statistical normalization.
The dashboard displays a real-time volatility reading (0–100%) calculated as: gauge = (ATR(10) − (SMA(ATR, 20) − StDev(ATR, 20))) / (2 × StDev(ATR, 20)) × 100, clamped to 0–100. This measures where current volatility sits relative to its recent statistical distribution: > 70% = High (above 1 standard deviation), 40–70% = Medium, < 40% = Low. This helps you assess whether the current environment suits your strategy: high volatility favors wider stops and fewer signals, low volatility favors tighter approaches.
8️⃣ Multi-timeframe trend panel (non-repainting).
The dashboard includes an MTF panel showing trend direction on 5M, 15M, 1H, 4H, and 1D — using close > EMA(200) with lookahead_on for guaranteed non-repainting. When most timeframes align in one direction, trend-flip signals in that direction have higher confluence.
9️⃣ Session detection.
The dashboard shows the current active trading session: Tokyo, London, New York, Sydney, or overlaps (London/New York, Tokyo/London). Sessions are calculated using UTC-based time windows. This helps you contextualize volatility: London/New York overlap is typically the highest-volume period, while off-hours have thinner liquidity.
🔟 Four optional filters.
Each filter can be independently toggled:
— Trend filter : only signals aligned with the Ehlers cloud direction
— Volume filter : only signals with volume EMA(10) > EMA(25) — auto-disabled for instruments without volume
— ADX filter : only signals when ADX > 20 (trending market)
— Momentum filter : only signals with MACD histogram aligned (positive + rising for buys, negative + falling for sells)
All filters default to Off — enabling them progressively reduces signal frequency while increasing average quality.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Ehlers filtering: Source price is passed through the 2-pole Super Smoother with period = max(round(ATR_period / 2), 3). This removes intrabar noise while preserving trend structure.
Step 2 — Adaptive ATR: Kaufman Efficiency Ratio is calculated over the ATR period. The ER modulates the smoothing speed of ATR: trending conditions → fast adaptation, choppy conditions → slow adaptation.
Step 3 — Band construction: Upper = filtered_price + sensitivity × adaptive_ATR. Lower = filtered_price − sensitivity × adaptive_ATR. Bands ratchet: lower band can only rise in uptrends, upper band can only fall in downtrends.
Step 4 — Trend detection: Close above upper band → bullish. Close below lower band → bearish. The trend line is the active band (lower in uptrends, upper in downtrends).
Step 5 — Confluence scoring: On every bar, five factors are evaluated and combined into a 0–100 score. On a trend flip bar, the score determines whether the signal qualifies.
Step 6 — Filter gate: If any enabled filter disagrees, the signal is suppressed.
Step 7 — Signal emission: Buy or Sell label appears on the confirmed bar. Score ≥ 75 / ≤ 25 → "Strong Buy/Sell".
Step 8 — TP/SL placement: Risk distance is calculated and frozen. TP1/TP2/TP3 are placed as R:R multiples. Labels persist on the right side of the chart. Hit markers appear as each level is reached.
📖 HOW TO USE
🎯 Quick start:
1. Select a preset matching your style: Scalping (1–5M), Balanced (15M–4H), Conservative (4H–1D)
2. Add the indicator to your chart — the AVTE trend line and cloud appear immediately
3. Wait for a Buy or Sell label — the score next to it tells you the confluence quality
4. Check the dashboard: trend direction, score, market state (trending/ranging), volatility, session
5. TP/SL levels appear automatically — manage the trade using the marked levels
👁️ Reading the chart:
— 🟩 Green cloud fill = bullish trend (Ehlers fast > slow)
— 🟥 Red cloud fill = bearish trend
— Step-line on the cloud = AVTE trend boundary (the level that must break for a trend flip)
— 🟢 "Buy" / "Strong Buy" label below bar = confirmed bullish signal
— 🔴 "Sell" / "Strong Sell" label above bar = confirmed bearish signal
— 🟢 Small circle below bar = pullback buy (trend continuation entry)
— 🔴 Small circle above bar = pullback sell
— Orange line = entry price | Red line = stop loss | Green lines = TP1/TP2/TP3
— × markers = TP hit confirmations
— HH/HL/LH/LL labels (optional) = market structure swing points
📊 Dashboard fields:
— Trend: current AVTE direction (Bullish/Bearish)
— Signal: last confirmed signal (Buy/Sell/Wait)
— Score: current confluence score (0–100)
— Market: ADX-based state (Trending > 25 / Ranging > 20 / No Trend)
— Volatility: statistical gauge (High/Medium/Low with percentage)
— Session: current active session (Tokyo/London/New York/Sydney/overlaps)
— MTF Panel: 5M/15M/1H/4H/1D trend direction (close vs 200 EMA)
🔧 Tuning guide:
— Too many signals: increase Min Score, enable filters, switch to Conservative preset
— Too few signals: decrease Min Score, switch to Aggressive/Scalping, lower Sensitivity
— Signals too late: lower Sensitivity (tighter bands), use Fast cloud style
— Too many false signals: enable ADX filter (filters ranging markets), increase Min Score to 65+
— Scalping 1–5M: use Scalping preset, ATR mode SL with multiplier 1.0–1.5, TP1 R:R 1.0–1.5
— Swing 4H–1D: use Conservative preset, ATR mode SL with multiplier 2.0–3.0, TP3 R:R 5.0+
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Trend Sensitivity (default 2.5): AVTE band distance — lower = more signals, higher = fewer
— ATR Period (default 21): volatility measurement lookback
— Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping
📡 Signal Tuning:
— Min Signal Score (default 55): minimum confluence to trigger signals
— Strong Signals Only (default Off): only show score ≥ 75
— Show Pullback Signals (default On): trend continuation entries
— Pullback Sensitivity (default 8): retracement detection lookback
☁️ Trend Cloud:
— Cloud Style (default Adaptive): Adaptive / Fast / Smooth / Minimal
— Trend Tracer (default Off): long-term EMA bias line (default 233)
🔍 Filters (all default Off):
— Trend Filter (cloud alignment) / Volume Filter / ADX Filter / Momentum Filter
🛡️ Risk Management:
— SL Mode (default ATR): ATR / Percentage / Structure
— SL ATR Multiplier (default 1.5×) / SL Percentage (default 1.0%)
— TP1/TP2/TP3 Risk:Reward (default 1.5 / 2.5 / 4.0)
— Trailing Stop (default Off): Chandelier Exit method
— Market Structure (default Off): HH/HL/LH/LL swing labels
🎨 Visual:
— Auto / Dark / Light theme
— Bar coloring: Trend Gradient / Signal Based / Momentum / None
— Background trend shading (default Off)
📊 Dashboard:
— Position, font size, MTF panel toggle
🔔 Alerts
— 🟢 Buy / Strong Buy — ticker, price, timeframe, score
— 🔴 Sell / Strong Sell — same fields
— 🎯 TP1 / TP2 / TP3 Hit — ticker, price
— 🛑 SL Hit — ticker, price
— ☁️ Cloud Cross Bullish / Bearish — ticker, timeframe
All alerts support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. All signals require barstate.isconfirmed. TP/SL distances are frozen at entry and do not change retroactively. MTF data uses + lookahead_on for non-repainting HTF values. A warmup period (minimum 200 bars or 3× ATR period) prevents signals during insufficient data.
— 📐 The AVTE is not a standard Supertrend . It replaces every component: Ehlers Super Smoother instead of raw price, Kaufman adaptive ATR instead of fixed ATR, ratcheting bands instead of simple ±ATR. The mathematics are described in detail above.
— ⚖️ The confluence score is not a win-rate predictor . A score of 75 means five independent market factors align strongly — it measures confluence quality, not outcome probability. Use it to prioritize, not to guarantee.
— 📊 The scoring system uses standard indicators (EMA, RSI, MACD, Volume, ADX) as confluence factors , not as independent signal generators. None of these indicators alone triggers a signal — they only contribute to the score that gates an AVTE trend flip.
— 🔧 Presets modify parameters proportionally. After selecting a preset, you can still adjust individual settings — the preset sets the starting point, your adjustments override it.
— 📏 TP/SL levels are frozen at entry . The SL distance calculated at the signal bar persists until the next signal — it does not drift with changing ATR. This is by design for consistent risk management.
— 🔄 Pullback signals are continuation entries , not reversal signals. They only appear within an established AVTE trend and require RSI reversion from oversold/overbought — catching bounces off trend support/resistance.
— 🛠️ This is a signal and analysis tool , not an automated trading bot. It generates signals, scores them, and visualizes TP/SL — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Volume filter auto-disables on instruments without volume data. Indicator

Adaptive MAD Supertrend | GForgeAdaptive MAD Supertrend | GForge
The Adaptive MAD Supertrend is a trend-following indicator built on the classic Supertrend framework, but with two core innovations that address well-known weaknesses in the original design: how volatility is measured, and how the indicator behaves across different market conditions.
The Problem With Standard Supertrend
The classic Supertrend uses ATR (Average True Range) as its volatility measure and a fixed multiplier. ATR squares its deviation calculations internally, which means a single spike candle — a news wick, a liquidation cascade — can temporarily blow the bands wide and either trigger a false flip or delay a valid one. On top of that, a fixed multiplier means the indicator behaves identically in a clean trending market and a choppy ranging one. It has no awareness of what the market is actually doing.
Innovation 1 — MAD Replaces ATR
This indicator uses Mean Absolute Deviation as its volatility measure instead of ATR or Standard Deviation.
MAD = mean( |close − mean(close, n)| , n )
The key difference is linearity. Each bar contributes its deviation to the average equally, without squaring. A spike candle influences the band width, but proportionally — it cannot disproportionately dominate the calculation the way it can in ATR or StdDev. The result is a more stable, consistent band width that responds to genuine volatility without overreacting to outlier bars.
An optional EMA smoothing layer can be applied to the raw MAD output before it scales the bands, which further stabilizes band width during volatile periods.
Innovation 2 — Kaufman Efficiency Ratio Scales the Multiplier
The Efficiency Ratio (ER), developed by Perry Kaufman, measures how efficiently price is moving:
ER = |net price change over n bars| / sum(|bar-to-bar changes|, n)
ER → 1.0: price moved efficiently in one direction — a clean trend
ER → 0.0: price moved a lot but went nowhere — chop and noise
The adaptive multiplier uses ER to scale band width dynamically:
adaptive_multiplier = Multiplier_Chop − ER × (Multiplier_Chop − Multiplier_Trend)
During a clean trend, the multiplier contracts toward your Trend setting — bands tighten and the trailing stop follows price closely, capturing more of the move. During choppy conditions, the multiplier expands toward your Chop setting — bands widen and the stop absorbs noise without flipping unnecessarily.
This means the indicator automatically adjusts its sensitivity to what the market is doing, rather than applying the same fixed behaviour to every bar.
Basis MA
The band centre line (basis) is fully configurable. Rather than raw hl2 like the classic Supertrend, any moving average from the menu can serve as the anchor — the band is built outward from it. The default is T3, a Tillson triple-smoothed MA that provides an extremely clean centre line with minimal lag overshoot. Other useful options include DEMA and TEMA for faster response, VWMA for volume-weighted anchoring, or RMA for higher timeframes.
How to Read It
Line colour: green/up colour = bullish trend, red/down colour = bearish trend
Trend fill: shaded area between price and the trailing stop — visual confirmation of which side of the line price is on
Inactive band: the faint dotted line on the opposite side shows where a flip would trigger if price reaches it
Signal diamonds: markers at each trend flip — below bar for long entries, above bar for short/cash exits
Notes
Optimised and tested on Bitcoin 1D. Performs well on trending instruments across higher timeframes (4H and above).
The MAD + ER combination is theoretically complementary: MAD handles what the band width is, ER handles how much of it to apply. They solve orthogonal problems.
As with all trend-following tools, performance degrades in prolonged sideways markets — the Chop multiplier setting mitigates this but does not eliminate it.
⚠️ Disclaimer
This indicator is a technical analysis tool provided for informational and educational purposes only. It is not financial advice, and nothing presented here should be construed as a recommendation to buy, sell, or hold any asset. Past performance does not guarantee future results.
Developed by GForge Indicator

Adaptive Volatility Trend [WillyAlgoTrader]Adaptive Volatility Trend (AVT) is a trend-following overlay indicator that dynamically adjusts its sensitivity to market conditions using the Kaufman Efficiency Ratio and ATR-based volatility bands.
Unlike static moving averages or fixed-width channels, AVT continuously adapts: it accelerates in strong directional moves and slows down during choppy, range-bound price action — reducing whipsaws where most trend indicators fail.
🔍 WHAT MAKES IT ORIGINAL
The core innovation is a self-tuning mechanism built on three adaptive layers:
1. Kaufman Efficiency Ratio (ER) as an adaptive engine. The ER measures how "efficient" price movement is — the ratio of net directional change to total path traveled over N bars. An ER near 1.0 means price moved in a clean straight line (strong trend); near 0.0 means it went sideways with lots of noise. AVT uses the smoothed ER to dynamically blend between a fast constant (2-period EMA speed) and a slow constant (30-period EMA speed), producing an Adaptive Moving Average that responds quickly in trends and becomes sluggish in chop.
2. ER-scaled ATR bands. The volatility channel doesn't just use raw ATR × multiplier. It incorporates the Efficiency Ratio to narrow the bands during trending conditions (where ER is high) and widen them during ranging markets (where ER is low). This means the channel contracts when the trend is clean — keeping signals tight — and expands when price is noisy — filtering out false breakouts.
3. Composite Signal Scoring System (0–100). Every signal receives a quality score based on three weighted components:
— Trend strength (0–40 pts): derived from the Efficiency Ratio magnitude
— Momentum (0–30 pts): RSI distance from the neutral 50-level in the signal direction
— Volume confirmation (0–30 pts): current volume relative to its 20-period average
Only signals exceeding the user-defined minimum score threshold are displayed — letting you filter out low-conviction setups.
⚙️ HOW IT WORKS
Trend detection:
The indicator calculates an Adaptive Moving Average using the Kaufman method. The slope of this line determines trend direction: if the line rises by more than 5% of current ATR, the trend is classified as bullish; if it falls by the same threshold, bearish. A small dead zone (ATR × 0.05) prevents noise from flipping the trend.
Signal generation:
A BUY signal fires when:
— Trend flips from bearish/neutral to bullish (slope turns positive)
— Price is above the adaptive line
— RSI is not in overbought territory (if RSI filter is enabled)
— Volume exceeds its moving average × threshold (if volume filter is enabled; auto-disabled on forex)
— Composite score meets the minimum threshold
— Bar is confirmed (close-based, no repainting)
SELL signals use the mirror logic.
Anti-repaint compliance:
All signals require barstate.isconfirmed — they only trigger on the close of the bar and never change on historical data. A warmup period (minimum 50 bars or 2× Trend Length) prevents unreliable early signals.
Volume filter on forex:
The indicator automatically detects instruments with no volume data (common on forex pairs) and bypasses the volume filter for those symbols, so it works seamlessly across asset classes.
📖 HOW TO USE
Reading the chart:
— Green trend line + upward slope = bullish regime
— Red trend line + downward slope = bearish regime
— Yellow trend line = neutral / transitioning
— ▲ labels below bars = confirmed BUY signal
— ▼ labels above bars = confirmed SELL signal
— The shaded channel around the trend line shows volatility-adjusted support/resistance zones
Quick-start presets:
— Conservative (Length 30 / ATR 20 / Mult 2.5): fewer signals, higher reliability — suited for swing trading on 4H–Daily
— Default (Length 20 / ATR 14 / Mult 2.0): balanced for most timeframes
— Aggressive (Length 12 / ATR 10 / Mult 1.5): more signals — suited for 15min–1H
— Scalping (Length 8 / ATR 7 / Mult 1.2): fast response — optimized for 1–5min charts
Signal quality:
Use the Score value in the dashboard to gauge conviction:
— 70–100: strong trend + momentum + volume alignment
— 40–69: moderate setup, consider additional confluence
— Below threshold: signal filtered out (not shown)
Dashboard panel:
Displays current trend direction, last signal with its score, Efficiency Ratio %, RSI value, timeframe, and indicator version. Position is adjustable to any corner of the chart.
Alerts & automation:
Supports both standard PulseWire alert messages and JSON webhook format for integration with 3Commas, Alertatron, or custom bots. Alert messages include ticker, price, timeframe, and signal score.
⚙️ KEY SETTINGS REFERENCE
— Trend Length (default 21): lookback for adaptive MA — higher = smoother, lower = faster
— ATR Length (default 14): period for volatility bands — higher = wider bands
— Band Multiplier (default 2.0): ATR multiplier for channel width — higher = fewer false signals
— RSI Filter (on by default): blocks buy signals when RSI > 70, sell signals when RSI < 30
— Volume Filter (on by default): requires volume > SMA(20) × 1.2 — auto-disabled on forex
— Min Signal Score (default 40): minimum composite score for signal display
— Efficiency Smoothing (default 5): EMA smoothing of the Kaufman ER
⚠️ IMPORTANT NOTES
— This indicator does not use future data. No lookahead, no repainting.
— Past performance shown on any chart does not guarantee future results.
— AVT is a tool for identifying trend direction and generating signal candidates — it is not a complete trading system. Always use proper risk management and consider additional confluence before entering trades.
— The indicator works best in trending markets. In prolonged sideways conditions, even filtered signals may produce whipsaws — the Efficiency Ratio in the dashboard helps you assess whether the current market is trending enough for signal reliability. Indicator

Advanced Engine: RVOL and Price ActionThis is an Enhanced version of SuperTrend and Volume Oscillator, utilising the Relative Volume and ZScore to give precise signals. This works well with Indicies and most stocks. Chose Chart TF as 10 mins
1. System Overview
The v6.12 Engine is a dual-timeframe algorithmic system. It utilizes the Chart Timeframe (CTF) to establish macro trend, mean-reversion boundaries, and structural momentum. Simultaneously, it runs a background 1-Minute Timeframe (1m TF) engine to analyze absolute volume expansion and micro-order flow delta.
The system features dynamic toggles allowing it to act as a strict trend-follower, a VWAP mean-reversion scalper, or a high-velocity volume breakout catcher.
2. Core Mathematical Components
A. Chart Timeframe (CTF) Indicators
SuperTrend (Macro Bias): ATR-based trailing envelope. (ATR: 10, Multiplier: 3.0).
Toggle:Ignore SuperTrend forces the internal state to true to allow pure VWAP mean-reversion trades.
VWAP (Intraday Baseline): Session-anchored Volume Weighted Average Price based on Typical Price (hlc3).
Volume Oscillator (Structural Momentum): Measures acceleration of trading volume.
VolOsc = 100 \times \frac{EMA(Volume, 5) - EMA(Volume, 10)}{EMA(Volume, 10)}
Requirement: Must be rising/falling over 2 consecutive bars.
Stochastic RSI (Price Velocity): Averaged %K and %D lines.
Requirement: Must be rising/falling over 2 consecutive bars, unless "Stuck" at extremities (< 1 or > 99).
B.1-Minute (1m TF) Indicators
Calculated independently of the chart timeframe using exact 1-minute tick data.
Relative Volume (RVOL): Compares the current 1m volume against the historical average volume for that exact same minute over the last N days (Default: 10 days).
Trigger (isHighRVOL): RVOL > 1.5.
Smoothed Delta Z-Score: Calculates the difference between buying volume and selling volume within the 1-minute candle, normalizes it into a Z-Score, and applies a 3-period Simple Moving Average.
Trigger (isZBull): Smoothed Z-Score is rising AND 1m Price is Bullish (Close > Open).
Trigger (isZBear): Smoothed Z-Score is rising AND 1m Price is Bearish (Close < Open).
3. Strict Entry Criteria
The engine evaluates signals via logical OR gates between sub-routines. If any of the following sub-routines return true, a trade is executed.
A. Long (BUY) Triggers
All Long entries strictly require the execution candle to be Green (Close > Open). If the 1m Sniper Filter is enabled, all Standard, Stuck, and Override entries must also have a Bullish 1m Z-Score (isZBull).
Standard Buy: SuperTrend Green + Price > VWAP + VolOsc Rising + StochRSI Rising.
Stuck Buy: StochRSI < 1 (bypassing slope) + SuperTrend Green + Price > VWAP + VolOsc Rising.
Oversold Override Buy: StochRSI < 20 + StochRSI Rising + VolOsc Rising + Price > VWAP (Overrides Red SuperTrend).
RVOL Breakout (If Enabled): Price > VWAP + SuperTrend Green + isHighRVOL + isZBull (Bypasses CTF VolOsc and StochRSI).
B. Short (SELL) Triggers
All Short entries strictly require the execution candle to be Red (Close < Open). If the 1m Sniper Filter is enabled, all Standard, Stuck, and Override entries must also have a Bearish 1m Z-Score (isZBear).
Standard Sell: SuperTrend Red + Price < VWAP + VolOsc Falling + StochRSI Falling.
Stuck Sell: StochRSI > 99 (bypassing slope) + SuperTrend Red + Price < VWAP + VolOsc Falling.
Overbought Override Sell: StochRSI > 80 + StochRSI Falling + VolOsc Falling + Price < VWAP (Overrides Green SuperTrend).
RVOL Breakout (If Enabled): Price < VWAP + SuperTrend Red + isHighRVOL + isZBear (Bypasses CTF VolOsc and StochRSI).
4. Strict Exit Criteria
The engine manages risk and flattens positions based on the following autonomous triggers:
Stop-and-Reverse (Standard): If an opposing valid entry signal fires while a position is open, the engine simultaneously calculates realized PnL, flips the state directly to the opposite direction, and updates the entry price.
VWAP Early Exit (If Enabled): Exits a trade prior to a full momentum reversal if the entire body of the candle closes across the VWAP line against the trade direction.
Long Exit: max(open, close) < VWAP
Short Exit: min(open, close) > VWAP
1m Micro-Divergence Exit (If Enabled): Exits a trade immediately if micro-order flow violently shifts against the position, regardless of the chart timeframe structure.
Long Exit: isHighRVOL AND isZBear.
Short Exit: isHighRVOL AND isZBull.
Cutoff Exit (Smart No-Entry): If a standard reversal signal fires after the No Entry Hour (Default: 14:45), the engine uses it to EXIT the current trade but strictly blocks the new entry leg.
EOD Square-Off (If Enabled): Hard flattens any remaining open positions at the exact close of the designated EOD candle (Default: 15:10) to secure intraday margins.
5. System Accounting & Webhook Outputs
Continuous Open PnL: The tradeState (-1, 0, 1) and entryPrice lock on execution. If swing trading (EOD Close disabled), floating PnL carries over across sessions.
Daily Realized PnL: Hard-resets to 0.0 at the first bar of a new calendar day. The previous day's total realized points are stamped to the Pine Logs.
Webhook Payload: The system fires strictly validated JSON strings to the configured endpoint at alert.freq_once_per_bar_close:
{"action": "BUY", "ticker": "...", "price": 0.00, "exchange": "..."}
{"action": "SELL", "ticker": "...", "price": 0.00, "exchange": "..."}
{"action": "EXIT", "ticker": "...", "price": 0.00, "exchange": "..."}
{"action": "SQUARE_OFF", "ticker": "...", "price": 0.00, "exchange": "..."}
Indicator

Trend Freeway MTF | ProjectSyndicateTrend Freeway MTF provides a complete multi-timeframe market overview in a single, clean panel. It visualizes trend and momentum confluence across 5 user-defined timeframes by simultaneously tracking Supertrend, RSI, and MACD status. This eliminates the need to switch between charts, providing an instant, high-conviction view of whether the market is aligned for a strong move or is consolidating with conflicting signals.
• 🚦 15-Lane Confluence Panel — each of the 5 timeframe groups is split into 3 sub-lanes SUPER, RSI, MACD, giving you a 15-point real-time market audit.
• 🧠 Triple-Indicator Logic — cross-validates a trend-following indicator Supertrend, a momentum oscillator RSI, and a trend/momentum hybrid MACD for robust signal filtering.
• 🔭 Full Multi-Timeframe Support — instantly see the bigger picture by monitoring 5 timeframes at once defaults: M5, M15, M30, H1, H4, all fully configurable to any TF.
• 📊 Master Trend Signal Header — a dynamic header at the top of the panel scores all 15 lanes and displays the master signal BUY, STRONG BUY, SUPER STRONG BUY with a color-coded background for an immediate, top-down market bias reading.
• 🎨 Clear Visual Hierarchy — uses a distinct, high-contrast color scheme dark teal for bull, dark crimson for bear, near-black for neutral so you can assess market alignment in a fraction of a second.
• 🔔 Comprehensive Alerts — get notified when a specific signal strength is reached e.g., STRONG BUY or when all 15 lanes achieve full bullish or bearish confluence, ensuring you never miss a major market shift.
• ✅ RSI Neutral Zone Filter — the RSI lane turns a neutral color when momentum is weak between 40-60 by default, effectively filtering out choppy, low-probability conditions.
• 🔧 Fully Customizable — control everything from the 5 timeframes and all indicator settings ATR, RSI, MACD to the colors, lane widths, and table position.
• 🎯 Why this algo is unique: Standard indicators only give you one piece of the puzzle on a single timeframe. This algorithm forces three independent concepts—trend, momentum, and relative strength—to agree across five separate timeframes. It doesn't just show you a signal; it shows you the quality of the signal. When all 15 lanes light up with the same color, you are looking at institutional-grade trend alignment. When colors are mixed, it instantly warns you to stay out.
• 🚀 Apply to Gold (XAUUSD), Forex (EURUSD, GBPJPY), Crypto (BTCUSD, ETHUSD), and Indices (NASDAQ/NQ, S&P500/ES) on any timeframe. The fully configurable indicator settings allow it to adapt to anything from scalping to swing trading.
• 🎯 How to use this? Focus on trading opportunities when you see full alignment all 3 sub-lanes are the same color on your primary trading timeframe. For the highest-probability setups, wait for the Master Trend Signal to show STRONG or SUPER STRONG status, indicating that the majority of all 15 lanes are in agreement. Use moments of conflicting colors as a clear signal to stay out of the market and avoid chop.
• ⚠️ IMPORTANT NOTICE: This indicator is a powerful decision-support tool designed to provide a high-level overview of market confluence. It should NOT be used as a standalone signal for entering or exiting trades. Always use it in conjunction with your own trading strategy, price action analysis, and proper risk management to confirm trade setups. Indicator

True Baseline Median SuperTrendTrue Baseline Median SuperTrend (TBM SuperTrend) | MisinkoMaster
True Baseline Median SuperTrend is a volatility-adaptive trend indicator designed to refine traditional SuperTrend logic by introducing a volatility-filtered baseline and median-based smoothing techniques.
Instead of relying on a fixed midpoint calculation, TBM SuperTrend dynamically constructs its baseline from structurally significant price observations, then applies layered median smoothing to reduce noise while preserving trend integrity.
The result is a cleaner, more stable trend-following tool that reacts to meaningful shifts in volatility and directional pressure without excessive whipsaws.
Core Philosophy
Most SuperTrend-style indicators anchor their bands to a simple price midpoint and apply an ATR-based offset. While effective, this approach can be overly sensitive during volatile consolidations.
TBM SuperTrend improves this structure by:
• Building a volatility-qualified baseline
• Filtering insignificant price movements
• Applying median smoothing instead of simple averaging
• Retaining ATR-based adaptive band distance
This creates a trend structure that prioritizes meaningful price expansion over random noise.
Key Features
Volatility-qualified baseline construction
Median-smoothed upper and lower bands
ATR-based adaptive volatility envelope
Dynamic trend state detection
Automatic candle coloring
Clear long and short transition labels
Reduced whipsaw behavior compared to standard SuperTrend
Works across intraday and higher timeframes
Designed for trend continuation and breakout frameworks
How It Works (Conceptual)
The indicator operates in three structural layers:
Volatility Measurement
Market volatility is assessed using an ATR-based structure.
Baseline Construction
Instead of averaging all recent prices, the script filters price samples based on volatility conditions. Only structurally relevant bars contribute to the baseline calculation. This ensures that the baseline reflects meaningful movement rather than passive drift.
Median Smoothing
Both the volatility-adjusted bands and the baseline structure undergo median smoothing. Median smoothing is less sensitive to outliers than standard averaging, which helps stabilize the trend line during erratic price spikes.
After the adaptive bands are constructed, price interaction with those bands determines directional bias:
• Price closing above the upper threshold confirms bullish trend state
• Price closing below the lower threshold confirms bearish trend state
Internal implementation details remain proprietary in the protected version.
Trend Logic Explained
Bullish State
When price maintains strength above the adaptive upper boundary, the indicator confirms a long bias. The trailing structure shifts beneath price, acting as dynamic support.
Bearish State
When price closes below the adaptive lower boundary, the indicator confirms a short bias. The trailing structure shifts above price, acting as dynamic resistance.
State transitions occur only when decisive boundary breaks happen, helping reduce false flips.
Visual Components
Trend Lines
Only the active directional band is displayed, reducing clutter and emphasizing current bias.
Shaded Volatility Zone
A filled region between price and the active band visually highlights trend dominance.
Long / Short Labels
Clear on-chart labels mark confirmed trend transitions.
Candle Coloring
Price candles automatically reflect current trend state for immediate visual recognition.
Inputs Overview
Source
Defines the price series used for baseline construction.
ATR Length
Controls the volatility lookback period.
True Baseline Length
Determines the window used for constructing the volatility-qualified baseline.
Factor
Adjusts the volatility multiplier that expands or contracts the adaptive bands.
Median Period
Controls the median smoothing strength applied to the bands.
Lower values increase responsiveness.
Higher values improve stability and reduce noise.
Why Median Smoothing Matters
Traditional smoothing methods (like EMA or SMA) can be distorted by sharp price spikes. Median-based smoothing reduces the impact of extreme values, making TBM SuperTrend particularly effective in:
• Crypto markets
• High-volatility equities
• News-driven instruments
• Lower timeframe trading
This improves structural consistency during sudden volatility expansions.
Best Use Cases
Trend-following systems
Breakout confirmation
Pullback entries within established trends
Trailing stop framework
Directional bias filtering
Volatility-adaptive strategy design
Parameter Tuning Guidance
Shorter ATR Length
→ Faster adaptation
→ More sensitivity
→ Suitable for intraday trading
Longer ATR Length
→ Smoother volatility structure
→ Better for swing trading
Higher Factor
→ Wider bands
→ Fewer signals
→ Stronger trend confirmation
Lower Factor
→ Tighter bands
→ Earlier entries
→ More reversals
Longer Median Period
→ Smoother band structure
→ Reduced whipsaws
Shorter Median Period
→ Faster reaction
→ More sensitivity to shifts
Practical Strategy Integration
Use TBM SuperTrend as:
• Primary directional filter
• Trailing stop mechanism
• Confirmation layer for breakout systems
• Bias alignment tool across multiple timeframes
It performs best when combined with momentum confirmation or volume expansion tools.
Summary
True Baseline Median SuperTrend enhances traditional SuperTrend logic by introducing volatility-qualified baseline construction and median smoothing for structural stability.
The result is a cleaner, more adaptive trend tool that prioritizes meaningful price movement while minimizing noise. It is well suited for traders seeking a disciplined, volatility-aware trend framework that remains robust across changing market conditions. Indicator

SuperTrend AI Adaptive - Strategy [BTC]+2,091% returns. 1.94 profit factor. 28% max drawdown.
Buy and hold returned ~785% over the same period with 75%+ drawdowns. This strategy returned 2,091% with less than a third of the drawdown. Consistent upward equity curve through bull markets, bear markets, and sideways chop.
This is the strategy version of SuperTrend AI . Same regime-adaptive engine, same AI scoring, now with full entries, exits, and risk management built in.
◈ How It Works
The strategy detects market regime shifts (trending, volatile, ranging) and adapts the SuperTrend multiplier automatically. Every trend flip is scored 0-100 by a 5-factor AI engine. Only high-scoring flips become trade entries.
The 5 scoring factors:
Volume Surge: was there conviction behind the flip?
Displacement: how far did price break through the band?
Trend Alignment: does the EMA agree with the direction?
Regime Quality: trending regimes score highest, ranging get penalized
Band Distance: how far did price travel to reach the flip point?
Low-scoring flips are skipped entirely. This is the main edge. Standard SuperTrend enters on every flip. This strategy is selective.
◈ Regime Adaptation
TRENDING regime: multiplier stays at base. Normal conditions, normal entries.
VOLATILE regime: multiplier widens automatically. Prevents noise-driven entries. Band turns amber on chart.
RANGING regime: multiplier tightens slightly. Entries are blocked by default because SuperTrend gets chopped in ranges.
The regime filter alone eliminates most of the losing trades that kill standard SuperTrend strategies.
◈ Risk Management
Three stop loss modes:
ATR-based (default): dynamic stop that adjusts to current volatility
Percent: fixed percentage stop
SuperTrend: exit only on trend flip
Take profit modes:
Risk:Reward ratio (default 2.5:1): TP based on SL distance
Percent: fixed percentage target
None: hold until stop or flip
Optional trailing stop for locking in profits on extended trends. All parameters are adjustable.
◈ Why It Beats Buy and Hold
Buy and hold works in hindsight. In real time, you sit through 50-75% drawdowns hoping for recovery. This strategy:
Shorts during bear markets instead of bleeding. The 2022 and early 2026 bear legs were profitable, not just survivable.
Stays flat during ranging markets. No entries when conditions are bad.
Compounds gains from both directions. Longs in uptrends, shorts in downtrends.
The equity curve tells the story. Consistent staircase up with controlled pullbacks vs the rollercoaster of buy and hold.
◈ Default Settings (optimized for BTCUSDT 4H)
SuperTrend: ATR 10, Base Multiplier 3.0
Regime: Lookback 40, ADX 14, Threshold 20
AI Engine: Trend EMA 50, Volume MA 20, Min Score 65
Risk: SL Mode ATR, SL ATR Mult 6.0, TP Mode RR 2.5:1
Filters: EMA Trend Filter on, Skip Ranging on, Volume Filter on, Cooldown 5
Position: 80% of equity per trade
Commission: 0.06% (Binance futures level), 2 ticks slippage
◈ Adapting to Other Assets
These defaults are tuned for BTCUSDT 4H. For other assets, adjust:
Other crypto (ETH, SOL) 4H: Same settings, may need Min Score 60
Forex 1H to 4H: Lower position size to 20-30%, tighten SL to 2.5-3.0 ATR, trend following works less well on forex
Indices 1H: SL ATR 3.0-4.0, position size 30-50%
SuperTrend strategies work best on assets that trend. Crypto on higher timeframes trends the hardest.
◈ Backtest Notes
Period: Jan 2015 to Feb 2026 (10+ years, includes multiple bull and bear cycles)
Initial capital: $10,000 USDT
Commission: 0.06% per trade (realistic for Binance futures)
Slippage: 2 ticks
Position sizing: 80% of equity (compounding)
No pyramiding. One position at a time.
Signals are non-repainting. Entries on confirmed bar close only.
Returns are compounded. The 2,091% figure reflects reinvesting profits at 80% equity per trade. Without compounding, the raw edge is captured by the profit factor (1.94) and win rate (46% at 2.5:1 RR).
◈ Key Metrics
Total P&L: +2,091%
Profit Factor: 1.94
Win Rate: 46.10% (71 of 154 trades)
Max Drawdown: 28.16%
Average trade count: roughly 15 per year
◈ Features
✓ Regime-adaptive SuperTrend with automatic multiplier adjustment
✓ AI signal scoring filters out low-quality trend flips
✓ Three SL modes (ATR, Percent, SuperTrend flip)
✓ Three TP modes (Risk:Reward, Percent, None)
✓ Optional trailing stop
✓ EMA trend filter, regime filter, volume filter
✓ Realistic commission and slippage included
✓ Dashboard showing trend, regime, position status, and signal score
✓ Non-repainting entries on confirmed bar close
✓ 100% original code
◈ Companion Indicator
This strategy is built on the SuperTrend AI indicator. Use the indicator for live chart analysis and the strategy for backtesting and validation. Both available free on my profile.
◈ Disclaimer
Past backtest performance does not guarantee future results. All backtests have inherent limitations including look-ahead bias in parameter selection. These settings were optimized on the full sample period. Always forward-test before risking real capital. Use proper position sizing and risk management. This is not financial advice.
Happy trading. Strategy

Delta Strike: Order Flow Absorption & Momentum Confirmation**Delta Strike** is a professional-grade quantitative tool designed for traders who prioritize institutional logic over simple price action. It moves beyond traditional "buy/sell" indicators by dissecting the battle between **Passive Absorption** and **Aggressive Initiative** using underlying Order Flow data.
### 🛡️ The Core Philosophy: "Wait for the Trap, Trade the Escape"
Markets rarely reverse instantly. **Delta Strike** follows a rigorous two-step verification process to filter out noise and hunt for high-probability institutional footprints:
1. **Phase 1: Institutional Absorption (Left-Side Setup)**
The system identifies "Base Bars" where high volume and extreme Delta (passive buying/selling) occur, but price fails to continue. This indicates that a large player is absorbing the current move.
2. **Phase 2: Aggressive Strike (Right-Side Confirmation)**
We do not "catch the knife." Instead, the indicator monitors the next **N bars** for a confirmed strike. A signal is only triggered when price engulfs the base bar and is backed by a significant **Active Delta Percentage**, proving that the "absorber" has now become the "aggressor."
### 🚀 Key Technical Features
* **Dual-Cycle Volume Matrix**: Unlike standard indicators, Delta Strike analyzes volume across two lookback periods simultaneously (Short-term 20 & Long-term 50). It classifies setups into three categories:
* 🔥 **Dual-Cycle Convergence** (Maximum Strength)
* ⚡ **Short-term Spike** (Local Volatility)
* 🌊 **Macro Volume Surge** (Long-term Accumulation)
* **Active Delta Intensity Filter**: Every confirmation bar is evaluated for its "Net Win Ratio." By filtering out low-conviction, low-volume breakouts, it ensures you only follow moves with real institutional backing.
* **RSI Environment Guard**: Integrated RSI logic ensures that bottom absorption is only hunted in "Oversold" zones and top absorption in "Overbought" zones, significantly reducing whipsaws in sideways markets.
* **Validated SuperTrend (Delta-Sync)**: A modified SuperTrend algorithm that requires a "Delta Handshake." A trend flip is only considered valid if price and Delta move in the same direction, preventing "fake-outs" during low-liquidity periods.
### 📊 Clean & Actionable UI
* **Base Bar Highlight**: When a setup is confirmed, the script retroactively draws a **Yellow (Bullish)** or **Fuchsia (Bearish)** box around the original absorption bar.
* **Trace Lines**: Dashed lines connect the original institutional entry to your current entry point, providing immediate visual context for the trade's logic.
* **Momentum Rating (🐂/🐻)**:
* **3 Stars (🐂🐂🐂)**: Extreme Delta Strike (>20% Net Win).
* **2 Stars (🐂🐂)**: High Conviction Strike (>10% Net Win).
* **1 Star (🐂)**: Standard Confirmation.
### 🔔 Smart Alert System
Equipped with a fully customizable alert suite. You can set alerts for:
* **Absorption Confirmations** (Long/Short)
* **Validated SuperTrend Breakouts**
*Note: For the most accurate results, it is recommended to use "Any alert() function call" and set frequency to "Once Per Bar Close" to avoid repainting during intra-bar fluctuations.*
---
### How to use:
1. Look for the ** ** label and highlighted box.
2. Wait for the **Strike icons (🐂/🐻)** to appear within the N-bar window.
3. Combine with your existing Support/Resistance levels for optimal strike rates.
--- Indicator

SuperTrend AI AdaptiveSuperTrend AI detects market regime shifts and adapts the band width automatically, then scores every trend flip with a 5-factor quality engine so you know which signals to trust.
◈ How It Works
Standard SuperTrend has one fixed multiplier. It works great in trending markets but gets chopped apart in ranging conditions. This version solves that by detecting the current market regime and adapting in real time.
The indicator classifies every bar into one of three regimes:
TRENDING: ADX above threshold + normal ATR. Multiplier stays at base. SuperTrend works as intended.
RANGING: ADX below threshold + compressed ATR. Multiplier tightens slightly for faster response. Band draws as a dotted line to warn you.
VOLATILE: ATR expanding well above its historical average. Multiplier widens to absorb the noise and prevent false flips.
The regime is determined by two factors: the ATR ratio (current ATR vs its moving average over the lookback period) and the ADX reading. This gives you a structural view of market conditions, not just price direction.
◈ Adaptive Multiplier
When adaptation is enabled, the multiplier adjusts dynamically:
In volatile regimes, the multiplier increases proportionally to how expanded the ATR is. This widens the band and filters out noise-driven flips.
In ranging regimes, the multiplier drops to 85% of base. Tighter bands let you catch the transition when a real trend starts.
In trending regimes, the multiplier stays at base. No adjustment needed when conditions are ideal.
The multiplier is capped between 0.5x and 2x of your base setting so it never goes extreme. You can see the current adaptive multiplier in the dashboard at all times.
◈ AI Signal Scoring
Every SuperTrend flip gets a quality score from 0 to 100 based on 5 factors:
Volume Surge (0-20 pts): Volume on the flip bar vs 20-period average. Higher volume = more conviction behind the move.
Displacement (0-25 pts): How far price closed beyond the band on the flip. Bigger displacement = stronger breakout.
Trend Alignment (0-20 pts): Does the flip direction match the EMA trend? Aligned signals score higher.
Regime Quality (0-15 pts): Signals in trending regimes score highest. Ranging regime signals get penalized.
Band Distance (0-20 pts): How far price traveled to reach the band before flipping. Wider gap = more conviction.
Bright signals (★) score above 70 and represent high-quality flips with multiple factors confirming. Dim signals (○) score 40-69 and are worth watching but carry more risk. By default only bright signals display.
◈ Visual System
The band uses a neon glow effect (three layered plots) that makes it easy to track on any chart. The band color itself tells you the current regime at a glance:
Green/red glow = trending regime, normal SuperTrend behavior.
Amber glow = volatile regime, multiplier has widened to absorb noise.
Gray dotted line = ranging regime, multiplier tightened, use caution.
A subtle background tint appears during volatile (amber) and ranging (gray) periods so you can see regime context without looking at the dashboard. Both the glow and background tint can be toggled off in settings.
The gradient fill between price and band is available but off by default. Enable it in settings if you prefer that style.
◈ How to Read the Dashboard
ST AI ◈: header
Trend: current SuperTrend direction (▲ BULLISH / ▼ BEARISH) with bias label
Regime: current market classification (TRENDING / VOLATILE / RANGING) with ATR ratio
EMA: whether the trend EMA agrees with SuperTrend direction (✓ ALIGNED / ✗ COUNTER)
Multiplier: current adaptive value vs your base setting
ADX: trend strength reading with visual bar
Signal: last signal state with score in points
◈ Recommended Settings
Forex (EUR/USD, GBP/JPY) 1H to 4H: ATR 10, Multiplier 3.0, Regime Lookback 40, ADX 14
Crypto (BTC, ETH) 1H to 4H: ATR 10, Multiplier 3.0, Regime Lookback 50, ADX 14
Scalping 5min to 15min: ATR 7, Multiplier 2.0, Regime Lookback 30, ADX 10
Swing trading Daily: ATR 14, Multiplier 3.5, Regime Lookback 50, ADX 14
Indices (NAS100, SPX500) 15min to 1H: ATR 10, Multiplier 2.5, Regime Lookback 40, ADX 14
For fewer signals: Raise Min Signal Score to 60+, increase cooldown
For more signals: Lower Min Signal Score to 30, enable dim signals, reduce cooldown
◈ Key Features
✓ Non-repainting: all signals on confirmed bar close
✓ Regime-adaptive: multiplier adjusts to trending, ranging, and volatile conditions automatically
✓ AI signal scoring: 5-factor quality engine, 0-100 per flip
✓ Neon glow band: color shifts with regime state, visible at a glance
✓ Regime background: subtle tint shows volatile and ranging periods on the chart
✓ ADX integration: trend strength directly influences regime detection and scoring
✓ 7 alert conditions: bull/bear signals, AI-confirmed signals, trend flips, regime changes
✓ Clean dashboard: trend, regime, multiplier, ADX, and signal score in one panel
✓ 100% original code: not derived from any existing script
◈ What Makes This Different
Standard SuperTrend uses a fixed multiplier. It works until the market changes character, then gives false flips until you manually adjust. This version detects the change and adjusts for you.
The scoring tells you not just that a flip happened, but whether it is likely to be meaningful. A flip during a trending regime with high volume and strong displacement scores 85+. The same flip during a ranging regime with weak volume might score 45. Both are flips, but only one is worth trading.
◈ Disclaimer
No indicator predicts the future. Regime detection is probabilistic, not certain. Use proper risk management and combine with your own analysis. Past performance does not guarantee future results.
Happy trading. Indicator

Indicator

SuperTrend Recovery [LuxAlgo]The SuperTrend Recovery indicator provides a modified version of the classic SuperTrend algorithm that incorporates a dynamic "recovery" mechanism designed to adjust the trailing stop when price action moves significantly against the current trend. This script aims to help traders manage volatile environments by tightening the trend band when the market experiences deep pullbacks without triggering a full trend reversal.
🔶 USAGE
The indicator can be used similarly to a standard SuperTrend to identify market direction and potential trailing stop-loss levels. However, the unique recovery logic allows for a more adaptive response to price deviations.
🔹 Trend Detection
When the price is above the band, the indicator signals a BULL trend.
When the price is below the band, the indicator signals a BEAR trend.
Trend switches are marked with "BULL" or "BEAR" labels and a colored circle at the switch point.
🔹 Recovery Mechanism
In a standard SuperTrend, the band stays flat if price moves against the trend (but doesn't break it). In the SuperTrend Recovery version, if the price drops significantly below the "Switch Price" (for a bull trend) or rises above it (for a bear trend), the band begins to move toward the price based on the Recovery Alpha . This allows the trailing stop to "catch up" during high-volatility pullbacks, potentially securing a faster exit if the recovery fails.
🔶 DETAILS
The core of this indicator lies in its two-stage calculation: the Base SuperTrend and the Recovery Logic.
🔹 Base Logic
The indicator calculates a base upper and lower band using the Average True Range (ATR) multiplied by a user-defined factor. Under normal conditions, the band follows the classic rules: it can only move up during a bull trend and only down during a bear trend.
🔹 Recovery Logic
When price enters a "loss" state relative to the price where the trend initially started (the Switch Price), the script checks if the deviation exceeds the Recovery Threshold .
If the threshold is met, the band is calculated as an exponential moving average (EMA) of the current price and the previous band value, weighted by the Recovery Alpha :
targetBand = alpha * close + (1.0 - alpha) * prevBand
This creates a "tapering" effect where the band aggressively tightens toward the price during deep retracements, helping to mitigate drawdown by providing an earlier exit signal compared to the standard static band.
🔶 SETTINGS
🔹 Supertrend Settings
ATR Length : The lookback period used to calculate market volatility.
Base Multiplier : The factor applied to the ATR to determine the distance of the band from the price.
🔹 Recovery Logic
Recovery Alpha (%) : Determines how quickly the band adjusts toward the price when the recovery logic is active. Higher values make the band more reactive.
Recovery Threshold (xATR) : The distance (in ATR units) the price must deviate from the switch price before the recovery mechanism activates.
🔹 Visualization
Show Gradient Fills : Toggles the background gradient between the price (source) and the SuperTrend band.
Show Signal Labels : Toggles the "BULL" and "BEAR" labels at trend reversal points.
Indicator

Standard Deviation Supertrend | GForgeStandard Deviation Supertrend ~ 𝒢𝐹𝑜𝓇𝑔𝑒
A Supertrend indicator that replaces ATR with Standard Deviation for volatility measurement, combined with a selectable Moving Average anchor for noise reduction.
━━━━━━━━━━━━━━━━━━━━━━━━
What This Indicator Does
This is a trend-following overlay that plots a single trailing line on your chart. When price is above the line, the trend is bullish. When price crosses below, the trend flips bearish. Signals fire on each flip.
The core mechanic is identical to the classic Supertrend — ratcheting bands that tighten in the direction of the trend and only reset when price breaks through the opposite side.
━━━━━━━━━━━━━━━━━━━━━━━━
Why Standard Deviation Instead of ATR
ATR measures the average candle range. It treats all bars the same — a strong directional candle and a choppy gap produce equal ATR contributions.
Standard Deviation measures how far price disperses from its mean. During clean directional moves, prices cluster on one side of the mean, producing low StdDev and tighter bands. During erratic, sideways price action, prices scatter around the mean, producing high StdDev and wider bands.
The result: the trailing stop naturally tightens when the trend is clean and loosens when conditions are noisy. This is adaptive behavior that ATR-based Supertrends don't provide.
━━━━━━━━━━━━━━━━━━━━━━━━
Two Smoothing Layers
Raw Supertrend inputs can be noisy. A single wick or volatile candle can jerk the trailing band and cause a premature flip. This indicator addresses that with two optional smoothing layers:
Anchor MA — applies a Moving Average to the price source before bands are calculated. Instead of building bands around raw hl2 (which reacts to every wick), the bands are built around a smoother baseline. 11 MA types are available:
• None (hl2) — raw, classic Supertrend behavior
• SMA, EMA, WMA — standard options with varying lag
• HMA — very low lag, can overshoot on reversals
• DEMA, TEMA — reduced lag variants of EMA
• VWMA — volume-weighted, naturally anchors to high-volume levels
• RMA — Wilder's smoothing, very stable
• ALMA — Gaussian-weighted with tunable offset and sigma
• T3 — Tillson, extremely smooth with adjustable volume factor
StdDev Smoothing — applies an EMA to the raw Standard Deviation output before it scales the bands. This prevents abrupt band width changes when a volatile bar enters or exits the lookback window. Set to 1 to disable.
Together, these improve parameter robustness — small changes to settings produce smaller changes in output, meaning the indicator is less likely to break under slight parameter variation.
━━━━━━━━━━━━━━━━━━━━━━━━
Settings Overview
• Anchor Source — price input for the Supertrend. hl2 is the classic default.
• StdDev Length — lookback period for the Standard Deviation calculation.
• StdDev Multiplier — band width. Higher values require a larger move to flip direction. This serves the same purpose as a "threshold" in oscillator-based indicators.
• Anchor MA Type / Length — which Moving Average smooths the anchor, and its period.
• StdDev Smoothing — EMA period applied to the raw StdDev. 1 = no smoothing.
• ALMA Offset / Sigma — only active when ALMA is selected.
• T3 Volume Factor — only active when T3 is selected.
• Current settings work best on BTC 1D
━━━━━━━━━━━━━━━━━━━━━━━━
Visual Elements
• Glow trail — the Supertrend line pulses with a layered glow that changes color on trend direction.
• Trend fill — gradient fill between price and the trailing line.
• Inactive band — shown as crosses, marking where the opposite flip point sits.
• Anchor MA line — subtle reference line showing the smoothed anchor (hidden when set to None).
• Bar coloring — candles colored by current trend direction.
• Signal diamonds — dual-layer markers (halo + core) on trend flips.
All visual elements can be toggled on or off individually. 13 color themes are included.
━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer
This indicator is a technical analysis tool, not financial advice. It does not guarantee profitable results. Past performance on any asset or timeframe does not indicate future results. No indicator can predict market direction with certainty.
Always use proper risk management. Do not rely on any single indicator for trading decisions. Test thoroughly on your chosen instruments and timeframes before applying to live markets. You are solely responsible for your own trading decisions and outcomes.
━━━━━━━━━━━━━━━━━━━━━━━━
Developed by 𝒢𝐹𝑜𝓇𝑔𝑒 Indicator

Multiple Factor Adaptive MA SuperTrendMultiple Factor Adaptive MA SuperTrend
Multiple Factor Adaptive MA SuperTrend is an enhanced trend-following overlay that builds on the classical SuperTrend concept by introducing an adaptive moving-average base. The indicator dynamically adjusts to changing market conditions to produce smoother and faster trend signals, helping traders better track directional moves while reducing unnecessary noise.
Instead of relying on a fixed moving-average base, the indicator updates its baseline only when market conditions justify it. This creates a stabilizing effect during consolidation while allowing quicker reactions when volatility, momentum, or activity increases.
🔍 How It Works
The indicator combines:
• A user-selectable Moving Average as the core trend base
• ATR-based volatility bands to detect trend transitions
• An adaptive filter that determines when the base should update
The adaptive mechanism evaluates market conditions using one of several selectable drivers:
• ATR expansion (volatility increase)
• Rate-of-change acceleration
• Rising trading volume
• Increasing divergence between price and the moving average
If the chosen condition signals increased activity or market change, the moving-average base updates normally. Otherwise, the previous base value is retained, effectively smoothing the trend structure and filtering minor fluctuations.
Volatility bands are then calculated around this adaptive base using ATR multiplied by a configurable factor. Trend changes occur when price crosses these bands.
When price breaks above the upper band, a bullish trend is activated and the lower band becomes the trailing support. When price breaks below the lower band, a bearish trend is activated and the upper band acts as trailing resistance.
⚙️ Key Features
• Adaptive moving-average baseline
• Multiple MA types including SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, and EWMA
• ATR-based volatility bands
• Multiple adaptation modes (volatility, momentum, volume, divergence)
• Reduced noise during consolidation phases
• Smooth trend visualization and transition markers
🧩 Inputs Overview
• Moving-average type and length
• Price source selection
• ATR length and multiplier
• Adaptive filter method selection
📌 Usage Notes
• Useful for identifying prevailing market direction and trend shifts.
• Adaptive filtering can help reduce false signals during sideways markets.
• Signals may update intrabar on lower timeframes.
• Best results are achieved when combined with confirmation tools or risk management rules.
• This script is intended for analytical purposes and does not provide financial advice.
Indicator

Adaptive MA SuperTrendAdaptive MA SuperTrend
Adaptive MA SuperTrend is a trend-following overlay indicator designed to deliver smoother and more responsive signals than the classical SuperTrend by dynamically combining two moving averages with volatility-based band calculations.
Instead of relying on a single average, the script calculates a selectable pair of moving averages and continuously assigns them as the upper or lower base depending on which value is greater at each bar. This adaptive swapping allows the structure to respond better to changing market conditions while preserving overall trend stability.
A volatility component is then added to the bases using either:
• Average True Range (ATR)
• Standard Deviation (SD)
The selected volatility measure is multiplied by a configurable factor to create adaptive bands around the moving-average bases. Price crossing these bands determines trend direction changes.
When price crosses above the upper band, the trend switches bullish and the lower band becomes the trailing support line. When price crosses below the lower band, the trend switches bearish and the upper band becomes the trailing resistance line. Only the active trend side is plotted to reduce visual noise and improve chart clarity.
Multiple moving-average pair options are provided, allowing users to choose combinations that match their preferred balance between smoothness and responsiveness, including SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, and ALMA-based combinations. Additional parameters are available when ALMA is selected.
⚙️ Key Features
• Adaptive swapping between two moving averages
• Choice of MA pairs with different responsiveness profiles
• ATR or Standard Deviation volatility bands
• Configurable volatility length and multiplier
• Optional ALMA tuning parameters
• Trend visualization with color-coded support/resistance lines
• Signal markers displayed on trend transitions
🧩 Inputs Overview
• Moving average pair selection
• Moving average length and price source
• Volatility method, length, and multiplier
• Optional ALMA offset and sigma parameters
📌 Usage Notes
• Designed to help visualize prevailing trend direction and potential trend shifts.
• Can be combined with confirmation tools or risk management rules within broader strategies.
• Signals are generated when price crosses volatility-adjusted moving-average bands; signals may update intrabar, especially on lower timeframes.
• This script is intended for analytical purposes and does not constitute financial advice. Users should test and validate performance within their own workflow before applying it to live trading. Indicator
