Triple Supertrend Confluence [MarkitTick]💡 A triple-layer Supertrend confluence system that fuses adaptive volatility bands, multi-timeframe bias, momentum strength, volume conviction, and a cooldown throttle into a single, high-confidence trend signal — then automates the entire trade plan around it with ATR-scaled stop-loss and three staged take-profit levels.
✨ Originality and Utility
Most Supertrend implementations on the platform are single-instance: one ATR period, one multiplier, one line. This script restructures the classic Supertrend into a voting system. Three independently parameterized Supertrend instances (a primary "core" trend and two auxiliary "fast" and "slow" trackers) are calculated in parallel from the same underlying price source, and a signal is only treated as valid when a configurable number of these instances agree on direction. This confluence layer is what separates the tool from a standard Supertrend plot — it is designed to filter out the single biggest weakness of trend-following overlays: getting whipsawed by a solitary indicator flipping on marginal price action.
On top of the consensus layer, the script lets traders stack up to four independent, optional confirmation filters (trend strength via ADX/DMI, higher-timeframe directional bias, relative volume, and a bar-count cooldown) before a signal is considered "confirmed." Each filter can be toggled independently, so the tool scales from a bare-bones single Supertrend up to a fully gated, multi-condition trend-following system. A real-time dashboard keeps every filter's pass/fail state visible at a glance, and an automated trade-planning layer converts each confirmed flip into a structured entry/stop/three-tier-target plan, plotted directly on the chart and exposed through webhook-ready JSON alert payloads.
🔬 Methodology and Concepts
• Core Supertrend Engine
The underlying trend engine follows the standard Supertrend construction: an ATR-derived envelope is built around a price source, with an upper band (source plus a multiple of ATR) and a lower band (source minus a multiple of ATR). These bands are "ratcheted" bar to bar — the lower band can only rise or reset if price closes below the prior lower band, and the upper band can only fall or reset if price closes above the prior upper band. The active trend line switches between the lower band (uptrend) and upper band (downtrend) whenever price closes through the opposite band, producing the familiar stepped Supertrend line. This engine is reused three times with different parameters to build the confluence system described below.
• Adaptive Source Smoothing
Rather than feeding raw HL2 price directly into the Supertrend engine, the script offers eight optional smoothing methods to pre-condition the source: Simple, Exponential, and Wilder's Moving Averages; a Double-Pass Weighted Moving Average; a Triple-Pass Volume-Weighted Moving Average; a Hull Moving Average; a custom slope-adjusted average (LLAMA) that blends a simple mean with a linear slope projection over the lookback window; and a single-state Kalman Filter that recursively updates an estimate and its error covariance bar by bar to produce a noise-adaptive average. Smoothing the source before it reaches the Supertrend calculation reduces false flips caused by single-bar noise spikes, at the cost of some responsiveness.
• Adaptive Volatility Factor
Instead of using a fixed ATR multiplier for the core Supertrend band width, the script can compute a percentile rank of current ATR against its own recent history (a lookback window of your choosing). This rank is then mapped linearly onto a user-defined minimum/maximum multiplier range. In practice, this means the band automatically widens during historically high-volatility regimes (reducing whipsaw) and tightens during historically low-volatility regimes (increasing sensitivity), rather than using one static multiplier across all conditions.
• Triple Consensus Voting
Two additional Supertrend instances — a faster-reacting pair (shorter ATR length, smaller multiplier) and a slower-reacting pair (longer ATR length, larger multiplier) — run alongside the core engine on the same smoothed source. When consensus mode is enabled, a signal is only marked confirmed if at least two of the three instances (including the core) agree on direction. This is a simple majority-vote filter designed to suppress signals that are specific to one particular band setting rather than representative of the broader trend structure.
• ADX / DMI Trend Strength Filter
An optional Average Directional Index filter, calculated using Wilder's Directional Movement methodology, requires ADX to be at or above a user-defined threshold before a flip is confirmed. This is a standard technique for distinguishing genuine directional moves from choppy, non-trending price action, since Supertrend-style systems are known to underperform in low-ADX ranging conditions.
• Higher-Timeframe Bias Filter
An optional filter pulls the trend direction of the same Supertrend engine calculated on a higher, user-selected timeframe, and only confirms a signal if it aligns with that higher-timeframe bias. The higher-timeframe value is read from the prior, fully closed bar on that timeframe to avoid any intra-bar recalculation, ensuring the filter reflects only confirmed historical structure rather than an in-progress bar.
• Volume Confirmation Filter
An optional filter compares current bar volume against its own moving average, requiring volume to exceed the average by a user-defined multiple before a signal is confirmed. This is a simple conviction check: trend changes accompanied by above-average participation are treated as more reliable than those occurring on thin volume.
• Cooldown Guard
An optional bar-count throttle prevents a new confirmed signal in the same direction as a recent prior signal if too few bars have elapsed since that prior signal within the same directional segment, reducing rapid re-signaling during choppy transition periods.
• Confirmation Lag Notice
All confirmation logic (consensus vote, ADX filter, HTF bias, volume filter, cooldown guard) and the resulting BULL/BEAR labels, alerts, and trade-level plotting are evaluated strictly on confirmed, closed bars using barstate.isconfirmed. This means every signal displayed or alerted is final and will not repaint once printed. However, users should be aware that a signal is only confirmed one bar after the actual Supertrend flip occurs, since the confirmation checks (particularly the higher-timeframe bias filter) require a fully closed bar to evaluate safely. This introduces a small, deliberate one-bar lag between the raw trend flip and the confirmed signal in exchange for eliminating repainting.
• Automated Trade Level Engine
On every confirmed flip, the script calculates a full trade plan from the entry price (the confirmed close), an ATR-scaled stop-loss (a user-defined multiple of ATR away from entry), and three take-profit levels defined as user-configurable risk:reward multiples of the initial stop distance. These levels are drawn as extending lines and labels, with shaded risk and reward zones between them, and refresh automatically on each new confirmed signal unless the signal is manually locked.
🎨 Visual Guide
Stepped trend line (color reflects the Up/Down Color inputs): traces the active Supertrend band. It plots along the lower band while price is in an uptrend and the upper band while price is in a downtrend.
Muted/gray trend line: when a filter is active but not yet satisfied, the trend line temporarily switches to the Unconfirmed Color to signal that the raw trend has flipped but confirmation is still pending.
Soft background fill (Up Fill / Down Fill colors): a translucent shaded region behind price reinforcing the current trend direction.
Heatmap candles: when enabled, candle bodies and wicks are recolored using the Heatmap Up/Down colors to match the current trend direction, offering an at-a-glance visual of trend state independent of the line itself.
"BULL" / "BEAR" labels: printed below or above the bar respectively, only on confirmed flips that pass every active filter.
Gray cooldown background: a shaded band that appears across the chart while the Cooldown Guard is actively suppressing new signals.
Trade level lines: a solid red Stop-Loss line, a dashed blue Entry line, and three dashed teal Take-Profit lines (TP1 lightest, TP3 most opaque), each extending to the right of the current bar with a price label attached, shown only when Show Trade Levels is enabled.
Shaded risk/reward zones: a light red fill between Stop-Loss and Entry (the risk zone) and a light teal fill between Entry and TP3 (the reward zone).
On-chart dashboard table: displays symbol/timeframe, Lock status, current Trend direction, Confirmed state, ADX value with a color-coded strength percentage, active Adaptive Filter type, Consensus vote count, HTF Bias direction and pass/fail, Volume filter pass/fail, and remaining Cooldown bars — all updating on the most recent bar.
📖 How to Use
Use the stepped trend line and background fill as the primary trend read: price above the line with an up-colored fill suggests an uptrend context; price below with a down-colored fill suggests a downtrend context.
Treat a "BULL" or "BEAR" label as the actionable signal rather than the raw line flip — labels only appear once every enabled filter has passed, meaning the signal has already been screened for trend strength, higher-timeframe alignment, volume conviction, and cooldown status.
If the trend line is showing the Unconfirmed Color, the underlying trend has technically flipped but is still waiting on one or more active filters — treat this as a "watch" state rather than a trade trigger.
Check the dashboard on each new bar to see exactly which filter(s) are passing or failing before a signal can confirm; this is useful for understanding why an expected signal did not appear.
When Show Trade Levels is enabled, use the plotted Stop-Loss, Entry, and TP1/TP2/TP3 lines as a starting reference for structuring a trade around a confirmed signal — adjust position sizing and targets to your own risk tolerance.
Enable Lock Signal to freeze the current trade-level plot in place (useful for screenshots or reviewing a specific setup) without it being overwritten by a new signal.
The JSON alert payloads are formatted for direct use in webhook-based automation, carrying action, ticker, timeframe, direction, and price fields for long entries, short entries, and their corresponding close-position triggers.
⚙️ Inputs and Settings
ATR Len / Factor: the ATR lookback and multiplier for the core Supertrend engine; higher Factor values produce a looser band and fewer, larger-magnitude signals.
Adaptive Factor (and Min/Max/Rank Len): when enabled, replaces the fixed Factor with a volatility-percentile-driven multiplier that ranges between Factor Min and Factor Max based on where current ATR sits within its own recent history.
Use ADX Filter / ADX Threshold / ADX Length: gates signal confirmation on trend strength; raise the threshold to demand stronger directional conviction before confirming.
Adaptive Filter / Adaptive Filter Len: selects the source-smoothing method applied before the Supertrend calculation, and its lookback length.
Use HTF Confluence / HTF: requires the selected higher timeframe's own Supertrend direction to agree before confirming a signal.
Use Volume Filter / Volume Avg Len / Volume Mult: requires current volume to exceed its moving average by the given multiple before confirming.
Use Cooldown Guard / Cooldown Bars: suppresses new same-direction signals for a set number of bars following a recent prior signal in the same directional segment.
Use Triple Consensus / Fast Factor / Fast ATR Len / Slow Factor / Slow ATR Len: enables the majority-vote filter and configures the auxiliary fast and slow Supertrend instances used to build consensus.
Lock Signal: freezes the currently plotted trade levels, preventing them from updating on a new signal.
Show Trade Levels: toggles the automated Entry/SL/TP1-3 line and label plotting.
SL ATR Mult: the ATR multiple used to place the stop-loss distance from entry.
TP1/TP2/TP3 R:R: the risk:reward multiples used to place each take-profit level relative to the stop distance.
Heatmap Candles / BULL-BEAR Labels / Show Dashboard / Position: visual display toggles and dashboard placement.
Long/Short/Close Long/Close Short Action: customizable string values embedded in the JSON alert payload's "action" field, for mapping to specific webhook automation commands.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
• Volatility-Based Trend Following (Supertrend / ATR Envelopes)
The core engine descends from the broader family of volatility-adjusted trend-following bands, which use Average True Range (a measure of typical price movement magnitude popularized by J. Welles Wilder) to scale a trailing stop-and-reverse line to prevailing market volatility rather than a fixed price distance. The ratcheting band logic ensures the line never moves against the prevailing trend, which is the defining mechanical property of a trailing-stop-style trend system as opposed to a simple moving average crossover.
• Percentile Ranking for Regime Adaptation
The adaptive factor mechanism applies percentile rank normalization — expressing current ATR as its standing relative to a distribution of its own recent historical values — as a way of contextualizing volatility without relying on a fixed absolute threshold, which allows the same logic to be meaningfully applied across instruments and timeframes with very different baseline volatility levels.
• Ensemble / Majority-Vote Filtering
The Triple Consensus mechanism is a straightforward application of ensemble logic: combining multiple independent estimators (in this case, differently parameterized instances of the same underlying model) and requiring agreement among a majority before acting. This is a well-established technique for variance reduction in signal processing and forecasting contexts, on the premise that independent estimators are less likely to agree by chance during noise-driven, non-trending conditions than during genuine directional moves.
• Wilder's Directional Movement / ADX
The ADX filter is drawn directly from J. Welles Wilder's Directional Movement System, which decomposes price movement into positive and negative directional components and derives a smoothed index (ADX) representing trend strength independent of direction. ADX below common threshold levels is widely associated with range-bound, non-trending conditions in technical analysis literature.
• Recursive State Estimation (Kalman Filtering)
The optional Kalman Filter smoothing method applies a simplified single-state form of the Kalman recursive estimation framework from control theory and signal processing, in which a running estimate is continuously updated by weighting new observations against the estimate's own error covariance, producing a smoothing average that adapts its responsiveness based on recent prediction error rather than using a fixed lookback window.
• Slope-Adjusted Trend Extrapolation (LLAMA)
The LLAMA smoothing option combines a simple arithmetic mean with a linear slope term derived from the change in price over the lookback window, projecting the average forward along the recent trend direction — a lightweight application of linear extrapolation principles used to reduce the inherent lag of simple averaging methods.
• Volume as a Conviction Proxy
The volume filter reflects the broader technical-analysis principle that price movements accompanied by above-average participation carry more informational weight than those on thin volume, a concept with roots in classical volume-price analysis dating back to early technical analysis literature (e.g., Dow Theory's treatment of volume as a confirming factor).
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Smart Trend Filter Confirmation [MarkitTick]💡 A confirmed-bar trend-following system that fuses a volatility-adaptive trailing band with a six-condition consensus filter, designed to suppress the false flips that plague standard trend-following tools when markets stall, chop, or thin out. Rather than reacting to every band cross, the script cross-examines each potential signal against stall detection, slope strength, volume participation, range compression, basis-point movement, and trend strength (ADX) before allowing a flip to display — while retaining a breakout override so genuinely explosive moves are never suppressed by the very filters designed to catch noise.
✨ Originality and Utility
Trailing-band trend systems (Chandelier-style or SuperTrend-style constructs) are common on PulseWire, but nearly all of them share the same weakness: the trailing line flips direction on every price crossover, regardless of whether that crossover reflects a genuine change in market character or simply noise generated during a stalled, illiquid, or compressing market. This script's originality lies in the "Regime Consensus" layer built on top of the adaptive trailing band. Six independent, mathematically distinct filters — measuring band stall, linear-regression slope, relative volume, historical range percentile, basis-point velocity, and ADX-based trend strength — are computed every bar. If any single filter flags a "flat" regime, the display direction is held at its last confirmed state instead of flipping, which materially reduces whipsaw signals in ranging conditions. A dedicated breakout override simultaneously monitors for abnormally large single-bar moves (measured in ATR multiples) and forces the flip through regardless of filter status, ensuring the system does not become sluggish during genuine volatility expansion. This combination — adaptive smoothing of the source price, a volatility- and momentum-weighted dynamic band, a multi-factor flat-market veto, and a breakout bypass — is not a simple mashup of stock indicators but an integrated decision layer where each component directly informs whether the others are permitted to act. The trend line, filters, override, and dashboard are not separable add-ons; they operate as a single signal-gating pipeline.
🔬 Methodology and Concepts
● Adaptive Source Smoothing
Before any band math is applied, the script conditions the underlying HL2-style source price using one of two selectable adaptive filters:
Kalman Filter — a recursive estimator that maintains an internal "belief" about the true price and a corresponding uncertainty (error covariance). Each new bar, the filter computes a gain factor from the ratio of predicted uncertainty to total uncertainty (predicted plus measurement noise, set by the Kalman R input) and blends the new price observation into its estimate proportionally. A higher Kalman Q input allows the estimate to adapt faster to new prices; a higher Kalman R input makes the filter trust new observations less, producing a smoother but slower-reacting line.
LLAMA (an adaptive-length moving average inspired by Kaufman's Efficiency Ratio concept) — measures how efficiently price has moved over the lookback window by comparing net directional change to the sum of all bar-to-bar movement (an efficiency ratio between 0 and 1). This ratio is squared into a smoothing constant that continuously shifts the moving average's responsiveness between a fast EMA-like constant and a slow EMA-like constant, so the average tightens to price during clean directional runs and widens during choppy conditions.
• Dynamic Volatility Band
The core trailing band's half-width is not a fixed ATR multiple. It is calculated from three weighted components: a base multiplier, an ATR-based term scaled by the ATR Weight input, and a normalized recent-price-movement term (capped at its own 95th percentile to prevent single outlier bars from distorting the band) scaled by the Move Weight input. This composite value is then multiplied by the current ATR and smoothed with an exponential moving average (controlled by the Smooth Len input) to prevent the band width itself from jumping erratically bar to bar.
• Trailing Trend Line Construction
The trend line follows classic chandelier-style trailing logic: while price remains above the trend line, the line can only ratchet upward (never retreating below its prior value even if the lower band momentarily dips beneath it); while price remains below the trend line, the line can only ratchet downward. A flip only occurs when confirmed prior-bar closing price crosses to the opposite side of the line.
• Six-Factor Regime Consensus Filter
Before a directional flip is permitted to display, up to six independent conditions are checked. If any active filter flags the market as "flat," the displayed direction holds at its previous confirmed state rather than flipping:
Stall Filter — flags when the trend line's bar-to-bar movement is smaller than a fraction (Flatness input) of current ATR, indicating the line itself has gone quiet.
Slope Filter — runs a short linear regression across recent trend-line values, measures the resulting slope, normalizes it against ATR, and flags when that normalized slope falls below the Slope Thr input.
Volume Filter — flags when confirmed volume falls at or below its own moving average, treating below-average participation as unreliable for a fresh directional call.
Range Filter — flags when the current bar's high-low range falls within the lower percentile band (Range Pct input) of its historical distribution over the Pctile Len lookback, identifying range compression.
BPS Filter — converts the trend line's bar-to-bar movement into basis points relative to price and flags when that figure falls under the Min BPS input, catching moves too small to be economically meaningful.
ADX Filter — computes a standard Directional Movement Index reading and flags when it sits below the ADX Thr input, indicating weak underlying trend strength.
• Breakout Override
Running in parallel to the consensus filters, this component measures the absolute prior-bar price change against a multiple of ATR (Ovr ATR Mult input). If that threshold is exceeded, the override forces the flip through immediately, bypassing every flat-market filter above. This prevents the filter layer from muting the system's response to genuine volatility expansion or breakout conditions.
🎨 Visual Guide
Trend Line — a stepped line plotted along the confirmed trailing band value. It renders in the Bull color when the confirmed direction is up and the Bear color when down; both colors are fully customizable in the Colors group.
Gradient Candles / Bar Coloring — when enabled, chart candles and bars are recolored on a gradient between the Neutral color and the active directional color, with gradient intensity scaled by how far confirmed price has extended from the trend line relative to ATR (capped at 3x ATR for full saturation). A muted candle indicates price sitting close to the trend line; a fully saturated candle indicates an extended move.
Cloud Fill — a semi-transparent fill (opacity set by Cloud Transp) rendered between the trend line and a short moving average of HLC3 (length set by Cloud MA Len), tinted in the active directional color to visually reinforce which side of the trend the market currently occupies.
Bull / Bear Signal Labels — a "Bull" label appears below price the bar a confirmed flip to the up-regime occurs, and a "Bear" label above price on a confirmed flip to the down-regime, provided the Regime Consensus Filter did not veto the flip and Lock Signal is not engaged.
Trade Level Lines and Labels (optional, enabled via Show Trade Levels) — on each new confirmed signal, five lines are drawn forward from the signal bar: an Entry line (at prior confirmed close), a Stop Loss line, and three Take Profit lines (TP1, TP2, TP3), each offset from entry by ATR multiples set in the Trade Tools group. A shaded risk zone connects Entry to Stop Loss, and a shaded reward zone connects Entry to the furthest take-profit line. Each line carries a right-aligned label showing its exact price.
Live Dashboard (optional, position configurable via Dash X / Dash Y) — a compact table summarizing current symbol/timeframe, signal lock state, active direction, current signal status, regime classification (Flat/Trending), breakout override status, active adaptive filter type, current trend-line and ATR values, a visual progress bar for trend strength, and individual on/off/flat status readouts for each of the six regime filters.
Non-Standard Chart Warning — a red-bordered table automatically appears in the top-left corner if the script detects it is being run on a Heikin Ashi, Renko, Line Break, Kagi, or Point & Figure chart, warning that signal reliability is compromised on synthetic chart types.
📖 How to Use
A "Bull" label with the trend line switching to the Bull color signals a confirmed transition to an up-regime that has passed all active consensus filters (or was pushed through by the breakout override).
A "Bear" label with the trend line switching to the Bear color signals the equivalent confirmed down-regime transition.
Because flips are gated by the consensus filter, the absence of a new signal during a period of price consolidation is intentional — the script is treating the move as noise rather than a lack of function. Check the dashboard's individual filter rows to see exactly which condition(s) are currently classifying the market as flat.
The dashboard's "Override" row shows "Engaged" when the Breakout Override has just bypassed the filters — useful for distinguishing a filter-confirmed signal from a volatility-forced one.
When Show Trade Levels is active, treat the Entry/SL/TP lines as a reference risk framework tied to current ATR, not a guaranteed execution plan; always verify levels make sense for the instrument and timeframe before acting on them.
Enable Lock Signal to freeze the current signal state on the most recent bar, useful when reviewing historical signal behavior without new signals interrupting the current view.
If the Non-Standard Chart warning appears, switch to a standard candlestick chart type before relying on any signal from this script.
⚙️ Inputs and Settings
ATR Len — lookback period for the underlying ATR calculation that drives band width and multiple filter thresholds. Shorter values make the band more reactive to recent volatility; longer values smooth it out.
Band Mult, ATR Weight, Move Weight — the three components that combine into the dynamic band multiplier. Band Mult sets a base width, ATR Weight scales the contribution of current ATR relative to price, and Move Weight scales the contribution of recent capped price movement.
Smooth Len — the EMA length applied to the calculated band half-width, controlling how quickly the band itself can widen or narrow.
Adaptive Filter / Filter Type — toggles and selects between Kalman and LLAMA smoothing of the source price feeding the trend line.
Kalman Q / Kalman R — process noise and measurement noise inputs for the Kalman filter; higher Q increases responsiveness, higher R increases smoothing.
LLAMA Len — lookback window for the efficiency-ratio calculation driving the LLAMA adaptive average.
Stall Filter / Flatness — enables the stall check and sets the ATR-relative threshold below which trend-line movement is considered stalled.
Slope Filter / Reg Len / Slope Thr — enables the regression-slope check, sets its lookback window, and sets the normalized slope threshold below which the market is considered flat.
Volume Filter / Vol MA Len — enables the volume check and sets the moving-average length volume is compared against.
Range Filter / Pctile Len / Range Pct — enables the range-compression check and sets the historical lookback and percentile threshold used to classify current range as compressed.
BPS Filter / Min BPS — enables the basis-point movement check and sets the minimum basis-point threshold for a trend-line move to be considered meaningful.
ADX Filter / ADX Len / ADX Thr — enables the ADX-based trend-strength check and sets its calculation length and minimum threshold.
Breakout Ovr / Ovr ATR Mult — enables the override and sets the ATR multiple of single-bar price change required to force a flip through the filters.
Show Trade Levels / SL, TP1, TP2, TP3 ATR Mult — enables the trade-level drawing tool and sets each level's distance from entry as a multiple of ATR.
Bar Coloring, Bull/Bear Marks, Cloud Fill, Cloud MA Len, Cloud Transp — visual toggles and parameters controlling gradient candles, signal labels, and the cloud fill between trend line and reference average.
Show Dash, Dash X, Dash Y — toggles the dashboard and sets its screen position.
Long/Short/Close Action inputs — customizable text strings inserted into the "action" field of each alert's JSON payload, for direct use with automated webhook execution systems.
Colors group — full color customization for bull/bear/neutral states, label text, warning banner, dashboard theme, gradient candle tiers, and trade-level line colors.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The trailing-band mechanism draws on the same volatility-normalized stop methodology popularized by Chandelier Exit-style systems, which themselves extend J. Welles Wilder's Average True Range concept into an adaptive trailing stop: rather than a fixed price distance, the stop distance breathes with recently realized volatility, tightening in calm markets and widening in turbulent ones.
The Kalman filter option applies a classical state-space estimation technique originally developed for aerospace tracking problems (Rudolf Kálmán, 1960). It treats the "true" price trend as an unobserved state to be estimated from noisy observations, recursively updating a prediction and its uncertainty at each time step and weighting new information by a gain term derived from the relative magnitude of prediction versus measurement uncertainty. Applied to price series, it produces a smoothed estimate that adapts its own responsiveness based on the ongoing balance of signal versus noise.
The LLAMA adaptive average is built on an efficiency-ratio concept in the lineage of Perry Kaufman's Adaptive Moving Average research: the ratio of net directional displacement to total path length over a window quantifies how "efficiently" price has trended, and this ratio is used to interpolate the smoothing constant between fast and slow exponential-average bounds. Markets that trend efficiently receive a fast, responsive average; markets that chop inefficiently receive a slow, heavily smoothed one.
The Slope Filter applies ordinary least squares (OLS) linear regression across a short trend-line window to extract a first-derivative estimate (slope) of the trend line's trajectory, normalizing it by ATR so the threshold behaves consistently across instruments and volatility regimes of different scale.
The ADX Filter is grounded in Wilder's Directional Movement System, which decomposes price movement into positive and negative directional components and derives a smoothed trend-strength oscillator independent of direction — a standard framework for distinguishing trending from ranging conditions.
The Range Filter's use of percentile-rank classification reflects a basic non-parametric statistical approach: rather than assuming a normal distribution of high-low ranges, it empirically ranks the current range against its own recent historical distribution, which is more robust to the fat-tailed, non-normal behavior typically observed in financial return and range series.
Collectively, the six-factor consensus mechanism reflects a general principle from ensemble/multi-condition filtering: requiring independent, structurally uncorrelated confirmations to agree (or, here, requiring none to actively veto) before acting on a signal tends to reduce the false-positive rate relative to any single condition acting alone, at the cost of some responsiveness — a classic precision/recall tradeoff which the Breakout Override is specifically designed to mitigate during high-volatility regimes.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

UPDATED: COMBO - EMA/LRI/SuperTrend/HMA StrategyOverview
The EMA / LRI / SuperTrend / HMA Execution Suite is a streamlined overlay designed for intraday momentum traders, scalpers, and trend followers. It combines dynamic trend baselines, statistical breakout evaluation, and multi-tier moving average filters into a single, highly performant script.
By focusing purely on high-probability trend structure and dynamic fair value, this indicator keeps your chart visually clean and clutter-free for quick execution.
Key Features & Components:
Core Purpose: An advanced multi-indicator technical suite specifically designed for futures and stock trading.
Moving Averages & Momentum: Integrates a customizable Exponential Moving Average (EMA), a versatile Hull Moving Average (HMA) with both single and 3-HMA crossover modes, and a directionally-colored Linear Regression Index (LRI) for momentum tracking.
Breakout Probability Engine: Features a SuperTrend overlay enhanced with a relative volume Gaussian Kernel Density Estimation (KDE) model to calculate breakout strength and display confidence percentage labels.
Visual Adjustments: Includes fully customizable vertical offsets and connecting lines for the probability bubbles to maintain clear chart readability.
Comprehensive Alerts: Built-in alert conditions for trend flips, high-confidence breakouts, and moving average or price crossovers against the LRI.
Indicator

Supertrend Twincore [MachineSuiteAI]Supertrend Twincore
🟦 OVERVIEW
A fast Supertrend flips too often; a slow one flips too late. This script runs both at once and only signals when they agree — and then shows you, with win rates and sample sizes, how that agreement has actually performed on the chart you have loaded.
A signal only appears where the fast core (timing) and the slow core (structure) first align, and only if it passes a gate: clustered whipsaw flips always suppress, and every other filter blocks signals only where measurement shows it helps on this chart. Passed signals are graded A/B/C and draw an Entry / SL / TP1-3 ladder whose outcomes are tracked per grade. Suppressed candidates stay as grey ghost chips with the reason, and a five-row multi-timeframe strip shows the consensus state across timeframes from completed bars.
The idea throughout: the chart never claims more than the data supports, and anything the script believes is checkable in the panel.
🟦 WHAT IS A SUPERTREND?
Supertrend is a public-domain trailing-stop indicator: it offsets price by a multiple of the Average True Range and trails that stop behind the trend. Price above the stop means uptrend, below means downtrend; a close across it flips the state. This script computes its cores with the built-in ta.supertrend() — fast 2.0 × ATR(10) and slow 4.0 × ATR(20) by default.
Its known weakness is structural: in ranging markets the stop is repeatedly crossed and the indicator whipsaws. Filters are the usual answer; this script measures whether each one actually helps on the loaded symbol and timeframe, and the marks and the gate act only on that evidence.
🟦 WHY THIS SCRIPT IS ORIGINAL
The base calculation is a built-in, and the ingredients — win-rate panels, ADX gates, higher-timeframe confirmation, multi-timeframe dashboards, take-profit ladders, signal grades — are established ideas. What's different is the standard everything must meet: beyond one fixed whipsaw rule, nothing gets drawn, nothing blocks a signal, and nothing drives the engine unless the measurements on the loaded chart back it up.
- Graded ladder odds with the cost attached. Grades are fixed and published — A means structural confirmation plus volume, B one of the two, C neither; no opaque score. Every passed signal's ladder is tracked to resolution; the panel shows per grade: TP1-before-SL and SL-first rates, the median furthest level, the median heat (largest adverse move, in ATR units) and the median bars to TP1, each with its own sample size.
- An adaptive engine that has to beat the fixed one first. Both fast cores — fixed and adaptive — are measured as separate signal streams on the loaded chart, and the adaptive core only drives signals while it beats the fixed core by a set margin with enough samples. The A/B row shows the running comparison; on defaults it reports the adaptive layer as inert.
- Gates held to the same standard. The ✓ volume mark and ⚠ counter-trend warning only print where their split beats the base win rate by a configurable margin here. The ADX gate only blocks candidates where high-ADX candidates have beaten low-ADX candidates by that margin on this chart.
- Per-condition win-rate splits. The base candidate win rate, then the same measurement split by signal class, higher-timeframe agreement, volume confirmation, multi-timeframe alignment and volatility regime — six statistics, each with its own sample size, greyed below a minimum sample.
- Two kinds of signals, measured separately. A candidate exists only on the first bar the cores align and is classified as a structural confirmation (the slow core just flipped in) or a pullback rejoin (the fast core returned to a standing slow trend); a double flip on one bar is labeled same-bar. They are different trades, measured separately.
- Suppression you can audit. A gated-out candidate still prints — a hollow grey ghost chip with the specific reason — and still counts in every statistic, so the base rate is never inflated by counting only the survivors.
- Visual discipline. The band claims a direction only while both cores agree; its saturation drains as price nears the structural stop, so the exit warning arrives before the flip; NEUTRAL keeps a directional tint, so the last trend stays readable while standing aside. The price scale is held to the same rule — it carries the structural stop and the ladder's Entry, SL and TP1-3, each in its own colour, and nothing else; the band and the fast core draw on the chart but claim no axis label. Every visual property maps to something measured.
🟦 HOW IT WORKS
- Cores: two standard Supertrends — the fast core times entries, the slow core defines structure and is the ladder's trailing stop. Presets: Scalp 1.5×ATR(7)/3.0×ATR(14), Intraday 2.0×ATR(10)/4.0×ATR(20), Swing 3.0×ATR(14)/5.0×ATR(28), or Custom.
- Gate and state model: flip-cluster suppression (2+ fast flips in 10 bars, on by default), the measured ADX gate (default "Where it helps (measured)"), and an optional strict higher-timeframe gate (off by default). The band turns grey NEUTRAL on low ADX (default ADX(14) < 20) or flip clustering.
- Higher-timeframe filter: a third Supertrend one regime up (auto-mapped ≤15m→4H, ≤1H→1D, ≤4H→3D, ≤1D→1W, else 1M; or manual), read from the last completed HTF bar.
- Statistics: on confirmed bars, every candidate — passed and suppressed — resolves N bars later (default 10); a win means the close moved in its direction. Splits grey below the minimum sample (default 20). Chip marks need their split to beat the base rate by ≥3 points (configurable); the ADX gate needs the high-ADX split to beat the low-ADX split by the same margin; volume confirmation is volume above 1.5× its 20-bar average.
- Ladder: at a passed signal's close, Entry is the close, SL is the slow-core stop (or the fast core, or a fixed k×ATR cap), TP1/2/3 default to 1/2/3 × ATR. It trails, marks TP touches ✓, freezes ✕ on an SL break, dims when resolved or consensus is lost, and feeds the per-grade LADDER ODDS rows. A live ladder tracks the right edge of the chart; once its stop is hit it stops there, so it stays a bounded record of that trade — targets it never reached are not credited later just because price eventually passed them, and the frozen right edge makes clear the trade was already over. The stop's ray spans only the stretch where that level was actually in force, because a trailing stop is a staircase rather than one line: on a long it starts below the entry and can ratchet above it, locking in profit, and the amber slow core shows the whole path. Each level prints its exact price on the price scale, so the figure for an order ticket reads straight off the axis while the chart labels stay short. The colours carry the geometry: entry green, the targets in the trade's own direction and the stop in the opposite hue, so the level that ends a trade never reads like the levels that pay it — and the slow core keeps its amber, so the stop stays distinguishable from the line it trails.
- Adaptive engine: a per-volatility-regime fast core A/B-measured against the fixed one, as described above; default factors are inert.
- MTF strip: five rows of full consensus state (UP / DOWN / SPLIT / NEUTRAL, with bars-in-state), each read from that timeframe's last completed bar. Auto mode starts at the chart's own timeframe and climbs — 4H gives 4H/D/W/M/3M. Lower timeframes are omitted by default: their consensus flips many times during a single trade taken here, so it says little about an outcome measured over days. Manual mode accepts any five, defaulting to the classic 15m/1H/4H/D/W.
🟦 HOW TO USE IT
- Read the panel first: consensus state, cores, regime, HTF agreement, then the measured rows. An ↑ means that condition has earned its margin on this chart; its absence means it hasn't.
- Chips carry their evidence: grade letter, live per-grade TP1 odds at sufficient sample, ✓ where volume has helped, ⚠ where fighting the higher timeframe has hurt. Ghost chips mean the script stood aside — the reason is on the chip.
- NEUTRAL and SPLIT mean stand aside. The coach line says this in plain language, and notes that a retouch of the entry after TP1 does not invalidate a live ladder — only the SL does.
- Reversal-only signal mode reserves the headline presentation for slow-core reversals; Discipline display mode strips the chart to the band alone (note: TP/SL alerts only fire while the ladder is drawn).
- Defaults are tuned on liquid crypto from 15-minute to weekly charts; the multipliers and ADX threshold are worth reviewing on other asset classes.
🟦 SETTINGS
Grouped as in the inputs dialog: consensus core (presets or custom multipliers) · higher-timeframe filter · state model & signal gate (ADX, flip-cluster, optional HTF gate, ghost chips) · trade ladder (SL geometry, TP multiples) · grade engine (certified or dynamic wiring) · adaptive engine · MTF strip · visuals and display modes · volume multiple (default 1.5×) · signal stats engine (horizon, minimum sample, gating margin) · JSON webhook alerts.
🟦 ALERTS
Consensus long / short · confirmed reversal long / short · Grade A long / short · TP1 / TP2 / TP3 touched · SL break · NEUTRAL started / ended · volatility regime changed · adaptive engagement changed. Create the classic alert conditions with "Once Per Bar Close" — they evaluate on live bars, and an intrabar state can revert before it counts. Optional JSON alert() events via a single "Any alert() function call" alert: signal events carry grade, entry and levels; TP/SL events identify the touched level; all carry symbol, timeframe, regime and state. The JSON events are close-gated and fire for every passed candidate, including rejoins the Reversal-only display mode demotes.
🟦 REPAINT & DATA NOTES
- All bookkeeping runs on confirmed bars; chips, ladders and statistics commit at bar close. Inside a forming bar the panel's consensus, cores, agreement, volume and coach line update live and are therefore PROVISIONAL — they can revert before the bar shuts. Price can also sit beyond a ladder's stop for the rest of a bar without resolving it: in the core SL modes the stop breaks when that core flips, which needs a confirmed close. The coach line says so when it happens.
- Higher-timeframe and strip values come from each timeframe's last completed bar — no repaint; intrabar changes up there show after that bar closes. The design assumes the HTF sits above the chart's timeframe — with Manual selection, keep it there.
- Ladder TP touches — and the Fixed mode's hard-stop touches — are detected from confirmed bars' highs/lows, starting the bar after entry; a bar touching several levels credits TPs before the stop. In the core SL modes the stop is not touch-based: it resolves only when its core flips, which needs a confirmed close — so a wick through the stop does not end a ladder, and the touch-credited TP rates are structurally friendlier than a hard-stop backtest of the same levels. The Fixed k×ATR mode is the geometry closest to a real hard stop.
- Statistics cover the loaded history and reset when the chart reloads with different history; lower timeframes load fewer bars. Greyed rows just mean the sample is too small to trust.
- Only the most recent 250 chips and ghost chips stay on the chart, so a live ladder's own labels can never be pushed off by PulseWire's drawing limit; deep history keeps its band and cores but not its markers. Ladder odds count each ladder when it resolves, and in the rare case that more than 30 are open at once the oldest is counted at its current state rather than discarded — the sample is never silently trimmed.
- On a live bar the volume ratio is partial; judge it near the close. Volume features require a feed that supplies volume.
🟦 CREDITS
The Supertrend concept is public domain (popularized by Olivier Seban); ATR, ADX and the DMI are J. Welles Wilder's. The fixed cores use PulseWire's built-in ta.supertrend(); the adaptive core re-implements the same algorithm to accept a per-bar factor. The consensus model, candidate classes, statistics engine, gates, grades, measured ladder, ghost chips, strip and band rendering were written from scratch for this script.
🟦 LIMITATIONS
- Supertrend lags by construction, and requiring two cores to agree makes entries later still — fewer, later, more heavily filtered signals is the intended trade-off.
- The NEUTRAL state derives from lagging measures (ADX, flip counts), so the first signals of a new trend can still arrive grey or be suppressed.
- All statistics are direction-only measurements over a fixed horizon; ladder odds are level measurements (TPs credit on a wick touch, core-mode stops resolve only on a confirmed core flip) — no fees, slippage, sizing or equity math. They are not a strategy backtest, they differ per symbol and timeframe, and they do not predict future outcomes.
- Without volume data the volume filter and its split stay inactive, and certified Grade A (confirmation + volume) is out of reach — signals cap at Grade B on volume-less feeds. Sample sizes on higher timeframes are structurally small; expect greyed rows there.
- The same asset on two different venues can show opposite states. A Supertrend flip is a threshold event: when price sits within a fraction of a percent of the band, a normal inter-exchange spread of a few basis points decides whether it crosses, and once one venue flips its stop jumps to the other side of price, so two nearly identical charts diverge sharply. This is inherent to the calculation, not a data error — treat a signal as belonging to the feed it was measured on, and check the panel's sample sizes on the venue you actually trade.
🟦 DISCLAIMER
This is an educational analysis tool, not investment advice. Historical measurements, however carefully computed, do not predict future results. Trading involves substantial risk.
Indicator

Adaptive SuperTrend AI - Regime-Tuned [Dots3Red]📈 ADAPTIVE SUPERTREND AI — REGIME-TUNED
Classic SuperTrend uses one fixed ATR multiplier forever. That single number is a compromise: tight enough to track trends closely, it whipsaws during ranges; wide enough to survive ranges, it lags badly once a real trend starts. This script replaces the fixed multiplier with one that changes based on what kind of market is actually happening, using the same regime-detection engine shared across the Dots3Red catalog.
🧠 THE REGIME ENGINE
Every bar is classified into one of four states using ADX and the Choppiness Index together:
• 📈 TRENDING — ADX confirms directional strength and Choppiness confirms low chop
• 🔁 RANGING — the opposite: weak directional strength, high chop
• ⚡ VOLATILE — current ATR has expanded well beyond its baseline, regardless of direction or chop
• ❔ UNCERTAIN — none of the above conditions are clearly met
The raw regime reading is smoothed by taking the most frequent classification over a short lookback window, so a single noisy bar can't flip the regime label back and forth.
🤔 WHY RANGING GETS THE WIDEST BAND, NOT TRENDING
This is the part that looks backwards at first glance, so it's worth explaining directly. A ranging market chops back and forth around a mean — if the band were narrow here, ordinary noise would cross it constantly, causing false flips. So RANGING gets the widest multiplier (default 3.5×), letting normal chop stay inside the band. A TRENDING market is moving with genuine conviction, so a moderate multiplier (default 2.5×) tracks the move closely without giving back excessive profit before flipping on an actual reversal. VOLATILE conditions get the widest multiplier of all (default 4.5×) as a purely defensive setting, since sudden expansion is unpredictable by nature.
When the regime changes, the active multiplier doesn't jump to its new value instantly — it glides toward it over a configurable number of bars. This prevents the band from visibly teleporting on a regime transition, which would otherwise look jarring and could itself trigger a false flip right at the transition point.
The underlying band mechanics — the ratcheting upper/lower band logic, and a flip only when price closes beyond the active band — are the same as classic SuperTrend. Only the multiplier driving the band width is dynamic.
✅ THE CONFIDENCE LAYER
A SuperTrend flip is a single binary event: price crossed the band, direction changed. This script adds a secondary read on how convincing that flip actually is, using 8 independent checks against the new direction:
1. Close vs. a trend moving average
2. MACD histogram sign
3. Recent higher-high / lower-low structure
4. Close vs. the SuperTrend's own midline (hl2)
5. RSI side of 50
6. +DI vs. -DI dominance
7. Volume above its moving average on a trend-direction bar
8. Whether the regime is currently TRENDING
Every confirmed flip shows this count directly on its label — "▲ 6/8" means 6 of the 8 checks currently agree with the new uptrend. A flip with 7/8 agreement and one with 3/8 are treated identically by the raw band mechanics, but this layer gives a way to distinguish a well-supported flip from a marginal one at a glance.
🎯 FLIP WIN-RATE TRACKING
Each flip is graded once the following flip occurs: did price actually finish above the flip price (for an up-flip) or below it (for a down-flip) by the time direction changed again? This produces a running win rate — for example "58% (n=34)" — shown in the dashboard. It is a simple, honest measure of how the flips on this specific chart have actually played out, not a backtest or a promise about future flips.
🔒 NON-REPAINTING
Flips, confidence readings, and labels are all evaluated only on confirmed (closed) bars. A flip that appears on the chart will not later disappear or move to a different bar as new price data arrives.
🎨 VISUALS AND CUSTOMIZATION
The SuperTrend line and gradient fill are colored by current direction. Flip labels appear directly on confirmed flip bars with their confidence count. An optional background tint can shade the chart by current regime. All four core colors (bullish, bearish, volatile/warning, and uncertain/neutral) are fully customizable in settings, independent of the script's default palette.
The dashboard (position configurable) shows: current direction, current regime, the active ATR multiplier, the confidence count with a progress bar, the running flip win rate, and the raw ADX, Choppiness, and ATR ratio readings behind the regime classification.
🧭 HOW TO USE
👀 Reading the line and fill — the colored line and gradient fill show current direction at a glance. This is the same information classic SuperTrend gives you; the difference here is in how the band width behind that line was chosen.
🧠 Check the regime before trusting the band width — the dashboard's Regime row tells you why the band is currently as wide (or narrow) as it is. A band that looks unusually wide isn't a bug — it likely means the engine has classified the market as RANGING or VOLATILE and widened defensively. Knowing the current regime helps set expectations for how the band will behave if conditions stay the same.
✅ Use the confidence count to gauge flip quality, not to filter flips — every flip is real and non-repainting regardless of its confidence count. The count is a lens for judging how broadly supported a given flip is, not a gate that decides whether one occurs. A "▲ 7/8" flip and a "▲ 3/8" flip both mean the band was crossed; the number tells you how much independent agreement existed at that moment, which is useful context when deciding how much weight to put on that particular signal versus your own analysis.
🎯 Watch the flip win rate as a running self-check on this chart — because it only starts once flips have accumulated and been graded, treat an early or low-sample win rate as inconclusive rather than a verdict. It becomes more informative the longer the script runs on a given symbol and timeframe.
🔔 Regime changes are themselves informative — the alert for a regime change fires independently of any flip. A shift from RANGING to TRENDING, for example, can be useful context on its own, since it signals the band is about to glide toward a different multiplier even before any flip occurs.
🚫 This script describes band behavior, not entries or exits — it does not tell you when to open or close a position. Use it as one input alongside price action, structure, and whatever other analysis you already rely on.
⚙️ SETTINGS
📈 SuperTrend Core
• ATR Length
• Factor — Trending / Ranging / Volatile / Uncertain — the four regime-driven multipliers
• Factor Transition (bars) — how gradually the multiplier glides between regimes
🧠 Regime Engine
• ADX Length, Choppiness Length, ATR Baseline Period
• Trending / Ranging Thresholds — where the combined ADX+Choppiness score is classified
• Volatile ATR Multiple — how far above baseline ATR counts as volatility expansion
• Regime Smoothing — lookback window for the majority-vote smoothing
✅ Confidence Layer
• Trend MA Length, RSI Length, Structure Lookback — parameters for the 8 confidence checks
🎨 Visualization
• Gradient Fill, Flip Labels, Regime Background Tint — each toggleable independently
• Full color customization for all four regime/direction colors
🖥️ Dashboard
• Show/hide, position
📝 NOTES
The regime engine needs a short warm-up period before its smoothing window is fully populated; early bars on a fresh chart may show less stable regime labels than bars further along. The flip win rate starts empty and only becomes meaningful after several flips have occurred and been graded.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical flip win rate does not guarantee future performance. Indicator

5 Trend Indicators Combo IndicatorThe 5 Trend Indicators Combo with Retest Logic: A Comprehensive Guide
The "5 Trend Indicators Combo Indicator" is an advanced, multi-faceted technical analysis tool built using Pine Script for PulseWire. Its primary purpose is to identify high-probability trend reversals and continuations by aggressively filtering out market noise and minimizing false breakout signals. Instead of relying on a single, isolated metric—which can often be misleading—this script utilizes a robust "confluence" methodology. It systematically evaluates five distinct, highly respected trend-following indicators, aggregating their individual statuses into a unified scoring system. Furthermore, it elevates standard signal generation by incorporating an intelligent pullback (retest) mechanism, explicitly designed to optimize entry prices so that traders do not buy at the absolute top or sell at the bottom of a sudden, volatile price spike. Additionally, it features a built-in graphical dashboard that allows traders to instantly monitor the bullish or bearish status of all five indicators in real-time.
Working Mechanism: How does it detect trading signals?
The core engine of this script evaluates five technical pillars, each contributing a maximum of one point to a total "Bull Score" or "Bear Score":
1. Exponential Moving Average (EMA): Defaulted to a 50-period length, the EMA establishes the chart's baseline directional bias. A bullish point is awarded if the current closing price is strictly above the EMA, and a bearish point is given if it is below.
2. Average Directional Index (ADX) & DMI: This component measures the absolute strength and direction of a trend. To score a point, the ADX value must exceed a specific threshold (defaulted to 20), acting as a strict filter to ensure the market is actually trending rather than chopping in a sideways range. Once this threshold is met, the Directional Indicators dictate the bias: +DI must be greater than -DI for a bullish point, and vice versa for a bearish point.
3. Moving Average Convergence Divergence (MACD): Operating with standard 12, 26, and 9 periods, the MACD assesses momentum shifts. The script requires strict criteria here: for a bullish score, the MACD line must be above the Signal line *and* above the zero baseline. Bearish points require the MACD line to be completely below both.
4. Supertrend:Utilizing a multiplier of 3.0 and an ATR period of 10, the Supertrend acts as a volatility-adjusted trailing stop. It awards a point depending on whether the current trend is mathematically calculated as bullish (direction < 0) or bearish (direction > 0).
5. Ichimoku Cloud (Kumo): The script analyzes the relationship between the closing price and the Kumo (Cloud), which is defined by Senkou Span A and Span B projected 26 periods into the future. A bullish point is granted only if the price has successfully broken out above the top boundary of the cloud, signifying dominant long-term momentum. A bearish point requires a breakdown below the bottom boundary.
Once the overall score is tallied (ranging from 0 to 5), the script compares it against a user-defined "Minimum Confluence Score". When the score crosses this threshold, an initial trend signal is generated. However, the script's standout technical feature is its "Retest / Pullback" logic. Instead of firing the final execution alert immediately upon the breakout, the script enters a "pending" state. It calculates a dynamic retracement target using an Average True Range (ATR) multiplier. For a buy signal, the price must briefly retrace down to `Close - (ATR * Multiplier)`. The script waits for a maximum number of candles (default is 3) for this pullback to occur. If the price successfully touches this retest level, a highly optimized, safe entry is signaled. If the time expires without a retest, the script automatically fires a delayed entry to ensure the trader does not miss a runaway trend.
How to Use: Optimal Settings and Suitable Markets
To deploy this indicator effectively, traders should focus on optimizing the 'Minimum Confluence Score'. A score of 3 is the recommended baseline, offering a healthy balance between trade frequency and signal accuracy. Increasing this to 4 or 5 will result in much stricter, albeit fewer, high-conviction signals. The Retest ATR Multiplier and Max Wait Bars must be adjusted according to the timeframe; faster timeframes might require smaller ATR multipliers to successfully catch brief micro-pullbacks before the timer expires.
Regarding suitable markets, this indicator is exclusively designed for trending environments. It performs exceptionally well in high-liquidity, directional markets such as major Forex pairs (e.g., EUR/USD, GBP/JPY), large-cap cryptocurrencies (Bitcoin, Ethereum), and major stock indices (S&P 500, NASDAQ). Because it relies heavily on trend-following logic and moving averages, it is most appropriate for medium to higher timeframes, particularly the 1-hour, 4-hour, and Daily charts. Using it on extremely low timeframes (like 1-minute or 3-minute charts) may expose it to excessive intraday noise and erratic wicks, though the ADX filter and Retest mechanism will actively attempt to mitigate those risks. Ultimately, this script transforms a standard chart into a highly systematic, rule-based trading system. Indicator

SuperTrend Ensemble [MiesOnCharts]SuperTrend Ensemble
Any single SuperTrend lives or dies by one number, its ATR multiplier. Set it tight and the line hugs price, flipping early but also flipping on noise. Set it wide and it only turns on real trends, but you give back a lot of profit waiting for confirmation. There's no multiplier that's right all the time, so this indicator stops picking one.
Instead it runs a whole bench of SuperTrends at once, stepping the ATR multiplier from an aggressive low value up to a conservative high one. Each member keeps its own ratcheting stop and its own regime (long or short), completely independent of the others. Every bar, each member votes: is it long or short right now. The ensemble only calls a trend when a supermajority of members agree, which means even the cautious wide-multiplier members have come around. A single twitchy member flipping does nothing on its own.
The line you see plotted is the average of every member's stop, so it moves like a single trailing stop but reflects the whole bench's opinion rather than one arbitrary setting.
Settings:
Min ATR Multiplier / Max ATR Multiplier / Multiplier Step: defines the bench, the low end is the aggressive members, the high end is the conservative ones, and the step controls how many members sit in between.
ATR Length: the volatility lookback each member uses to size its stop distance.
Supermajority Vote Share: how much agreement is needed before the ensemble flips. Higher means fewer, more confident signals, lower means faster reactions with less consensus.
The line changes color and triangles mark the bars where the ensemble itself flips, and alerts are included for both directions.
Disclaimer
The indicator provided is not financial advice. Always conduct your own research and consider multiple factors before making trading decisions. Trade at your own risk. Indicator

Innovation-Gated Hull Supertrend [BackQuant] Innovation-Gated Hull Supertrend
Overview
Innovation-Gated Hull Supertrend is an adaptive trend-following overlay that combines three distinct signal-processing components:
A Hull Moving Average projection for responsive trend estimation.
An innovation-gated recursive filter for adaptive noise reduction.
A volatility-based Supertrend applied to the filtered Hull estimate.
The indicator is designed to behave differently during quiet and active market conditions.
When the Hull estimate changes only slightly relative to recent volatility, the innovation gate restricts how much of that movement is admitted into the filtered trend estimate. The Supertrend bands can also expand during these quieter conditions, reducing sensitivity to minor fluctuations.
When a larger and statistically more meaningful change occurs, the gate opens. The recursive filter becomes more responsive, the Supertrend bands return closer to their base width, and the model is allowed to react more quickly.
The result is a trend framework that attempts to balance two competing requirements:
Remain stable when price movement is small and noisy.
Respond more quickly when new information produces a meaningful displacement.
The indicator does not predict future prices. It is a causal trend model that adapts its response according to the size of newly arriving information relative to the current volatility environment.
Core calculation chain
The complete calculation can be summarised as:
Calculate a Hull Moving Average projection from the selected price source.
Estimate current volatility using ATR, standard deviation, or a blend of both.
Compare the Hull projection with the recursive filter’s previous estimate.
Normalise that difference by volatility to calculate an innovation score.
Pass the score through a smooth logistic gate.
Use the gate to adapt the recursive filter’s measurement and process uncertainty.
Generate the innovation-filtered Hull estimate.
Optionally adapt the Supertrend band multiplier using the same gate.
Apply Supertrend logic around the filtered Hull estimate.
Generate bullish and bearish regime changes when the Supertrend changes sides.
Each stage solves a different problem.
The Hull projection provides a responsive directional input. The innovation filter decides how much of that input should be trusted. The Supertrend then converts the filtered estimate into a persistent trailing regime.
Historical background
The indicator combines ideas from several areas of technical analysis and signal processing.
Hull Moving Average
The Hull Moving Average was developed by Alan Hull as a method of reducing lag while preserving a smooth output.
Traditional moving averages face a basic trade-off:
Short averages respond quickly but contain more noise.
Long averages are smoother but react later.
The Hull Moving Average attempts to improve this balance by combining weighted moving averages of different lengths.
Its general construction is:
Fast WMA = WMA of price over approximately half the main length.
Slow WMA = WMA of price over the full length.
Raw Hull = 2 × Fast WMA - Slow WMA.
Final Hull = WMA of the Raw Hull over the square root of the main length.
The subtraction stage compensates for some of the delay introduced by the longer average. The final square-root smoothing stage reduces noise in the compensated series.
Recursive estimation and the Kalman-filter principle
The innovation filter is based on the general recursive-estimation framework associated with Kalman filtering.
The Kalman filter was developed by Rudolf E. Kálmán and became widely used in engineering, navigation, aerospace, robotics and control systems.
A recursive estimator typically follows two stages:
Predict the current state from the previous state.
Correct that prediction using the newest observation.
The correction depends on how uncertain the model is and how reliable the new observation is believed to be.
The difference between the observation and prediction is called the:
Innovation
In this indicator:
The observation is the current Hull projection.
The prediction is the previous filtered estimate.
The innovation is the difference between them.
A large innovation means the Hull projection has moved significantly away from the model’s prior estimate.
A small innovation means the new observation is close to what the model already expected.
Supertrend
Supertrend is a volatility-trailing concept built from an underlying price reference and ATR-based bands.
Its basic structure consists of:
An upper band above the reference.
A lower band below the reference.
One-sided trailing behaviour.
A regime switch when price crosses the opposing band.
In a bullish regime, the lower band acts as the active trail.
In a bearish regime, the upper band acts as the active trail.
This indicator modifies the conventional approach in two important ways:
The central reference is the innovation-filtered Hull estimate rather than a normal price midpoint.
The band multiplier can adapt according to the innovation gate.
Stage 1: Hull projection
The first stage calculates the Hull projection from the selected price source.
The script determines:
The full Hull length.
A half-length rounded to a valid integer.
A square-root length rounded to a valid integer.
It then calculates:
Fast WMA = WMA(source, half length)
Slow WMA = WMA(source, full length)
Raw Hull = 2 × Fast WMA - Slow WMA
Hull Projection = WMA(Raw Hull, square-root length)
The Hull projection is more responsive than many conventional moving averages of a similar nominal length.
However, responsiveness also means it can react to short-lived movements. For that reason, the Hull projection is not used directly as the final trend line. It becomes the observation supplied to the innovation filter.
Hull Length
The Hull Length controls the underlying trend horizon.
Lower values:
React more quickly.
Follow shorter trend legs.
Produce more local changes.
Admit more short-term noise into the next stage.
Higher values:
Produce a smoother projection.
Focus on broader trend structure.
Respond later to sudden reversals.
The Hull Length therefore controls the basic timescale of the model before any adaptive filtering or Supertrend logic is applied.
Stage 2: Volatility model
The innovation must be interpreted relative to current market conditions.
A movement of 10 points may be large in a quiet market but insignificant in a highly volatile market.
The indicator therefore normalises the innovation using a selectable volatility estimate.
Three modes are available:
ATR
Standard Deviation
Blend
ATR mode
Average True Range measures recent trading range while accounting for gaps from the previous close.
True Range is based on the greatest of:
Current high minus current low.
Absolute current high minus previous close.
Absolute current low minus previous close.
ATR then smooths True Range across the selected Volatility Length.
ATR is useful because it measures the realised movement range of the instrument.
It is sensitive to:
Wide candles.
Price gaps.
Range expansion.
Standard Deviation mode
Standard deviation measures how widely the Hull projection has varied around its recent mean.
It is a dispersion measure rather than a range measure.
Standard deviation responds to:
Variation in the selected series.
Directional displacement.
Changes in the distribution of the filtered input.
While ATR focuses on bar range, standard deviation focuses on dispersion of the Hull series itself.
Blend mode
Blend mode calculates the average of ATR and standard deviation.
Conceptually:
Blended Volatility = (ATR + Standard Deviation) / 2
This provides a combined estimate incorporating:
Observed range behaviour.
Statistical dispersion of the Hull projection.
Neither measure is universally superior. The blend attempts to reduce dependence on only one definition of volatility.
Volatility Length
The Volatility Length controls how quickly the normalisation baseline changes.
Lower values:
React faster to recent volatility changes.
Cause the innovation score to adjust more quickly.
May make the gate less stable.
Higher values:
Produce a slower volatility baseline.
Create more consistent normalisation.
May respond later when volatility changes abruptly.
The volatility estimate is prevented from falling below the instrument’s minimum tick size, avoiding unstable division during extremely quiet periods.
Stage 3: Innovation calculation
The filter begins each bar with a prediction.
In this implementation, the prediction is the previous filtered estimate.
The innovation is:
Innovation = Hull Projection - Previous Filter Estimate
The innovation may be positive or negative.
A positive value means the Hull projection is above the prior estimate.
A negative value means it is below the prior estimate.
The absolute innovation measures the size of the disagreement regardless of direction.
Innovation score
The raw innovation is normalised by current volatility:
Innovation Score = |Innovation| / Volatility
This expresses the new movement in volatility units.
For example:
A score of 0.25 means the innovation is approximately one quarter of the selected volatility measure.
A score of 1.00 means it is approximately equal to that volatility measure.
A score above 1.00 means the change is larger than the current volatility baseline.
The score is dimensionless, making it more comparable across instruments and price scales.
This is the key quantity used to determine whether the filter should remain cautious or become more responsive.
Stage 4: Logistic innovation gate
The innovation score is passed through a logistic function.
The logistic function has the form:
Gate = 1 / (1 + exp(-x))
Its output remains between zero and one.
In the indicator, the gate input depends on:
Innovation Score
Innovation Threshold
Gate Sharpness
Conceptually:
Gate Input = Sharpness × (Score - Threshold)
When the score is below the threshold:
The gate approaches zero.
The filter treats the new Hull movement cautiously.
When the score rises above the threshold:
The gate moves toward one.
The filter becomes more willing to admit the new movement.
The logistic function creates a smooth transition rather than a hard on/off switch.
This is important because a binary threshold could cause abrupt changes whenever the score moves slightly above or below one exact value.
Innovation Threshold
The Innovation Threshold determines where the gate begins moving from a quiet state toward an active state.
Higher values:
Require a larger volatility-normalised innovation.
Keep the filter conservative for longer.
Reject more moderate changes.
Lower values:
Open the gate sooner.
Increase responsiveness.
Allow smaller movements to influence the estimate.
The threshold should be interpreted in relation to the selected volatility model.
Gate Sharpness
Gate Sharpness controls how rapidly the logistic gate transitions around the threshold.
Lower sharpness:
Creates a gradual transition.
Produces a wider intermediate region.
Changes responsiveness smoothly.
Higher sharpness:
Makes the gate behave more like a hard switch.
Creates a faster transition near the threshold.
Produces stronger separation between quiet and active states.
An extremely high value can make the adaptive behaviour abrupt, while a low value may reduce the distinction between quiet and active conditions.
Admission Floor
The gate is converted into an admission value.
The Admission Floor ensures that the filter never completely ignores the Hull projection.
The admission calculation is:
Admission = Floor + (1 - Floor) × Gate
When the gate is near zero:
Admission remains near the selected floor.
When the gate is near one:
Admission approaches one.
A lower floor creates stronger filtering during quiet conditions.
A higher floor keeps the model more responsive even when innovation is small.
This setting prevents the estimator from becoming fully frozen.
Stage 5: Adaptive recursive update
The admission and gate values modify two uncertainty terms:
Measurement noise.
Process noise.
These terms control how the recursive filter balances its existing estimate against the new Hull observation.
Measurement Noise
Measurement Noise represents uncertainty in the incoming Hull projection.
Higher measurement noise tells the filter:
Trust the new observation less.
Remain closer to the previous estimate.
Produce more smoothing.
Lower measurement noise tells the filter:
Trust the Hull projection more.
Correct the estimate more aggressively.
Become more responsive.
The script adapts measurement noise using the admission value:
Adaptive Measurement Noise = Base Measurement Noise / Admission
When admission is low:
Measurement noise increases.
The new Hull movement receives less weight.
When admission is high:
Measurement noise moves closer to its base value.
The filter becomes more receptive.
Process Noise
Process Noise represents uncertainty in the filter’s current state model.
Higher process noise tells the estimator:
The underlying trend may be changing.
The previous estimate may no longer be reliable.
Allow faster adaptation.
Lower process noise tells it:
Assume the existing state remains relatively stable.
Change the estimate more cautiously.
The script increases process noise as the gate opens:
Adaptive Process Noise = Base Process Noise × (1 + Process Boost × Gate)
This creates a two-sided adaptive response.
During quiet conditions:
Measurement noise increases.
Process noise remains closer to its base level.
The filter resists small changes.
During high-innovation conditions:
Measurement noise decreases toward its normal value.
Process noise increases.
The filter becomes substantially more responsive.
Process Boost
Process Boost controls how strongly the process uncertainty expands when the gate opens.
Higher values:
Allow faster response to large innovations.
Increase the filter gain during active movement.
Can make the model more sensitive after shocks.
Lower values:
Keep behaviour closer to the base recursive filter.
Produce more controlled adaptation.
May respond more slowly to genuine regime changes.
Covariance and filter gain
The recursive filter maintains an internal covariance representing uncertainty in its estimate.
Before the new observation is processed:
Predicted Covariance = Previous Covariance + Adaptive Process Noise
The filter gain is then:
Gain = Predicted Covariance / (Predicted Covariance + Adaptive Measurement Noise)
The gain remains between zero and one.
A low gain means:
The previous estimate receives more influence.
The Hull observation receives less influence.
A high gain means:
The filter moves more strongly toward the current Hull projection.
The new estimate is:
Filtered Hull = Prediction + Gain × Innovation
The covariance is then updated for the next bar.
Why the filter is innovation-gated
A normal recursive filter may use constant process and measurement noise settings.
That means its responsiveness is broadly fixed.
This indicator changes those terms according to the size of the innovation.
The model therefore behaves differently under two broad conditions.
Quiet condition
When the Hull projection remains close to the prior estimate relative to volatility:
Innovation score is low.
Gate remains mostly closed.
Admission is limited.
Adaptive measurement noise rises.
Process noise remains lower.
Filter gain falls.
The filtered Hull changes more slowly.
Active condition
When the Hull projection moves meaningfully away from the prior estimate:
Innovation score rises.
Gate opens.
Admission approaches one.
Measurement noise decreases.
Process noise increases.
Filter gain rises.
The estimate adapts more quickly.
This allows the model to filter small movement without applying the same degree of resistance to every large move.
Stage 6: Innovation-adaptive Supertrend bands
The filtered Hull becomes the centre of the Supertrend calculation.
The initial raw bands are:
Upper Band = Filtered Hull + Factor × ATR
Lower Band = Filtered Hull - Factor × ATR
The Supertrend uses its own ATR Period, which is independent of the volatility length used by the innovation score.
This distinction is important:
Innovation volatility determines whether the filter should admit new information.
Supertrend ATR determines the distance of the trailing regime bands.
Adaptive band factor
When Adapt Bands With Innovation is enabled, the Supertrend factor changes according to the gate.
The adaptive factor is:
Adaptive Factor = Base Factor ×
When the gate is near one:
The adaptive factor approaches the base factor.
Bands become relatively tighter.
The Supertrend can respond more readily.
When the gate is near zero:
The factor expands above its base value.
Bands become wider.
Minor price fluctuations are less likely to cause a reversal.
This creates coordinated adaptation:
Quiet conditions produce stronger filtering and wider bands.
Active conditions produce faster filtering and narrower bands.
The same innovation state therefore influences both the centre estimate and the trailing threshold.
Quiet Band Expansion
Quiet Band Expansion controls how much wider the Supertrend factor becomes when the innovation gate is closed.
A value of zero disables the expansion effect even if band adaptation is enabled.
Higher values:
Create wider bands during low-innovation conditions.
Reduce quiet-market reversals.
Delay new signals until price moves further.
Lower values:
Keep the adaptive factor closer to its base setting.
Allow more responsive regime changes.
The expansion is greatest when the gate is near zero and fades as the gate opens.
Supertrend trailing logic
The raw upper and lower bands are converted into one-sided trailing bands.
The lower band is prevented from moving downward while price remains above its previous value.
The upper band is prevented from moving upward while price remains below its previous value.
This ratcheting behaviour creates:
A rising lower trail during bullish conditions.
A falling upper trail during bearish conditions.
A trend change occurs when price crosses the active opposing boundary.
In a bullish regime:
The lower band is the active Supertrend.
In a bearish regime:
The upper band is the active Supertrend.
ATR Period and Factor
ATR Period
Controls the volatility horizon used to construct the Supertrend bands.
Lower values:
React faster to current range changes.
Produce more variable band widths.
Higher values:
Produce a steadier range estimate.
Respond more slowly to sudden volatility changes.
Factor
Controls the base distance between the filtered Hull and the Supertrend bands.
Lower factors:
Create tighter bands.
Produce earlier regime changes.
Increase sensitivity to noise.
Higher factors:
Create wider bands.
Produce fewer regime changes.
Increase confirmation delay.
When adaptation is enabled, the selected factor acts as the minimum or active-condition factor. Quiet conditions may expand it further.
Trend signals
The indicator generates a long signal when the Supertrend changes into its bullish state.
It generates a short signal when the Supertrend changes into its bearish state.
The signal requires the completed calculation chain:
Hull projection.
Innovation filtering.
Adaptive band factor.
Supertrend regime change.
The plotted symbols are:
𝕃 for a bullish transition.
𝕊 for a bearish transition.
These markers identify regime changes. They are not complete trading systems and do not define stop placement, position size or profit targets.
Innovation impulse alert
The script also includes an Innovation Impulse alert.
This occurs when the innovation score crosses above the selected Innovation Threshold.
It indicates that:
The difference between the Hull projection and the recursive estimate has become large relative to volatility.
The gate is entering a more active state.
The filter is beginning to admit new information more aggressively.
An innovation impulse does not necessarily produce an immediate Supertrend reversal.
It can occur:
During acceleration within an existing trend.
At the beginning of a possible regime change.
During a temporary volatility shock.
It is therefore best interpreted as an information-arrival event rather than an automatic long or short signal.
Visual components
Hull Projection
Displays the unfiltered Hull Moving Average input.
This is useful for comparing:
The responsive raw projection.
The innovation-filtered result.
The final Supertrend.
The Hull projection will generally react first.
Filtered Hull
Displays the recursive innovation-gated estimate.
The distance between the Hull projection and filtered Hull helps illustrate the filter’s current behaviour.
During quiet conditions:
The filtered Hull may lag behind small changes.
During meaningful innovations:
It can move more rapidly toward the Hull projection.
IGH Supertrend
Displays the final volatility trail around the filtered Hull.
It is the primary regime output.
The line is coloured according to the persistent bullish or bearish trend state.
Candle colouring
Candles may be coloured according to the active Supertrend regime:
Bullish colour during the long regime.
Bearish colour during the short regime.
This provides immediate chart-wide directional context.
How to interpret the indicator
Bullish regime
A bullish regime indicates that price has crossed into the bullish side of the adaptive Supertrend structure.
The active trail is positioned below the market and can be interpreted as:
A dynamic trend boundary.
A possible pullback reference.
A regime invalidation guide.
Bearish regime
A bearish regime indicates that price has crossed into the bearish side of the adaptive structure.
The active trail is positioned above the market and may act as:
Dynamic resistance.
A rally reference.
A bearish regime invalidation guide.
Low innovation score
A low score means the current Hull movement is small relative to volatility.
The model responds by:
Filtering more strongly.
Reducing admission.
Using a lower recursive gain.
Potentially expanding the Supertrend bands.
This is intended to reduce reactions to small fluctuations.
High innovation score
A high score means the Hull projection has changed substantially relative to volatility.
The model responds by:
Opening the gate.
Increasing admission.
Increasing process uncertainty.
Raising the filter gain.
Reducing quiet-condition band expansion.
This allows a faster response when the incoming information is more significant.
Rising Hull without a trend flip
The Hull projection may turn before the filtered Hull or Supertrend.
This means:
The fast input has changed.
The adaptive filter has not yet admitted enough of that change.
The Supertrend boundary has not yet been crossed.
This is not an error. It demonstrates the staged confirmation design.
Innovation impulse without trend reversal
An innovation impulse can occur without a long or short signal.
This may indicate:
Acceleration in the existing trend.
A volatility shock.
An attempted reversal that has not crossed the Supertrend.
The Supertrend remains the final regime layer.
How to use the indicator
1. Trend regime filter
Use the active Supertrend state to filter another entry method:
Prioritise long setups during bullish regimes.
Prioritise short setups during bearish regimes.
2. Pullback framework
In a bullish regime, pullbacks toward the Supertrend may represent tests of the active trend boundary.
In a bearish regime, rallies toward the Supertrend may represent resistance tests.
A touch alone does not guarantee continuation.
3. Innovation monitoring
The innovation alert can be used to identify when the model detects a meaningful change in its input.
This may help direct attention to:
Fresh acceleration.
Breakout attempts.
Possible trend transitions.
4. Confirmation framework
The three optional lines can be read as a progression:
Hull projection changes first.
Filtered Hull adapts according to innovation.
Supertrend confirms the final regime.
This allows users to study the difference between early movement and confirmed structure.
5. Trailing risk reference
The final Supertrend may be used as a visual trailing reference.
However, it does not account for:
Account size.
Position size.
Slippage.
Liquidity.
Maximum acceptable loss.
It should not replace a complete risk-management process.
Parameter interaction
The settings should not be tuned independently without considering how they interact.
More responsive configuration
A more responsive setup may use:
Lower Hull Length.
Lower Innovation Threshold.
Higher Admission Floor.
Lower Measurement Noise.
Higher Process Noise or Process Boost.
Lower Supertrend Factor.
Lower Quiet Band Expansion.
This will generally produce earlier changes but more noise.
More conservative configuration
A more conservative setup may use:
Higher Hull Length.
Higher Innovation Threshold.
Lower Admission Floor.
Higher Measurement Noise.
Lower Process Boost.
Higher Supertrend Factor.
Higher Quiet Band Expansion.
This will generally create fewer transitions but greater delay.
Balanced interpretation
Changing several settings in the same direction can produce an extreme result.
For example:
A very low threshold, high admission floor, large process boost and tight Supertrend factor may overreact.
A very high threshold, low admission floor, high measurement noise and wide Supertrend factor may respond excessively slowly.
The appropriate balance depends on the instrument, timeframe and intended holding period.
How this differs from a standard Hull trend indicator
A standard Hull trend indicator normally uses:
Hull slope.
Price crossing the Hull.
A fast and slow Hull comparison.
This indicator instead:
Uses the Hull as an observation.
Measures its disagreement with a recursive estimate.
Normalises that disagreement by volatility.
Adapts the filter gain according to the innovation.
Applies a final Supertrend regime around the filtered result.
The Hull is therefore the beginning of the model, not the final signal.
How this differs from a fixed Kalman-style filter
A fixed recursive filter uses constant uncertainty settings.
Innovation-Gated Hull Supertrend adapts both measurement and process uncertainty according to the normalised innovation.
This means:
Small innovations are filtered more heavily.
Large innovations receive greater admission.
The response speed is therefore state dependent.
How this differs from a standard Supertrend
A standard Supertrend is commonly centred around a raw price reference such as HL2.
This indicator uses:
A responsive Hull projection.
An innovation-gated recursive estimate of that projection.
An optionally adaptive band multiplier.
The Supertrend is therefore built around a filtered trend estimate rather than raw price alone.
Strengths
Combines responsive and stable trend-processing stages.
Normalises new movement by current volatility.
Uses a smooth gate rather than a binary threshold.
Adapts measurement and process uncertainty.
Can widen trend bands during quiet conditions.
Can respond more rapidly to meaningful innovations.
Separates early movement from final regime confirmation.
Supports ATR, standard deviation and blended volatility models.
Provides trend, impulse and visual comparison outputs.
Limitations
The indicator is reactive rather than predictive.
Strong filtering can delay genuine reversals.
Responsive settings can increase whipsaws.
A large innovation may represent a temporary shock rather than a lasting trend.
Supertrend signals still depend on ATR and price crossing behaviour.
Parameter combinations can materially change the model’s behaviour.
The indicator may require different settings across assets and timeframes.
The recursive state develops from the available chart history.
Values can update while the current real-time candle is still forming.
Causality and real-time behaviour
The calculation uses current and historical observations without future-looking references.
However, like most indicators calculated on live candles, the current bar’s values can change before the candle closes.
This means:
The Hull projection may move intrabar.
The innovation score and gate may change intrabar.
A Supertrend transition may appear and disappear before confirmation.
Users requiring confirmed signals should evaluate the indicator at bar close or configure alerts accordingly.
Alerts
The indicator provides three alert conditions:
IGH ST Long: the adaptive Supertrend changes into a bullish regime.
IGH ST Short: the adaptive Supertrend changes into a bearish regime.
IGH Impulse: the normalised innovation score crosses above the selected threshold.
The impulse alert identifies increased information flow into the filter. It does not specify direction by itself because the innovation score uses the absolute size of the prediction error.
Summary
Innovation-Gated Hull Supertrend combines a responsive Hull Moving Average, a volatility-normalised innovation gate, an adaptive recursive filter and a volatility-trailing Supertrend.
The Hull projection provides an early estimate of directional movement. The recursive filter compares that projection with its prior state and measures the resulting innovation relative to ATR, standard deviation or a blend of both.
A logistic gate then determines how strongly the new movement should be admitted. During quiet conditions, the filter becomes more conservative and the Supertrend bands can expand. During meaningful displacement, the filter becomes more responsive and the bands move closer to their base width.
The final Supertrend converts the adaptive estimate into a persistent bullish or bearish regime.
The indicator is designed to make responsiveness conditional rather than fixed: small movements receive stronger filtering, while larger volatility-adjusted innovations are allowed to influence the model more quickly.
Indicator

SuperTrend (Based on Historical Volatility)The SuperTrend (Based on Historical Volatility) is an advanced trend-following and trailing stop-loss indicator designed to solve a common problem with traditional trend lines-
False flips during choppy, ranging markets.
By analyzing price efficiency, bar-to-bar price shifts, and volume conviction, this indicator dynamically adjusts its distance from the price to protect you from noise while keeping you in the true trend.
Standard SuperTrend vs. Historical Volatility SuperTrend
How a Normal SuperTrend Works:
A standard SuperTrend uses a simple formula: it takes the median price (High + Low) / 2 and offsets a line using the Average True Range (ATR) multiplied by a fixed, static number (like 2 or 3). It plots this line above or below the price. If the price simply closes across this line, the trend flips. Because the multiplier is static, it often gets chopped up and produces false signals when a market moves sideways.
How This Indicator Works:
This version does not use a static multiplier or standard ATR. Instead, it uses a Variance Engine to calculate a dynamic offset. When the market is trending cleanly, the band tightens to trail price closely. When the market is choppy and inefficient, the indicator automatically expands the multiplier to give the price more room to breathe. Furthermore, this SuperTrend will not flip its trend just because a single candle closed across the line; it requires high volume, a deep price push, or prolonged time beyond the line to confirm a true reversal.
How It Measures Volatility
To create this dynamic, breathing band, the script calculates volatility using three primary metrics:
Efficiency Ratio (Noise Measurement): It calculates the net price change over your chosen Lookback period and divides it by the total absolute distance the price traveled bar-by-bar. This tells the script if the market is trending directly or moving erratically.
Price Shift: It measures the absolute change in the average candle price (ohlc4) from one bar to the next.
Volume & Depth Profiling: It measures the current volatility percentage (High-to-Low depth) and compares current volume against the Moving Average of volume to identify true market conviction.
How to Use the Lookback Settings
The Lookback input is the most important setting for determining how this indicator behaves. Rule of thumb: A higher lookback means a more stable trend.
For Trailing Stop-Loss (Swing/Active Trading): Use a low Lookback period like 7 or 20. This keeps the line highly responsive. You must adjust this number slightly to find what fits perfectly for the specific stock or asset you are trading.
For Broad Trend Analysis: If you are trying to analyze the overarching macro trend of an asset, use a high Lookback period, such as 500 or more.
For Intraday Trading (1min, 5min, 15min charts): It is highly recommended to use extreme Lookback lengths of 1000 to 2000. Because intraday timeframes are incredibly noisy, a massive lookback allows the indicator to truly understand how the stock moves historically, filtering out micro-fluctuations and plotting a highly stable, accurate intraday trend direction.
Visual Features
The indicator includes aesthetic options to suit your chart style:
Fill Styles: Choose between a standard Ribbon, a fading Gradient Zone, a Safety Cloud, or turn fills off entirely.
Color Themes: Select between Classic Professional (Mint/Crimson), Dragon Ball Z (Orange/Purple), or Neon Light (Cyan/Magenta).
Indicator

SuperTrend+TrailingStop+ChandelierExit/Stop [OmniFlamo]
Overview
This indicator combines four well-known trailing-stop methodologies into a single, switchable tool: SuperTrend, Trailing Stop, Chandelier Exit, and Chandelier Stop. Instead of publishing four separate scripts, this lets traders compare and switch between stop-calculation styles on the same chart using one input.
How it works
An ATR value is calculated using a selectable smoothing method (RMA/SMA/EMA/WMA/VWMA/DEMA/VAR), then multiplied by a user-defined factor.
Depending on the selected mode, the ATR offset is applied to a different price reference (hl2, high/low, or close), producing an upper (short) stop and a lower (long) stop.
SuperTrend hl2 ± ATR
TrailingStop high/low ± ATR
ChandelierExit close ± ATR (usePeriod → N close max/min)
ChandelierStop low/high ± ATR (usePeriod →
classic Chandelier: lowest(low,N)+ATR/highest(high,N)−ATR
A ratchet mechanism only lets the long stop rise and the short stop fall while the trend persists, which is the same logic used in classic SuperTrend implementations — this prevents the stop from moving against the trade.
A direction flag flips from long to short (or vice versa) only when price closes beyond the opposite stop line, and the active stop line is plotted accordingly.
How to use it
Select the calculation mode (SuperTrend, TrailingStop, ChandelierExit, ChandelierStop) that matches your trading style.
Adjust ATR length and multiplier to control stop sensitivity — larger multipliers give wider stops and fewer whipsaws, smaller multipliers react faster but generate more signals.
Optional: enable "Show ATR Upper And Lower" to visualize the raw bands before the ratchet/direction logic is applied.
Alerts are provided for stop-line crossovers/crossunders and trend-direction changes, so this can be used for manual trade management or as a building block for automated alert workflows.
Notes & disclaimer
The stop line does not repaint once a bar closes; values shown on the currently forming bar are provisional until close.
This is a trend-following stop/exit tool, not a standalone entry signal generator — it works best combined with your own trend or momentum confirmation.
For sale/manual traders only — this publication does not constitute financial advice. Past performance of any stop-loss method does not guarantee future results. Always backtest and risk-manage independently before live use.
=====================================
概述
本指标将四种经典的移动止损/离场算法整合为一个可切换的工具:SuperTrend、Trailing Stop(跟踪止损)、Chandelier Exit(吊灯离场)与 Chandelier Stop(吊灯止损)。无需分别发布四个脚本,交易者可以在同一图表上通过一个输入项对比、切换不同的止损计算方式。
计算原理
使用可选的均线平滑方式(RMA/SMA/EMA/WMA/VWMA/DEMA/VAR)计算 ATR,并乘以用户自定义的倍数。
根据所选模式,ATR 偏移量会应用到不同的价格基准(hl2、最高/最低价或收盘价),从而得到上方(空头)止损线与下方(多头)止损线。
SuperTrend hl2 ± ATR
TrailingStop high/low ± ATR
ChandelierExit close ± ATR (usePeriod → N close max/min)
ChandelierStop low/high ± ATR (usePeriod →
classic Chandelier: lowest(low,N)+ATR/highest(high,N)−ATR
采用"棘轮"机制:趋势持续期间,多头止损只上移、空头止损只下移,这与经典 SuperTrend 的处理逻辑一致,避免止损线逆势移动。
仅当收盘价突破对侧止损线时,方向标志才会由多转空或由空转多,并绘制对应的当前止损线。
使用方法
根据自己的交易风格选择计算模式(SuperTrend、TrailingStop、ChandelierExit、ChandelierStop)。
调整 ATR 周期与倍数以控制止损的灵敏度——倍数越大,止损越宽、被震荡打止损的概率越低;倍数越小,反应越快但信号也越多。
可选开启"Show ATR Upper And Lower"以查看棘轮/方向逻辑处理前的原始通道。
内置止损线上穿/下穿及趋势方向变化的提醒(alert),可用于人工交易管理,也可作为自动化提醒流程的基础模块。
说明与免责声明
K线收盘后止损线不会重绘;当前未收盘K线上显示的数值为临时值,收盘后才会确定。
本指标是趋势跟踪型止损/离场工具,而非独立的入场信号生成器,建议配合自己的趋势或动量确认方法一同使用。
本发布内容不构成任何财务建议。任何止损方法的历史表现均不保证未来结果,实盘使用前请务必自行回测并做好风险管理。
Indicator

Poor trend[ALT_analyst]Poor trend
ATTENTION: This script is STRICTLY for market environment recognition (Regime Filter). It does NOT provide entry signals or trading recommendations.
■Overview
This indicator, "Poor trend ", is an administrative filter designed not to search for entry signals, but to logically validate and enforce the decision to "take no position."
In directional trading, significant drawdowns occur during low-quality, trendless environments. This script continuously quantifies market stagnation across five independent modules. By mathematically demonstrating the degradation of a directional edge, it provides an objective baseline to suppress unnecessary entries and avoid whipsaw losses.
■Mathematical Proof of Edge Degradation in "Poor Trends"
The mathematical edge of a directional strategy is governed by the Expected Value equation:
Expected Value = (Win Probability * Average Win) - (Loss Probability * Average Loss)
For directional trading (trend-following or breakout), a "Poor Trend" mathematically degrades this equation. When market action exhibits low volatility, restricted ranges, and low liquidity, the probability of a directional breakout (Win Probability) decreases. Simultaneously, the shrinking ATR compresses the potential profit margin (Average Win). As the Average Win approaches transaction costs (spread/commission) and the Win Probability drops, the Expected Value strictly converges toward a negative figure. This script objectively flags the exact parameters where this mathematical degradation occurs.
5 Danger Detection Modules (Calculation Logic & Output Examples)
The script evaluates five independent conditions to calculate a total "Danger Score" (0 to 5).
1. Lack of Trend (ADX)
Calculation Logic:
is_low_adx = adx < adx_threshold (Default: 20)
Why this calculation: The Average Directional Index (ADX) measures absolute trend strength. A value below 20 statistically demonstrates that price action is dominated by noise rather than a directional vector, lowering the Win Probability.
Actual Output Example: If the current ADX value is 15.5, the logic evaluates 15.5 < 20. This returns true (Boolean), adding 1 to the Danger Score.
2. Low Volume (SMA)
Calculation Logic:
is_low_vol = sma(volume, 20) < sma(volume, 50)
Why this calculation: Compares short-term versus long-term volume averages. A drop in short-term volume detects liquidity withdrawal from the market, mathematically increasing slippage risks and transaction costs.
Actual Output Example: If the 20-period SMA volume is 1,200 and the 50-period SMA is 1,500, the logic evaluates 1200 < 1500. This returns true, adding 1 to the Danger Score.
3. Volatility Shrinking (Z-Score)
Calculation Logic:
width_z = (st_width - width_mean) / width_std < 0.0
Why this calculation: Standardizes the current ATR band width against its 50-period history using a Z-score. A negative Z-score proves statistical volatility compression, severely limiting the Average Win potential.
Actual Output Example: If the current band width is 10, the 50-period mean is 15, and the standard deviation is 5. The Z-score is (10 - 15) / 5 = -1.0. Since -1.0 < 0.0, it returns true, adding 1 to the Danger Score.
4. Unstable Direction (Whipsaw)
Calculation Logic: flip_count >= whip_threshold (Default: 3)
Why this calculation: Counts how many times the Supertrend direction has flipped over the last 20 periods. Frequent flips empirically prove directional instability and high whipsaw risk.
Actual Output Example: If the Supertrend has changed direction 4 times within the last 20 bars, the logic evaluates 4 >= 3. This returns true, adding 1 to the Danger Score.
5. Price Stuck (Trapped Inside Bands)
Calculation Logic:
is_trapped = (high < upperBand) and (low > lowerBand)
Why this calculation: Confirms both the high and low of the current candle are completely confined within the ATR boundaries. This proves zero momentum exists to break statistical limits.
Actual Output Example: If the Upper Band is 110, Lower Band is 90, Candle High is 105, and Candle Low is 95. The logic evaluates (105 < 110) and (95 > 90). Both are true, returning true, adding 1 to the Danger Score.
■Visual & UI Specifications
Danger Ribbon: The space between the Normal and Inverse lines fills with color based on the Danger Score (1: Yellow to 5: Dark Red). A score of 0 ("PEACE") renders the ribbon fully transparent.
Sparse Labels: To eliminate chart clutter, status labels ("WAIT", "STOP", "MAX DANGER") are strictly plotted only on the exact bar where the Danger Score increases or resets to 0.
Dashboard Table: A real-time matrix at the bottom right displays the precise binary status ("DETECTED" or "CLEAR") of all 5 modules, providing instantaneous administrative clarity on market conditions.
■Operating Policy
When the Danger Score is active (Ribbon is colored, modules are DETECTED), the statistical Expected Value for directional trading is compromised. Utilize this indicator strictly as an objective administrative filter to halt new entries and justify capital preservation.
Disclaimer
The information and scripts provided in this publication are for educational and informational purposes only. They do not constitute financial, investment, or trading advice. Trading in financial markets involves a high degree of risk, and you may lose some or all of your capital. Past performance is not necessarily indicative of future results. The author assumes no responsibility or liability for any trading losses incurred as a result of using this script. Please conduct your own due diligence and make trading decisions at your own risk.
Indicator

Reactive Trail System [WillyAlgoTrader]📊 Reactive Trail System (RTS) is an overlay trend-following indicator that combines a momentum-adaptive trailing stop, a dual volatility engine, a 0–100 signal quality score, and a complete trade-management layer (Entry / SL / TP1–TP3 / break-even) — all tracked live on a sectioned dashboard with win-rate statistics.
The core insight: a trailing stop should not have a fixed width. When momentum is strong, price moves cleanly and the trail can hug price to lock in profit. When momentum fades, price gets noisy and the trail must widen to survive the chop. RTS measures momentum every bar and reshapes the trail width automatically — up to 40% tighter in strong moves — so one setting adapts to changing conditions instead of being permanently too tight or too loose.
If you are new to trailing stops: think of the trail as a colored line that follows price from below in an uptrend (green) and from above in a downtrend (red). As long as price stays on the right side of the line, the trend is alive. When price closes through the line, the trend flips — and RTS turns that flip into a fully managed trade idea with a stop-loss and three targets drawn on the chart for you.
Works on all markets (crypto, forex, stocks, indices, commodities) and all timeframes.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A classic supertrend-style trail has three chronic problems. First, its width is fixed — the same multiplier that protects you in chop gives back too much profit in a strong trend. Second, a raw trail flip says nothing about signal quality — a flip in dead, low-volume conditions looks identical to a flip with real participation. Third, a flip is not a trade — you still have to decide where the stop goes, where the targets go, and when to move to break-even.
RTS solves all three with one integrated pipeline:
Baseline MA (6 engines) → Dual volatility measure (ATR + StDev) → RSI momentum engine → Adaptive trail width → Ratcheting trail state machine → HTF bias + volume filters → 0–100 signal score → Wick-anchored SL + TP1/TP2/TP3 → Break-even automation → Trade outcome statistics
The baseline MA defines the anchor the trail hangs from. The volatility engine defines the raw distance. The RSI momentum engine then compresses that distance when momentum is strong — this is what makes the trail "reactive" rather than static. The ratcheting state machine guarantees the trail only ever tightens in the trade's favor (it never backs away from price). The HTF and volume filters decide whether a flip is allowed to become a trade. The scoring engine grades every entry so you can tell an A-setup from a C-setup at a glance. The risk engine converts the signal into concrete levels anchored to real market structure (the signal bar's wick), and the trade engine tracks every touch, break-even move, stop-out and reversal — feeding honest statistics back to the dashboard.
Remove any link and the chain breaks: without momentum adaptation the trail is just another supertrend; without filters every flip fires; without the wick-anchored stop the levels ignore structure; without outcome tracking you never learn how the system actually behaves on your market.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Momentum-adaptive trail width — the trail breathes with the market.
Instead of a fixed multiplier, RTS computes a momentum distance from the smoothed RSI and uses it to compress the trail:
— momDist = min(|RSI_smoothed − 50| / 50, 1.0) — 0 means dead-center momentum, 1 means extreme
— effectiveMultiplier = TrailMultiplier × (1 − Adaptivity × momDist × 0.4)
— trailOffset = volatility × effectiveMultiplier
With default Trail Multiplier 2.0 and Adaptivity 1.0, the trail runs at full width in neutral conditions and tightens by up to 40% when RSI pushes toward extremes. Set Adaptivity to 0 and you get a classic fixed-width trail; the default 1.0 gives maximum adaptation. RSI length 13 with EMA smoothing 3 keeps the width changes calm instead of jittery.
Why this matters: strong momentum = clean price movement = you can afford a tight trail that protects open profit. Weak momentum = noise = the trail widens automatically so you don't get shaken out.
2️⃣ Dual volatility engine — ATR, StDev, or a stabilized Hybrid.
Trail distance can be measured three ways (Volatility Length default 13):
— ATR: classic bar-range volatility
— StDev: close-to-close dispersion
— Hybrid (default): (ATR + StDev) / 2
ATR reacts to wicks and gaps; StDev reacts to closing dispersion. Averaging them dampens the weakness of each — a single wild wick inflates ATR but barely moves StDev, so the Hybrid stays stable where a pure-ATR trail would suddenly balloon.
3️⃣ Six baseline engines including KAMA and T3 — with a volume-safety fallback.
The trail anchors to a baseline MA selectable from HMA, ALMA (default, length 21), KAMA, T3, VWMA and EMA. KAMA and T3 are computed from their full formulas internally (Kaufman efficiency-ratio smoothing constant sc = (ER × (fast − slow) + slow)², and Tillson's six-stage EMA cascade with a = 0.7). If you pick VWMA on an instrument whose data feed reports no volume (common on some forex feeds), RTS silently falls back to EMA instead of plotting garbage.
4️⃣ Ratcheting trail state machine — the stop never retreats.
In a bull regime the trail is trail = max(previous trail, baseline − offset): it can only rise. In a bear regime it can only fall. A flip requires a full bar close beyond the trail — intrabar wicks through the line do not flip the trend. This one-way ratchet is what makes the line usable as an actual trailing stop rather than a wavy band.
5️⃣ Non-repainting HTF bias filter.
Optional filter: longs only when the higher timeframe (default 240 = 4H) closes above its 50 EMA, shorts only below. The HTF request uses the last closed HTF bar (index with lookahead), so the bias never changes retroactively — what you see in a live chart is what a backtest would have seen.
6️⃣ Signal quality score 0–100 — every entry is graded, not just fired.
Each entry gets a transparent confluence score:
— Momentum component (0–40): min(momDist / 0.6, 1) × 40
— Volume component (0–30): participation vs the 20-bar volume SMA, clamped; fixed 15 when the feed has no volume
— HTF alignment (10 or 30): 30 when the higher timeframe agrees with the trade direction, 10 when it doesn't
The score is shown in the BUY/SELL label tooltip, in the dashboard "Last signal" row, and in every entry alert. A 90-score long (strong momentum, heavy volume, HTF agrees) and a 45-score long are both valid flips — but you instantly know which one deserves full size.
7️⃣ Wick-anchored stop-loss — structure-aware risk, not a blind ATR offset.
Default SL mode anchors the stop to the signal bar's actual wick:
— Long SL = min(low − 0.25 × ATR, close − 0.5 × ATR)
— Short SL = max(high + 0.25 × ATR, close + 0.5 × ATR)
The 0.25 × ATR buffer sits the stop just beyond the wick (where stop-hunts reach), and the 0.5 × ATR minimum distance prevents absurdly tight stops on small-bodied signal bars. A classic fixed ATR mode (SL = entry ± multiplier × ATR, ATR length 14) is available too. Targets are pure R-multiples of the actual risk: TP = entry ± risk × multiplier.
Four one-click risk presets: Conservative (SL 2.5×ATR, TP 1R/2R/4R), Balanced (default: 1.5×ATR, 1R/2R/3R), Aggressive (1.0×ATR, 1.5R/2.5R/4R), Scalping (0.8×ATR, 0.8R/1.5R/2R), plus a fully manual Custom preset with input validation (TP1 < TP2 < TP3 enforced).
8️⃣ Full trade lifecycle engine with honest intrabar rules.
RTS doesn't just draw levels — it tracks the trade like a journal:
— Hits are checked only on confirmed bars, and never on the entry bar itself (entry-bar guard)
— TP-priority model: if a bar touches both a TP and the SL, the TP touch registers first (this optimistic assumption is disclosed right in the dashboard tooltip)
— Break-even automation: once TP1 is touched, the stop moves to entry; a BE moved this bar cannot stop you out on the same bar
— Opposite confirmed signal reverses the position (closes the old trade, opens the new one)
— Win definition is fixed and transparent: a trade counts as a WIN once TP1 has been touched (TP3 close, BE stop-out after TP1, or reversal after TP1); closed before TP1 = loss
9️⃣ Persistent trade visualization.
Entry (subtle dotted), SL (solid, prominent) and TP1/TP2/TP3 (dashed) lines extend with the live trade. When a TP is touched, its line turns solid teal with a ✓ on the label. When break-even activates, the original SL line dims to a record and the entry label is annotated "→ SL (BE)". After the trade closes, the drawing persists as a record until the next entry replaces it — you can scroll back and see exactly how each trade resolved.
🔟 Dashboard 2.0 with period-filtered statistics.
A sectioned panel (Market / Trade / Stats — each toggleable, position and font size configurable):
— Market: trend direction, trend age in bars, HTF bias, smoothed RSI, last signal with score and bars-ago
— Trade: entry, SL (with "BE @" marker), TP1–TP3 with ✓ checkmarks, R:R at TP1, SL distance in % — collapses to one row when flat
— Stats: closed trades, wins, losses, win rate with a ▰▱ gauge, and a "Form" strip of the last 10 results
The win-rate window is selectable: last 24 Hours, last 30 Days, or All-Time — computed from timestamped trade closures kept in a rolling 31-day buffer. Statistics reset on chart reload, and this is disclosed directly in the dashboard tooltips.
📖 HOW IT WORKS — CALCULATION FLOW
Step 1 — Baseline: the selected MA engine (ALMA 21 by default) is computed as the trail anchor.
Step 2 — Volatility: ATR and StDev over 13 bars are combined per the selected engine into one volatility measure.
Step 3 — Momentum: RSI(13) is EMA-smoothed(3); its distance from 50 (normalized 0–1) compresses the trail multiplier by up to 40%.
Step 4 — Trail update: the ratcheting state machine raises the trail in bull regimes / lowers it in bear regimes; a confirmed close through the trail flips the regime.
Step 5 — Filtering: the flip becomes an entry signal only if it passes the optional HTF bias and volume-confirmation filters, on a confirmed bar, after the warm-up period.
Step 6 — Scoring: the entry is graded 0–100 from momentum, volume participation and HTF alignment.
Step 7 — Risk placement: SL is anchored to the signal bar's wick (or fixed ATR), TP1–TP3 are projected as R-multiples of the actual risk per the active preset.
Step 8 — Trade tracking: every confirmed bar is checked for TP touches, break-even activation, stop-out or reversal; outcomes update the win/loss statistics and the Form strip.
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to your chart. Defaults (ALMA 21, Hybrid volatility, Balanced preset) are ready to use.
2. Wait for a ▲ BUY or ▼ SELL label — hover it to see the score, RSI, SL and TP1.
3. Check the dashboard: score of the last signal, HTF bias, and current R:R.
4. Prefer high-score signals (70+) where the HTF bias agrees with the trade direction.
5. Manage by the drawn levels: partial at TP1 (stop moves to break-even automatically), remainder toward TP2/TP3 or until the trail flips.
👁️ Reading the chart:
— 🟢 Green trail line below price = bull regime; it can only rise
— 🔴 Red trail line above price = bear regime; it can only fall
— ▲ BUY / ▼ SELL labels = filtered, confirmed entries (tooltip shows score and levels)
— Dotted line = entry reference · solid red = stop-loss · dashed green = TP1/TP2/TP3
— Teal solid TP line with ✓ = target reached · dimmed SL + "→ SL (BE)" = stop moved to entry
— Optional: soft trend fill between trail and baseline, and regime-colored candles
📊 Dashboard fields:
— Trend / Age: current regime and bars since the last flip
— HTF Bias: higher-timeframe direction (Off when the filter is disabled)
— RSI: the smoothed momentum value driving trail width
— Last signal: direction · score (bars ago)
— Entry / SL / TP1–TP3 / R:R / SL Dist: full live trade card
— Trades / Wins / Losses / Win rate: statistics for the selected period (24H / 30D / All-Time)
— Form: last 10 results, ▰ = win, ▱ = loss, newest on the right
🔧 Tuning guide:
— Too many flips / whipsaws: raise Trail Multiplier toward 2.5–3.0, raise Baseline Length toward 34–55, or enable the HTF Bias Filter
— Exits feel too late: lower Trail Multiplier toward 1.8, or keep Adaptivity at 1.0 so strong momentum tightens the trail
— Trail width feels jumpy: lower Momentum Adaptivity to 0.4–0.6 or raise Momentum Smoothing to 5–8
— Too few signals: disable the volume filter, or shorten Baseline Length toward 13–21
— Stops too tight on your market: switch the preset to Conservative, or use ATR mode with a higher SL multiplier
— Scalping lower timeframes: Scalping preset + Volatility Length 10 + consider HMA baseline
⚙️ KEY SETTINGS
⚙️ Main:
— Baseline MA Type (default ALMA): trail anchor engine — HMA / ALMA / KAMA / T3 / VWMA / EMA
— Baseline Length (default 21): higher = smoother, fewer flips
— Momentum (RSI) Length (default 13) and Smoothing (default 3): the adaptive-width driver
— Volatility Engine (default Hybrid) and Length (default 13)
— Trail Multiplier (default 2.0): base trail distance in volatility units
— Momentum Adaptivity (default 1.0): 0 = fixed width, 1 = up to 40% tightening
🔍 Filters:
— HTF Bias Filter (default off) + Higher Timeframe (default 240): trade only with the bigger trend
— Volume Confirmation (default off) + Threshold (default 1.2 × SMA20): require real participation; auto-bypassed on no-volume feeds
🛡️ Risk Management:
— Risk Preset (default Balanced): Conservative / Balanced / Aggressive / Scalping / Custom
— SL Mode (default Wick-Anchored): structure-based stop or fixed ATR
— ATR Length (default 14), SL / TP1 / TP2 / TP3 multipliers (Custom preset)
— Break-Even After TP1 (default on)
— SL/TP lines, labels, % distance and per-line styles are all configurable
🎨 Visual:
— Theme Auto / Dark / Light (auto-detects chart background), trail / baseline / fill / labels / candle-coloring toggles, font sizes, bull & bear colors
📊 Dashboard:
— Show/hide the panel and each section, position (4 corners), font size, Win Rate Period (24 Hours / 30 Days / All-Time)
🔔 ALERTS
— 🟢 LONG / 🔴 SHORT — entry with price, SL, TP1–TP3, R:R and score; plain text or JSON webhook payload for bot integration
— 🎯 TP1 HIT / 🎯🎯 TP2 HIT — target touches
— 🏆 TP3 HIT — final target, trade closed
— 🛑 SL HIT / 🛡️ BE STOP-OUT — stop-outs with entry and stop price
— 🛡️ BREAK-EVEN — stop moved to entry after TP1
— 🔄 REVERSAL — opposite signal closed the trade and opened the other direction
— ▲ / ▼ FLIP (optional, informational) — trail flipped but the entry was blocked by filters
All alerts fire once per confirmed bar close. Set up a single alert with "Any alert() function call" and toggle the categories you want in the settings.
⚠️ IMPORTANT NOTES
— 🚫 No repainting. Signals require barstate.isconfirmed; a flip needs a full bar close through the trail; the HTF filter reads only the last closed higher-timeframe bar; all alerts use bar-close frequency. What you see on historical bars is what the live chart produced.
— 📐 Intrabar assumption disclosed. When a single bar touches both a TP and the SL, the TP registers first (optimistic model). This is stated in the dashboard tooltip so the statistics are interpreted correctly.
— 📐 Statistics are session-based. Win/loss counts and the Form strip are computed from the loaded chart history and reset on chart reload. Past performance does not guarantee future results.
— ⚖️ Scope. RTS is a trend-following system — like any trail-based approach it performs best in trending conditions and will flip more often in tight ranges. Use the HTF and volume filters and the score to skip low-quality environments.
— 🛠️ This is an analysis tool, not an automated trading bot. It identifies trend regimes, grades entries, and draws structured risk levels — trade decisions remain yours.
— 🌐 Works on all markets and timeframes. Instruments without volume data are handled automatically (VWMA falls back to EMA, the volume filter bypasses, scoring uses a neutral volume component).
The indicator is completely free. Indicator

Indicator

SuperTrend Engine [Quantum Algo]SuperTrend Engine
====================================================
🔶 OVERVIEW
SuperTrend Engine is a volatility-adaptive SuperTrend indicator built on one idea: every SuperTrend gives you signals — this one shows you the whipsaws it saved you from, tells you its real win rate on your chart, and admits when it is wrong.
The engine self-tunes its factor with a fully transparent formula, confirms flips through a Whipsaw Shield that absorbs fake-outs and marks every one it absorbed, stamps every buy and sell flip with its live, honestly-computed win rate on the current symbol, settles every marker into its real outcome ten bars later, and draws the trade geometry — entry, trailing stop, one-R and two-R references — the moment a flip confirms.
🔶 WHAT IS A SUPERTREND?
A SuperTrend is a trailing stop built from the Average True Range: a band placed a volatility-scaled distance from price that ratchets in the trend's favor and never retreats. While price holds above the band, the trend is up and the band trails below as a stop; a close through the band flips the state. It is one of the most followed trend-following tools in retail trading — and its famous weakness is the whipsaw: sideways markets flip it back and forth, and a fixed factor that survives chop is too slow in trends. This engine is built specifically against that weakness.
🔶 WHY THIS SCRIPT IS ORIGINAL
1. The Whipsaw Shield — visible absorbed fake-outs. A flip only confirms when the close clears the opposite band by a volatility margin. When the raw trail flips and reverses before clearing it, the engine holds its direction and prints a small ghost marker where the whipsaw died, with a running Whipsaws Shielded counter in the dashboard. Other tools try to reduce whipsaws quietly; to our knowledge, none renders the failures it absorbed. Here the evidence is on the chart.
2. Honest per-symbol flip statistics. Every flip is stamped with its live win rate on this exact symbol and timeframe — shrinkage-adjusted so thin history cannot show fake confidence, with a Wilson confidence bound and sample count in the hover tooltip. The indicator audits itself in public instead of asserting signals.
3. Markers that settle into their outcome. Each buy and sell marker resolves ten bars later: the trend color if the flip delivered, faded gray if it failed. Scroll any chart and read the engine's true track record directly off the markers — including the losses.
4. Transparent adaptation, not a black box. The factor self-tunes between your two bounds using Perry Kaufman's Efficiency Ratio — tight when price moves cleanly, wide in chop — and the dashboard shows the live factor and efficiency reading every bar. The adaptation can be verified with a calculator; nothing asks for trust.
5. A trade plan, not just a line. On every confirmed flip the engine draws the entry, the trailing stop, and one-R and two-R reference levels, and the dashboard tracks the open signal's running R-multiple live.
6. A breathing chart. The glow between price and trail intensifies with trend distance and fades as price returns to the stop, grade-A flips (volume, efficiency, and a decisive break together) print in the accent color, and the whole layer stays capped and clean.
🔶 HOW IT WORKS
Adaptive trail: Classic ratcheting SuperTrend bands are computed from the Average True Range, with the factor interpolated between the trend bound and the chop bound by the Efficiency Ratio — the ratio of net price movement to total path length over the lookback.
Whipsaw Shield: The raw band flip is treated as a candidate, not a signal. Only a close beyond the opposite band plus the margin confirms the flip; a raw flip that reverses first is counted, marked as a ghost, and absorbed.
Statistics: Each confirmed flip records what price did ten and thirty bars later, in the flip's direction, into capped first-in-first-out databases. Win rates are pulled toward fifty percent by pseudo-samples and carry Wilson lower bounds. Until the minimum sample is met, markers read "collecting history" instead of inventing a number.
Outcome settlement: Every marker stores its flip price and recolors by the realized ten-bar outcome, then joins the capped history.
Grading: Volume z-score, efficiency level, and break decisiveness combine into an A, B, C grade on every flip.
Non-repainting: Flips, shields, grades, statistics, and settlement are all evaluated on closed bars. Once printed, nothing moves.
🔶 HOW TO USE IT
1. Works on any market — cryptocurrency, forex, gold, indices, stocks, futures — and any timeframe. Trending instruments suit tighter trend bounds; choppy ones benefit from a wider chop bound and a larger shield margin.
2. Treat the flip as regime information and the trail as the stop: the line is the invalidation, and the one-R and two-R references scale targets to the risk the stop defines.
3. Read the ghost markers as the tool working: a cluster of × marks in a range is the chop a fixed-factor SuperTrend would have traded.
4. Judge fresh flips against the settled history and the statistics rows — a symbol whose markers keep settling gray is telling you trend-following struggles there, and that is information worth having before the next flip.
5. Use the grade for position confidence: an A-grade flip with volume, high efficiency, and a decisive break is a different event from a drift-through.
6. Watch the live factor and efficiency in the dashboard to see the adaptation reasoning in real time.
🔶 SETTINGS
- Adaptive trail: Average True Range length, factor in strong trend, factor in chop, Efficiency Ratio length.
- Whipsaw Shield: flip margin and ghost marker toggle.
- Statistics: sample cap, minimum samples to grade, shrinkage strength, Wilson z-score, markers to keep.
- Trade plan toggle and plans to keep.
- Visuals: all colors, glow fill, candle tinting.
- Themeable dashboard: position, four text sizes, title band, background, frame, grid, and three text colors.
🔶 ALERTS
- Buy Flip / Sell Flip — the adaptive trail flipped with the confirmation margin cleared.
- Whipsaw Shielded — a raw flip reversed before confirming; the engine held its direction.
- Grade A Flip — full quality confluence: volume, efficiency, and a decisive break.
🔶 FREQUENTLY ASKED QUESTIONS
Does the indicator repaint? No. Every flip, shield event, grade, statistic, and marker settlement is evaluated at bar close. Once printed, nothing moves.
How is this different from other adaptive or machine-learning SuperTrends? Adaptation itself is not the claim — several tools adapt the factor. The differences are transparency and honesty: the adaptation here is one verifiable formula shown live on the dashboard, the whipsaws it absorbs are rendered instead of hidden, every signal carries its real statistics with confidence bounds, and every marker settles into its true outcome.
What does a ghost × marker mean? The raw SuperTrend flipped there and reversed before clearing the confirmation margin. The engine held its direction and counted the whipsaw it absorbed.
Why does a marker turn gray? The flip failed: ten bars later, price had not moved in its direction. Gray markers are the audit trail working — an honest tool must be able to show its losses.
Why do the win rates hover near fifty percent on some symbols? Because that is the truth of trend-flip performance there. The shrinkage and confidence bounds are designed to display small honest numbers rather than large misleading ones.
🔶 CREDITS
The SuperTrend trailing stop was created by Olivier Seban; the Average True Range is by J. Welles Wilder Jr. (1978); the Efficiency Ratio is by Perry J. Kaufman; the Wilson score interval is by Edwin B. Wilson (1927). This script gratefully acknowledges all four. The Whipsaw Shield, the transparent adaptive-factor design, the per-symbol statistical engine, the outcome-settling markers, the trade plan layer, and all code in this script are original work — no third-party or open-source script code was reused.
🔶 LIMITATIONS
Trend-following flips underperform by nature in prolonged ranges; the shield reduces but cannot eliminate that cost, and shielded entries confirm slightly later than raw ones — the margin trades earliness for reliability. Statistics need history to mature and are honest about being thin early. Volume grading is less meaningful on symbols with unreliable volume reporting. No indicator replaces independent analysis.
🔶 DISCLAIMER
This script is provided strictly for educational and informational purposes. It is not financial advice, an investment recommendation, or a solicitation to buy or sell any financial instrument. Past behavior of any flip, statistic, or grade does not guarantee future results. Trading involves substantial risk. Always do your own research and manage risk independently. Indicator

ATR Trend Rail🚦 ATR Trend Rail — a trend rail that knows when to shut up.
Most ATR / SuperTrend clones flip you into every chop-fest, then repaint the "perfect" entry after the candle closes. This one doesn't. It runs on a single idea: a trailing ATR band is only worth trading when the market regime agrees with it. 🎯
WHAT'S UNDER THE HOOD
📐 The rail — a trailing ATR band that latches trend state and rides price until volatility says the move is done. Adaptive, clean, no lag-heavy MA soup.
🧭 Regime filter (the whole point) — every flip is gated against a regime SMA. Leave it on your chart timeframe, or point it at an HTF for a top-down bias. Wrong side of regime? The signal never fires. This is the piece most trend tools skip entirely.
🚫 Non-repainting, for real — flips confirm on closed bars only, the regime pull runs lookahead-off with a realtime offset, and each leg's regime status locks the moment the flip bar closes. What you see in replay is what you'd have traded live. No hindsight magic.
🌫️ Faded legs — trends that fire against regime don't disappear, they dim. You still see the move; you just know it didn't earn a signal. Context, not censorship.
🔔 Alerts that behave — Bull, Bear, and Flip, confirmed-bar only. Set them once and trust them.
READ IT IN ONE GLANCE
🟢 Bright rail under price → confirmed uptrend, regime agrees
🔴 Bright rail over price → confirmed downtrend, regime agrees
⚪ Faded rail → the move exists, regime says wait
🔺 Triangle + Bull / Bear tag → a flip that passed the gate
Still useful after it's been on your chart a while. 🚦
— SlatinaTrades Indicator

Next Candle Predictor V4.1## Next Candle Predictor V4.1 — Terminology and Presentation Update
This update improves the clarity of the indicator's terminology and on-chart presentation while preserving its existing calculation framework, weighting structure, visual layout, and signal conditions.
### Changes
- Renamed displayed “Prediction” values to “Directional Score”.
- Replaced “Perfect Time” with “Strong Setup”.
- Renamed the volume-derived component to “Estimated Volume Pressure”.
- Renamed projection visuals to “Directional Scenario Candles”.
- Updated dashboard labels and alert messages for clearer interpretation.
- Removed performance-target wording.
- Added author attribution: Developed by Ceyhun C. Canbazoglu.
### Score Interpretation
The displayed long and short percentages are normalized directional confluence scores derived from the indicator’s rule-based components.
They are not statistical probabilities, expected win rates, guarantees, or forecasts of the next candle’s result.
### Estimated Volume Pressure
Estimated Volume Pressure uses OHLCV data and the closing price’s position within the candle range to estimate directional pressure.
It is not exchange-level bid/ask volume delta or actual aggressive buying and selling volume.
### Directional Scenario Candles
The optional scenario candles are volatility-scaled visualizations based on the indicator’s current directional scores.
They do not forecast the next candle’s exact open, high, low, close, direction, or price target.
### Core Framework
The existing multi-factor framework remains unchanged and continues to evaluate:
- trend direction,
- EMA alignment,
- MACD momentum,
- RSI position,
- Stochastic conditions,
- ADX trend strength,
- relative volume,
- estimated volume pressure,
- and volatility regime.
This indicator is intended as a technical-analysis and decision-support tool. It does not provide financial advice or guarantee trading results. Indicator

[GYTS-CE] Kinetic Trend Envelope (adaptive trailing stop)Kinetic Trend Envelope (Community Edition)
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is the Kinetic Trend Envelope?
The Kinetic Trend Envelope (KTE) is an adaptive directional trailing stop in the lineage of SuperTrend, rebuilt around the premise that volatility is kinetic energy . It measures per-bar motion with five academically grounded volatility estimators, then widens the envelope as energy rises and contracts it as motion settles.
In an uptrend, the lower band ratchets higher and never retreats; in a downtrend, the upper band ratchets lower. The direction changes when the active stop is breached, after which the opposite side becomes the new trailing stop.
💮 Why Use This Indicator?
Conventional trailing stops typically combine a price anchor with one symmetric ATR-derived width. The KTE extends that model with:
Asymmetric volatility profiling — Bullish- and bearish-candle volatility shape the upper and lower bands independently.
Three direction-switch methods — High/low, close, or a smoothed estimator controls flip sensitivity without moving the band anchor.
Five volatility estimators — ATR plus Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang covers different treatments of gaps, drift, and intrabar range.
The outputs are calibrated to a common width basis, so Volatility Factor remains interpretable across estimators and price scales. Fine adjustment may still be useful, but switching estimators should not require re-tuning by orders of magnitude.
↑ The KTE on a trending instrument. The thick line is the active trailing stop; the thin line shows the opposing side of the envelope. Both expand and contract with market energy.
↑ KTE beside PulseWire's built-in SuperTrend, both using ATR with a 10-bar lookback. KTE's asymmetric profile changes how each side responds to directional volatility while the monotonic active band avoids premature loosening.
🌸 --------- HOW IT WORKS --------- 🌸
💮 Core Concept
The bands share a smoothed price estimator as their anchor, but use separate volatility profiles:
Upper band = estimator + (factor × bullish-candle volatility)
Lower band = estimator − (factor × bearish-candle volatility)
In a bullish state, the lower band is active and can only rise. In a bearish state, the upper band is active and can only fall. This monotonic constraint prevents a live trailing stop from loosening within the trend.
The selected direction-switch method changes only the breach test. It does not change the smoothed estimator anchoring the envelope, so a wick-sensitive trigger cannot drag the bands around with the wick.
💮 The Five Volatility Estimators
Each estimator reads a different part of the OHLC bar:
ATR (Wilder, 1978) — Familiar baseline that handles gaps through true range.
Parkinson (1980) — Uses high-low range; efficient under continuous, low-drift conditions.
Garman-Klass (1980) — Adds open-close information; favours continuous sessions without material gaps.
Rogers-Satchell (1991) — Drift-independent and well suited to trending, continuously traded instruments.
Yang-Zhang (2000) — Combines overnight gaps, open-close movement, and Rogers-Satchell; the gap-aware default.
Statistical efficiency does not guarantee a visibly tighter stop. At slow Adaptation Speed settings, long averaging makes the estimators look similar; at fast settings, their different treatments of gaps, drift, and range become more visible. Choose according to the instrument's behaviour rather than expecting one estimator always to produce the narrowest band.
↑ ATR and Yang-Zhang at Adaptation Speed 2. The long profile memory (low speed) smooths away most of the difference, so the two envelopes nearly overlap.
↑ ATR and Yang-Zhang at Adaptation Speed 8. The short profile memory (high speed) exposes their different volatility readings, producing visibly distinct envelope widths.
💮 Asymmetric Volatility Profiling and Adaptation Speed
The KTE stores volatility from bullish and bearish candles separately. Bullish samples determine the upper width; bearish samples determine the lower width. This allows the two sides to respond differently when upward and downward motion carry different energy.
Adaptation Speed controls the memory of this profile, not the speed of the price estimator and not the distance of the stop by itself. Its 1–10 scale maps logarithmically to an internal window:
Speed 3 — approximately 878 bars: stable and slow to re-weight
Default 3.5 — approximately 570 bars: general-purpose smoothing
Speed 8 — approximately 11 bars: highly responsive to recent volatility
Speed 10 — approximately 2 bars: extremely reactive and noisy
Faster does not necessarily mean closer to price. During a volatility burst, a fast profile recognises the expansion sooner and may widen the band sharply. Because the active stop cannot loosen, it can then remain flat until the estimator catches up. A slow profile dilutes the same burst across much more history, so its narrower band may appear to follow price faster.
This is why two instances matched during a calm period can separate during a shock, especially when they also use different Volatility Factor values. Compare Adaptation Speed with the same factor first; matching lines in one regime does not make two configurations equivalent elsewhere.
The profiles are also direction-conditioned: bullish samples are replaced by later bullish candles and bearish samples by later bearish candles. A recent high-volatility sample can therefore persist through a run of opposite-colour candles, producing deliberate step-like plateaux in the relevant band.
↑ Asymmetric profiling in action: the upper and lower widths respond independently to bullish- and bearish-candle volatility.
💮 Direction Switch Methods
The breach source sets the balance between responsiveness and false flips:
On high/low — Uses the current bar's wick and can switch on the breach bar. Fastest and most sensitive to noise.
On close — Uses the previous confirmed close; the switch appears on the following bar.
On estimator — Uses the previous smoothed estimator; the most conservative default, also switching on the following bar.
↑ The three switch methods share the same band geometry but change direction at different times.
🌸 --------- KEY FEATURES --------- 🌸
💮 Eight Estimator Filters
The configurable price anchor includes:
Ultimate Smoother, 2- or 3-pole — Low-noise, near-zero-lag passband response; the 2-pole version is the default.
Super Smoother, 2- or 3-pole — Ehlers low-pass filters for progressively stronger smoothing.
BiQuad — Second-order low-pass filter with an adjustable Q-factor.
ADXvma — Adapts to trend strength and tends to flatten in ranges.
MAMA — Cycle-adaptive MESA moving average.
A2RMA — Adaptive recursive moving average with adjustable gamma.
They are provided by the open-source FiltersToolkit library.
💮 Visual Layering
The display separates function from context:
Active band — Thick directional trailing-stop line
Opposing band — Thin reference for the inactive side
Channel fill — Visual separation between the estimator and each band
Estimator — Optional smoothed anchor
Palette, light/dark mode, widths, and transparencies can be adjusted independently.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Getting Started
Start with the defaults, observe several calm and volatile regimes, and change one dimension at a time:
Tune Volatility Factor for the preferred stop distance.
Tune Adaptation Speed for how quickly width should respond to regime changes.
Choose the direction-switch method for the preferred confirmation level.
Change the volatility estimator only when its assumptions better fit the instrument.
💮 Choosing a Volatility Estimator
Gapped equities — Yang-Zhang accounts for overnight movement.
Trending 24/7 markets — Rogers-Satchell is drift-independent without a separate gap component.
Continuous, range-led markets — Parkinson or Garman-Klass offers efficient range-based measurement under their assumptions.
Familiar baseline — ATR provides conventional true-range behaviour.
On continuous instruments, Rogers-Satchell and Yang-Zhang may look very similar because there are few gaps to distinguish them. Use the Volatility Toolkit to compare their raw behaviour on the intended instrument.
↑ Three estimators compared on one instrument, each reading a different combination of OHLC information.
💮 Tuning Width and Responsiveness
These controls solve different problems:
Volatility Factor — Sets the distance per unit of measured volatility.
Adaptation Speed — Sets the memory of the bullish/bearish profile; faster can widen the stop sooner during shocks.
Volatility Lookback — Sets how quickly the underlying per-bar volatility estimate changes.
Estimator Lookback — Sets the smoothness of the price anchor.
Use symptoms to guide adjustment:
Frequent flips on minor pullbacks — Increase Volatility Factor or use a more conservative switch method (e.g. "on estimator").
Excessive give-back — Decrease Volatility Factor or use a more responsive switch method (e.g. "on high/low").
Width reacts too slowly to regime changes — Increase Adaptation Speed or reduce Volatility Lookback.
Bands become erratic during shocks — Reduce Adaptation Speed or increase Volatility Lookback.
↑ A tight factor follows price more closely and flips more often; a loose factor tolerates larger pullbacks.
💮 Trading Applications
Discretionary trailing stop — Move a protective stop with the active band as it tightens.
Trend confirmation — Accept long signals only during a bullish KTE state, and short signals only while bearish.
Exit timing — Treat a direction change as an exit when the trade thesis is trend-following.
💮 Integration with GYTS Suite
The visible bands and estimator can be selected as sources by compatible Pine scripts. Two packed streams are also exposed:
🔗 STREAM KTE 🪜 Trailing Stoploss — Positive lower-band value in a bullish state; negative upper-band value in a bearish state.
🔗 STREAM KTE 🪜 Mechanism — Encodes the switch method and scale-invariant estimator relationship for compatible consumers.
The KTE is, first and foremost, a trailing stop, and these streams are built for stop management. The Order Orchestrator strategy consumes the Trailing Stoploss and Mechanism streams together : the first supplies the active stop level and its direction, the second makes the strategy's trailing-exit runner follow whatever switch method and estimator you set here. So the stop is configured once, in the KTE.
Beyond that primary role, the signed trailing-stop stream can also serve as a trend signal, since its sign flips with direction: it can be read through sign and magnitude as an entry/exit signal, including by Flux Composer . The KTE can also be paired with Market Regime Detector so flips are acted on only when the broader regime supports trend-following behaviour.
🌸 --------- LIMITATIONS --------- 🌸
Trailing-stop latency — Every trailing stop gives back some of the move between the trend extreme and the eventual breach.
Whipsaws in ranges — Low-energy chop can produce repeated flips; a regime filter may help when ranging conditions dominate.
Fast adaptation can widen the stop — Higher Adaptation Speed means faster volatility response, not guaranteed proximity to price.
Direction-conditioned memory — A bullish or bearish outlier remains in its own profile until enough matching-direction samples replace it, which can create plateaux after shocks.
Warm-up and sample size — Long profile windows need sufficient chart history; strongly one-sided markets may leave one side with few recent samples.
🌸 --------- CREDITS --------- 🌸
💮 Academic Sources
Wilder, J. W. (1978). New Concepts in Technical Trading Systems . Trend Research.
Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
Garman, M. B., & Klass, M. J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
Rogers, L. C. G., & Satchell, S. E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
Yang, D., & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
Ehlers, J. F. (2024). The Ultimate Smoother. Technical Analysis of Stocks & Commodities , 2024-04. TASC
Ehlers, J. F. (2004). Cybernetic Analysis for Stocks and Futures . Wiley. Covers SuperSmoother, MAMA and more.
💮 Inspiration
Thanks to Trendoscope for inspiring us with the Supertrend - Ladder ATR (2021). It derives long-side stop distance from bearish-candle ATR and short-side distance from bullish-candle ATR, which is one of the mechanisms that we tried to develop further with the KTE.
💮 Libraries Used
FiltersToolkit — Ultimate Smoother, Super Smoother, BiQuad, ADXvma, MAMA, and A2RMA
VolatilityToolkit — Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang estimators
MathTransform — Logarithmic scaling for Adaptation Speed
ColourUtilities — Palette management and light/dark-mode colour adjustment
Indicator

EMA + Supertrend + OBV [StrixEDGE]Trend Engine EMA + Supertrend + OBV is a multi-timeframe trend scoring system that combines EMA structure, Supertrend direction, and OBV volume flow into a single overlay with a detailed heatmap dashboard. It evaluates four timeframes simultaneously and presents the results in a color-coded, section-organized table directly on the chart.
The indicator answers three questions per timeframe: Is the structure bullish or bearish? Is the directional signal confirmed? Is volume supporting the move? It then aggregates these into a confluence score and cross-timeframe alignment reading.
Components
EMA Stack (21 / 50 / 200)
Three exponential moving averages forming a structural hierarchy. The scoring logic evaluates both the EMA order and price position:
| Condition | Score | Label |
|---|---|---|
| 21 > 50 > 200, price above all | +2 | FULL BULL ▲▲ |
| 21 > 50 > 200 | +1 | BULLISH ▲ |
| Price above 200 but EMAs not ordered | +1 | BULLISH ▲ |
| No clear alignment | 0 | MIXED ◆ |
| Price below 200 but EMAs not ordered | −1 | BEARISH ▼ |
| 21 < 50 < 200 | −1 | BEARISH ▼ |
| 21 < 50 < 200, price below all | −2 | FULL BEAR ▼▼ |
The 200 EMA is separately tracked as "Price/200" in the heatmap, since institutional participants widely use this level as the dividing line between bull and bear regimes.
On the chart, all three EMAs turn green when bull-stacked and red when bear-stacked. A ribbon fill between the fast and mid EMA visualizes alignment strength. Golden Cross (50 above 200) and Death Cross events are marked with "GC" and "DC" labels.
Supertrend (10, 3)
An ATR-based trailing stop that produces a binary directional signal. When the Supertrend line is below price, it scores +1 (BULLISH). When above, it scores −1 (BEARISH). The line also serves as a dynamic stop-loss level. Triangle markers appear at each flip point.
OBV with 20-period SMA
On Balance Volume is calculated cumulatively — adding volume on up-closes, subtracting on down-closes. The heatmap evaluates two dimensions independently: OBV position relative to its SMA (above or below) and the SMA slope direction (rising, falling, or flat). This produces six distinct flow states:
| OBV vs MA | Slope | Label | Meaning |
|---|---|---|---|
| Above | Rising | ACCUM ▲ | Active accumulation — institutional buying |
| Above | Flat | ABOVE MA | Holding above average — neutral positive |
| Above | Falling | WEAKENING | Position eroding despite being above MA |
| Below | Rising | BUILDING | Recovery underway — improving flow |
| Below | Flat | BELOW MA | Holding below average — neutral negative |
| Below | Falling | DISTRIB ▼ | Active distribution — institutional selling |
OBV scores +1 when above MA and rising, −1 when below MA and falling, and 0 for all intermediate states.
The MTF Heatmap
The heatmap table is organized into four color-coded sections:
STRUCTURE (blue header) — EMA Stack alignment and Price vs EMA 200 for each timeframe. Shows whether the market's structural foundation is bullish, bearish, or mixed.
DIRECTION (purple header) — Supertrend signal per timeframe. A clean binary reading of whether the trailing stop is bullish or bearish.
VOLUME FLOW (teal header) — OBV flow state per timeframe. Shows whether volume is confirming the price trend, diverging from it, or transitioning.
CONFLUENCE (gold header) — The aggregated output:
- Score: total from −4 to +4 per timeframe
- Strength: visual dot bar (● ● ● ● ○) representing signal intensity
- Regime: classification label (STRONG BULL BULLISH NEUTRAL BEARISH STRONG BEAR )
At the bottom, an MTF Alignment summary shows how many timeframes agree (e.g., "▲ 3/4 BULLISH — Strong alignment www.pulsewire.com or "◆ SPLIT 2/2 — No clear bias www.pulsewire.com).
Every cell uses heatmap coloring — bright green for strong bullish, through gray for neutral, to deep red for strong bearish — providing an instant visual scan of market conditions.
| Component | Max bullish | Neutral | Max bearish |
|---|---|---|---|
| EMA Stack | +2 | 0 | −2 |
| Supertrend | +1 | — | −1 |
| OBV Flow | +1 | 0 | −1 |
| **Total** | +4 | 0 | −4 |
Classification per timeframe:
- +3 to +4 → STRONG BULL
- +1 to +2 → BULLISH
- 0 → NEUTRAL
- −1 to −2 → BEARISH
- −3 to −4 → STRONG BEAR
Reading the heatmap
The heatmap's primary value is showing cross-timeframe agreement at a glance:
All columns green — Full alignment across timeframes. This is the highest-probability environment for trend-following trades.
Higher TFs green, lower TFs red — A pullback within a larger uptrend. The structural trend is intact; the short-term weakness may represent an entry opportunity.
Lower TFs green, higher TFs red — A rally within a larger downtrend. Unless the higher timeframes are shifting, this is likely a counter-trend bounce.
Mixed colors — No clear directional edge. Reduce position size or wait for alignment to develop.
Section-level reading — If STRUCTURE and DIRECTION are green but VOLUME FLOW is red, the trend lacks volume confirmation and may be fragile. If VOLUME shows ACCUM but DIRECTION is bearish, smart money may be accumulating before a reversal.
Alerts
Seven alert conditions are available:
- Strong bullish trend detected (current TF)
- Strong bearish trend detected (current TF)
- Golden Cross — EMA 50 crosses above EMA 200
- Death Cross — EMA 50 crosses below EMA 200
- Supertrend flip bullish
- Supertrend flip bearish
- Any trend classification change
Disclaimer: This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice or a recommendation to buy or sell any security. No trading indicator can predict future price movements. Past performance is not indicative of future results. Always conduct your own analysis and consider your risk tolerance before making trading decisions. Indicator

Supertrend - EMA Cloud - Divergence - ADX [StrixEDGE]Overview
Apex Trend Engine is a 5-layer confluence system that combines trend-following, momentum, and reversal detection into a single overlay indicator. Each layer operates independently and feeds into a unified scoring engine that generates high-conviction BUY and SELL signals only when multiple confirmations align.
Layer 1 — Supertrend (Trend Direction)
An ATR-based adaptive trend filter that hugs price during trends and flips cleanly on reversals. The Supertrend line is plotted directly on the chart with a subtle fill between price and the stop level, making the current trend direction visible at a glance.
Bull & Bear SuperTrend :
Layer 2 — EMA Cloud (Momentum & Entries)
A fast/slow EMA pair (default 9/21) with a filled cloud between them. The cloud color shows momentum direction: green when fast EMA is above slow, red when below. Crossovers serve as entry triggers when confirmed by other layers.
Bull & Bear EMA :
Layer 3 — RSI Divergence Scanner (Reversals)
Automatic detection of regular bullish and bearish divergences between price and RSI using pivot-confirmed swing points. When price makes a lower low but RSI makes a higher low, a bullish divergence line is drawn on the chart. The reverse for bearish.
Bull Div.
Bear Div.
Layer 4 — ADX Trend Strength (Filter)
The Average Directional Index measures whether the market is trending or ranging. ADX above the threshold (default 25) confirms a trending market. The directional indicators (DI+ vs DI-) determine if the trend is bullish or bearish.
Bull & Bear ADX :
Layer 5 — Combined Signal Engine
Each layer contributes one point to a bull score and one to a bear score (5 points maximum each):
Point 1 — Supertrend direction
Point 2 — EMA fast/slow alignment
Point 3 — Price position relative to 200 EMA
Point 4 — Recent RSI divergence (within 20 bars)
Point 5 — ADX trending with directional confirmation
Signal generation requires both a score threshold AND a trigger event:
STRONG BUY — 4 or more bullish points with an EMA crossover or Supertrend flip
BUY — 3 or more bullish points with a trigger
STRONG SELL — 4 or more bearish points with a trigger
SELL — 3 or more bearish points with a trigger
This dual requirement (score plus trigger) prevents signals from firing on every bar during a trend and limits them to actionable moments.
Chart visuals
Supertrend: colored line with transparent fill to price showing the trend zone
EMA Cloud: fast and slow EMA lines with filled cloud between them
EMA 200: gold line for macro trend reference
Divergence lines: green lines connecting bullish divergence pivots, red for bearish
Signal arrows: double arrows for strong signals, single triangles for regular
Background highlight: subtle bar coloring on strong signal bars
Dashboard table
The on-chart dashboard shows each layer's current reading:
Supertrend — stop level and direction
EMA Cross — values and cross status
EMA 200 — value and price position
RSI — value with overbought/oversold warnings
Divergence — type and how many bars ago
ADX — value with trending/ranging status
Score — X/5 BULL and X/5 BEAR
Signal — combined verdict
Settings
Every component is independently configurable with sensible defaults:
Supertrend: ATR length 10, multiplier 3.0
EMA Cloud: fast 9, slow 21, trend 200
RSI Divergence: length 14, pivot lookback 5
ADX: length 14, smoothing 14, trending threshold 25
Signals: buy/sell arrows and background highlights toggleable
Dashboard: position and text size adjustable
Alerts : 10 alert conditions covering every signal type:
Strong Buy, Buy, Strong Sell, Sell
Supertrend flip bullish/bearish
EMA cross up/down
Bullish/Bearish divergence detected
Disclaimer
This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk capital you cannot afford to lose. Indicator

Indicator

Super-trend Signal Engine Quantum EdgeShort description
ATR-based Supertrend strategy that flips long or short on confirmed trend reversals, with optional signal labels, trend highlighting, bar coloring, and built-in date-range backtesting.
Description
Signal Engine Quantum Edge is a public Supertrend-based strategy built to track volatility-adjusted trend shifts and execute long or short entries when trend direction flips. The script uses ATR-expanded bands around hl2, then updates those bands as price develops so the strategy can detect reversals and stay aligned with the active move. PulseWire describes Supertrend as a trend-following tool built from ATR and price-based bands, where changes in the line’s position relative to price signal shifts in trend direction.
How it works
Calculates ATR using either the built-in ATR method or an alternative SMA-of-true-range method.
Builds dynamic upper and lower trend bands from price and ATR.
Triggers a long entry when trend flips from bearish to bullish.
Triggers a short entry when trend flips from bullish to bearish.
Restricts entries to the user-defined backtest date window.
This strategy follows the same general Supertrend logic PulseWire documents for reversal-based entries, where long positions begin when the trend changes from above price to below price, and short positions begin on the opposite transition.
Inputs
ATR Period — default 10.
ATR Multiplier — default 3.0.
Source — default hl2.
Change ATR Calculation Method? — switch between built-in ATR and SMA-of-TR.
Show Buy/Sell Signals? — toggle signal labels.
Highlighter On/Off? — toggle trend fill shading.
Bar Coloring On/Off? — color candles by active trend.
From / To Date — define the backtest window.
Visual features
Green Supertrend line and fills for bullish phases.
Red Supertrend line and fills for bearish phases.
Optional Buy/Sell labels at trend flips.
Bar coloring to reflect the most recent active signal.
Usage notes
This is a strategy, not an indicator, so it uses strategy.entry() to simulate long and short trades directly from reversal signals.
Like most Supertrend systems, it is designed for trending conditions and can produce false signals during sideways or highly compressed markets, which PulseWire also notes as a common limitation of Supertrend-based methods.
For more realistic testing, set commission, slippage, and position sizing in the strategy properties before evaluating results.
Strategy

Super-trend Signal Engine Strat [QUANTUM EDGE]Short description
Volatility-adjusted Supertrend strategy with trend-reversal entries, bar highlights, and date-range backtesting.
Description
Signal Engine Quantum Edge is a clean Supertrend-based strategy that tracks volatility-adjusted trend state and generates long/short entries on confirmed reversals. It includes optional visual highlights, signal labels, and bar coloring to make trend alignment instantly readable, plus a configurable date range for precise backtest control.
How it works
Computes ATR-based upper and lower bands from a user-selected source (default hl2)
Bands tighten with trend continuation and reset on reversal
A trend flip from bearish to bullish triggers a long entry
A trend flip from bullish to bearish triggers a short entry
Recommended timeframe settings
Timeframe ATR Period ATR Multiplier
15-minute 15 9.1
5-minute 13 5.1
1-minute 10 3.0
Load the chart on your desired timeframe, open the strategy settings, and match the ATR Period and ATR Multiplier to the values above before running backtests.
Inputs
ATR Period — lookback for volatility measurement
ATR Multiplier — band width scalar
Source — price input for band calculation (default hl2)
Change ATR Calculation Method — toggle between standard ATR and SMA-of-TR
Show Buy/Sell Signals — toggle signal labels on/off
Highlighter On/Off — background trend shading
Bar Coloring On/Off — candle color sync with trend state
Date Range — backtest window limits (From/To month, day, year)
Important usage notes
This is a strategy script, not an indicator. It executes strategy.entry() calls and is meant for backtesting and automated execution workflows.
Combine with your own higher-timeframe bias, structure, and risk-management rules before live deployment. Strategy
