Nonparametric Relative Momentum [BackQuant]Nonparametric Relative Momentum
Overview
Nonparametric Relative Momentum is a percentile-rank oscillator that measures where the current price or momentum observation sits relative to its own recent empirical history.
Unlike conventional momentum oscillators that transform price using fixed arithmetic relationships, this indicator uses rank statistics . The current observation is compared directly against the previous values in a rolling window and converted into a percentile score from 0 to 100.
The result answers a simple question:
How extreme is the current observation relative to what this market has actually done recently?
Two calculation modes are available:
Price ranks the selected price source directly.
Momentum first measures price change across a configurable horizon, then ranks that momentum against its own recent history.
The oscillator also includes:
Mid-rank handling for tied observations.
Optional output smoothing.
An EMA signal line.
Configurable overbought and oversold zones.
Stepped intensity colouring as the rank becomes more extreme.
Main-chart candle colouring from the 50 midline regime.
Alerts for midline, extreme-zone and signal-line crossings.
Why “nonparametric”?
In statistics, a parametric method generally assumes that data can be described by a particular distribution or by parameters associated with that distribution.
A nonparametric method does not require the same distributional assumption.
Percentile ranks are a classic example.
The oscillator does not need to assume that recent price changes are:
Normally distributed.
Symmetric.
Constant in volatility.
Characterised by a stable mean and standard deviation.
Instead, it works directly from the ordering of the observed data.
If the current momentum observation is greater than almost every momentum observation in the recent window, it receives a high rank.
If it is lower than almost everything observed recently, it receives a low rank.
This makes the oscillator fundamentally relative to the market’s own recent empirical distribution.
Core calculation
The calculation occurs in three stages:
Select the series to rank.
Calculate its empirical percentile rank.
Optionally smooth that rank and calculate a signal average.
The selected ranking target depends on the Rank Target input.
Price Mode
In Price mode:
Target = Selected Price Source
The current source value is compared with the previous values in the Rank Window.
This answers:
Where is current price positioned within its recent price distribution?
A value near 100 means current price is above almost every observation in the comparison window.
A value near 0 means it is below almost every observation.
A value near 50 means it sits near the middle of its recent distribution.
Because Price mode ranks the price level itself, it behaves somewhat like a stochastic or price-position oscillator, although the calculation is based on empirical ranking rather than highest-lowest range normalisation.
Momentum Mode
Momentum mode first calculates:
Momentum = Source - Source
This measures the absolute price change across the selected Momentum Length.
The resulting momentum series is then percentile-ranked over the Rank Window.
The oscillator therefore answers:
How strong is the current momentum observation compared with recent momentum observations?
This is different from asking whether price itself is historically high or low.
For example, price can be near a recent high while momentum has weakened considerably. In that situation:
Price mode may remain highly ranked.
Momentum mode may fall toward the centre or lower half of the distribution.
Conversely, price does not need to be at a long-term extreme for momentum to rank very highly if the current change is unusually strong relative to recent movements.
Why Momentum mode is different from traditional RSI
The standard Relative Strength Index developed by J. Welles Wilder compares smoothed positive and negative price changes.
Its calculation depends on the relative magnitude of average gains and average losses.
Nonparametric Relative Momentum does not use that formula.
Instead:
A momentum observation is calculated.
That observation is ranked against its own historical sample.
For this reason, Momentum mode can be thought of as a rank-based relative momentum oscillator .
Both traditional RSI and this oscillator are bounded between 0 and 100, but the meaning of those values is different.
For example:
RSI = 90
means the balance of smoothed gains versus losses has produced an RSI reading of 90.
Nonparametric Relative Momentum = 90
means the current momentum observation ranks around the upper end of its recent empirical momentum distribution.
That distinction is important.
Percentile rank calculation
For each bar, the indicator compares the current target with every observation in the preceding Rank Window.
It counts:
How many previous values are below the current value.
How many previous values are exactly equal to it.
The percentile rank is then:
Rank = 100 × (Values Below + 0.5 × Equal Values) / Window Length
This produces an oscillator between 0 and 100.
Why use rank instead of magnitude?
Consider two markets.
Market A may normally move only 0.5% over the selected momentum horizon.
Market B may routinely move 5%.
A raw momentum threshold cannot be interpreted the same way for both.
Ranking changes the question.
Instead of asking:
How many points or percent did this market move?
the oscillator asks:
How unusual is this move relative to this market’s own recent behaviour?
This allows the same 0–100 framework to adapt naturally to different price scales and volatility regimes.
Mid-rank treatment of ties
A simple percentile implementation might count only observations strictly below the current value.
That can distort the result when repeated values occur.
This indicator uses mid-rank treatment .
If historical observations equal the current value, each tie contributes one half rather than being classified entirely above or below.
For example, suppose:
40% of observations are below the current value.
20% are exactly equal.
40% are above.
The mid-rank result is:
40 + 0.5 × 20 = 50
This places the tied observation at the centre of its equal-value group.
Mid-ranks are commonly used in rank-based statistics because they provide a more balanced treatment of ties.
Rank Window
The Rank Window determines how much historical data defines the current empirical distribution.
A shorter Rank Window:
Adapts quickly.
Responds strongly to recent regime changes.
Produces more rapid movement between percentiles.
Can create noisier extreme readings.
A longer Rank Window:
Builds the ranking from a larger sample.
Produces a more stable percentile estimate.
Makes extremes harder to reach.
Responds more slowly when market behaviour changes.
The window therefore controls the memory of the oscillator.
It does not smooth the underlying target directly. It changes the reference distribution against which the target is ranked.
Momentum Length
Momentum Length is used only when Rank Target is set to Momentum.
It controls the horizon over which price change is measured:
Momentum = Current Source - Source from Momentum Length bars ago
Shorter values:
Measure faster momentum.
React to shorter impulses.
Change direction more frequently.
Longer values:
Measure broader displacement.
Focus on more persistent movement.
Ignore more short-term fluctuation.
The Momentum Length and Rank Window perform separate roles.
Momentum Length determines what movement is measured.
Rank Window determines the historical sample against which that movement is judged.
Output Smoothing
The raw percentile rank can optionally be passed through an EMA.
A value of 1 leaves the rank effectively unsmoothed.
Higher values:
Reduce rapid rank fluctuations.
Create a smoother oscillator.
Reduce short-lived extreme readings.
Introduce additional lag.
The smoothing occurs after the percentile calculation.
It does not change how observations are ranked.
The 50 midline
The oscillator is centred around 50.
A value above 50 means the current observation ranks above the midpoint of its recent distribution.
A value below 50 means it ranks below the midpoint.
The interpretation depends on the selected mode.
Price mode above 50
Current price is positioned in the upper half of its recent price distribution.
Price mode below 50
Current price is positioned in the lower half.
Momentum mode above 50
Current momentum is stronger than roughly the middle of its recent momentum observations.
Momentum mode below 50
Current momentum is weaker relative to its recent distribution.
The indicator also uses this midline to colour main-chart candles:
Above or equal to 50 = bullish colour.
Below 50 = bearish colour.
This provides a simple relative-regime view on the price chart.
Percentile extremes
Because the oscillator represents rank rather than an unbounded magnitude, readings near 0 and 100 carry a straightforward interpretation.
Near 100
The current observation is greater than almost every value in the recent comparison window.
Near 0
The current observation is lower than almost every value.
These are empirical extremes.
They do not mean price or momentum cannot become more extreme.
A value near 100 can persist while a strong trend continues because new observations may repeatedly remain near the top of the evolving distribution.
Likewise, readings near 0 can persist during sustained downside momentum.
Overbought and Oversold zones
The default static zones are:
Overbought: 90–100
Oversold: 0–10
These are configurable.
The labels “overbought” and “oversold” describe statistical location, not guaranteed reversal conditions.
An overbought reading means:
The ranked observation is near the top of its recent empirical distribution.
An oversold reading means:
It is near the bottom.
During a range, these areas may help identify local extremes.
During a persistent trend, the oscillator can remain in an extreme zone for extended periods.
The zones should therefore be interpreted together with:
Trend context.
Price structure.
Oscillator direction.
Signal-line behaviour.
Why 90/10 instead of 70/30?
Traditional RSI commonly uses 70 and 30.
That convention does not need to apply to a percentile-rank oscillator.
A rank above 90 means the current observation is in approximately the upper tail of the recent empirical sample, while a reading below 10 represents the lower tail.
Using more extreme default zones makes them intentionally selective.
Users who want broader zones can move the boundaries toward values such as 80 and 20.
Signal line
The white Moving Average line is an EMA of the final oscillator:
Signal = EMA(Percentile Rank Oscillator, Signal Length)
This provides a slower reference against which short-term rank movement can be compared.
Oscillator above signal
The percentile rank is strengthening relative to its own recent smoothed level.
Oscillator below signal
The rank is weakening.
Crossovers can be used to identify changes in short-term momentum within the broader percentile regime.
For example:
A bullish crossover below the oversold zone can indicate rank beginning to recover from an extreme.
A bearish crossover above the overbought zone can indicate deterioration from an upper-tail reading.
A crossover near 50 may represent a more neutral momentum transition.
Signal crosses should not be interpreted independently from oscillator location.
Stepped oscillator colouring
The oscillator uses stepped colour intensity based on its position relative to the 50 midline.
Above 50, colours progressively strengthen as the percentile reaches higher levels.
Below 50, bearish intensity progressively strengthens as the percentile falls.
The main regions are approximately:
50–62.5: modest positive rank.
62.5–75: strengthening positive rank.
75–90: strong positive rank.
90–99: upper-tail extreme.
99–100: exceptional upper-tail rank.
The lower half mirrors this concept:
37.5–50: modest negative rank.
25–37.5: weakening relative state.
10–25: strong negative rank.
1–10: lower-tail extreme.
0–1: exceptional lower-tail rank.
These colours do not introduce additional calculations or signals.
They visually communicate how far the oscillator has moved into its empirical distribution.
Column presentation
The percentile oscillator is plotted as columns around a histogram base of 50.
This means:
Values above 50 extend upward.
Values below 50 extend downward from the midline.
Although the numerical scale remains 0–100, this presentation visually emphasises deviation from the centre of the distribution.
The 50 level therefore functions as the oscillator’s equilibrium reference.
Price mode versus Momentum mode
The two modes answer different questions and should not be treated interchangeably.
Price Mode
Asks:
Where is price relative to its recent distribution?
This makes it useful for:
Range position.
Breakout context.
Relative price extremes.
Stochastic-like analysis.
Momentum Mode
Asks:
Where is current price change relative to the recent distribution of price changes?
This makes it useful for:
Momentum expansion.
Momentum exhaustion.
Relative impulse analysis.
Trend-strength transitions.
Momentum mode can identify weakening momentum before price itself leaves the upper part of its distribution.
Price mode can remain elevated simply because the market is still trading near recent highs.
Example: strong uptrend
Suppose price has been rising steadily.
Price Mode may remain above 90 because current price continually sits near the upper edge of its recent range.
Momentum Mode may behave differently:
It can rise toward 100 during acceleration.
Fall back toward 50 when the trend continues at a more ordinary pace.
Drop below 50 if momentum deteriorates significantly even while price remains relatively high.
This distinction can help separate price location from momentum condition .
Example: volatility regime change
Suppose a market normally changes by only small amounts, then suddenly produces a large directional move.
Raw momentum alone shows a large number.
The percentile rank provides additional context by showing whether that movement is unusual relative to the recent distribution.
If the current momentum is greater than nearly every recent observation, the oscillator moves toward 100.
If the market has already experienced many similarly large moves, the same absolute momentum may receive a much less extreme rank.
The indicator therefore adapts automatically to changing empirical behaviour without requiring fixed momentum thresholds.
Midline crossings
A crossover above 50 indicates the ranked series has moved into the upper half of its recent distribution.
A cross below 50 indicates movement into the lower half.
In Momentum mode, these crossings can be used as a simple relative momentum regime:
Above 50 = comparatively stronger momentum state.
Below 50 = comparatively weaker momentum state.
In Price mode, they indicate whether price is above or below the central portion of its recent rank distribution.
These crossings also control the optional main-chart candle colours.
Extreme-zone crossings
The indicator provides alerts when:
The oscillator crosses upward into the overbought zone.
The oscillator crosses downward into the oversold zone.
These alerts identify entry into an extreme percentile area.
They do not indicate that the extreme has ended.
For reversal-oriented analysis, a trader may instead monitor:
A subsequent exit from the zone.
A signal-line crossover.
Divergence with price.
A break in market structure.
Divergence interpretation
Because Momentum mode ranks momentum rather than price, it can also be useful for examining momentum divergence.
For example:
Price may make a higher high while the oscillator produces a lower percentile peak.
This indicates that the latest momentum observation is less exceptional relative to its recent history than it was during the previous price high.
The reverse can occur at lows.
As with conventional divergence, this is evidence of changing momentum characteristics, not confirmation that price must reverse.
How to use the indicator
1. Relative momentum regime
In Momentum mode, use the 50 midline as a simple regime reference:
Above 50 = positive relative momentum state.
Below 50 = negative relative momentum state.
2. Momentum extremes
Use the configurable zones to identify unusually high or low momentum ranks.
Rather than automatically fading these conditions, determine whether the market is:
Trending.
Exhausting.
Breaking out.
Returning toward equilibrium.
3. Signal-line transitions
Oscillator and signal-line crosses can help identify shorter-term changes in rank direction.
The location of the crossover matters.
A bullish crossover at 5 carries different context from one at 95.
4. Price-distribution analysis
Switch to Price mode when the objective is to measure where the current market sits within its recent price distribution.
This can be useful for:
Breakout analysis.
Range positioning.
Relative high/low detection.
5. Trend confirmation
Momentum remaining consistently above 50 can support an existing bullish trend.
Momentum remaining below 50 can support a bearish trend.
Repeated oscillation around 50 indicates that relative momentum is changing sides frequently.
6. Candle regime colouring
The optional overlay candles make the oscillator’s midline state visible directly on the main price chart.
This can be useful when the oscillator pane is being used primarily for extremes and signal-line analysis.
Input guide
Rank Target
Selects what is percentile-ranked.
Price ranks the source itself.
Momentum ranks its change over the selected Momentum Length.
Rank Window
Controls the empirical comparison sample.
Longer values are smoother and statistically broader. Shorter values adapt more quickly.
Momentum Length
Controls the displacement horizon in Momentum mode.
It has no effect in Price mode.
Output Smoothing
Applies optional EMA smoothing to the percentile rank.
1 produces the raw rank.
Signal Length
Controls the EMA signal line.
Shorter values follow the oscillator more closely. Longer values produce slower crossover signals.
Overbought Zone
Sets the lower boundary of the upper extreme area.
Oversold Zone
Sets the upper boundary of the lower extreme area.
How this differs from RSI
Traditional RSI:
Separates gains and losses.
Smooths their magnitude.
Calculates a relative-strength ratio.
Transforms that ratio onto a 0–100 scale.
Nonparametric Relative Momentum:
Calculates price or momentum directly.
Ranks the current observation against historical observations.
Uses no gain/loss ratio.
Uses no assumed distribution.
The identical 0–100 scale therefore represents a different statistical concept.
How this differs from Stochastic
A conventional stochastic oscillator measures where current price lies between the highest high and lowest low of a window.
Its basic concept is:
(Current - Lowest) / (Highest - Lowest)
Nonparametric Price mode instead asks how many historical observations are below the current price.
This distinction matters because the rank considers the entire empirical ordering of the sample, not only its two extreme endpoints.
Two windows can have identical highs, lows and current price but different internal distributions.
A stochastic calculation can return the same value in both cases, while percentile rank can differ because the number of observations above and below the current price is different.
How this differs from a Z-score
A Z-score measures deviation from a mean in standard-deviation units:
Z = (Current Value - Mean) / Standard Deviation
That calculation depends directly on the sample mean and dispersion.
Percentile rank depends only on ordering.
As a result, an extreme outlier can heavily alter a mean and standard deviation but has much less influence on the ordering of the remaining observations.
This is one of the reasons rank statistics can be useful when financial data contains skew, fat tails or isolated extreme moves.
Strengths
Uses a nonparametric empirical ranking process.
Requires no assumption of normality.
Produces an intuitive bounded 0–100 scale.
Adapts naturally to the recent behaviour of each market.
Supports both price-location and momentum-ranking modes.
Uses mid-ranks for tied observations.
Normalises momentum extremes without relying on fixed point or percentage thresholds.
Includes configurable smoothing and signal analysis.
Provides direct midline regime colouring on the main chart.
Limitations
A percentile rank measures relative position, not absolute magnitude.
A reading of 100 does not indicate how much larger the current observation is than the rest of the sample.
Persistent trends can remain at extreme ranks for extended periods.
Short Rank Windows can generate rapid percentile changes.
Long Rank Windows adapt more slowly to regime shifts.
Momentum mode uses absolute source change rather than percentage return, although ranking substantially reduces scale dependence within a single instrument.
Extreme readings are not automatic reversal signals.
Signal-line crosses can whipsaw in noisy conditions.
The oscillator is reactive and does not forecast future price.
Alerts
The indicator provides alerts for:
Cross Up 50: oscillator enters the upper half of its distribution.
Cross Down 50: oscillator enters the lower half.
Overbought: oscillator crosses upward through the selected upper-zone boundary.
Oversold: oscillator crosses downward through the selected lower-zone boundary.
Bull: oscillator crosses above its signal EMA.
Bear: oscillator crosses below its signal EMA.
Summary
Nonparametric Relative Momentum converts either price or momentum into an empirical percentile rank.
Instead of asking how far an observation is from a moving average, how many standard deviations it sits from a mean, or what ratio of gains to losses produced it, the indicator asks where that observation ranks relative to its own recent history.
In Price mode, it measures the relative location of price within its historical distribution.
In Momentum mode, it first calculates price displacement across a chosen horizon and then measures how exceptional that momentum is relative to recent momentum observations.
A mid-rank procedure handles tied values, optional EMA smoothing controls visual responsiveness, and a separate signal average provides crossover analysis. The 50 midline separates the upper and lower halves of the empirical distribution, while configurable overbought and oversold zones highlight the tails.
The result is a distribution-free relative momentum framework that adapts to the observed behaviour of the market rather than relying on fixed magnitude thresholds or an assumed statistical distribution.
Indicator

Indicator

EVA Ai+ Auto Chart Patterns - Price Action & Trading Signals EN 🧬 EVA AI Chart Pattern Scanner is an advanced price action and technical analysis indicator designed to automatically detect high-value chart patterns directly on the PulseWire chart.
Instead of manually searching through hundreds of candles, the indicator continuously analyzes market structure, confirmed pivot points, volatility, pattern geometry, volume behavior and breakout conditions.
The result is a clean visual map of developing and confirmed trading setups.
🔍 PATTERNS DETECTED
The indicator automatically identifies:
• Bull Flags and Bear Flags
• Bullish and Bearish Pennants
• Symmetrical Triangles
• Ascending Triangles
• Descending Triangles
• Rising Wedges
• Falling Wedges
• Double Bottom patterns
• Double Top patterns
• Head and Shoulders
• Inverse Head and Shoulders
Both local MICRO patterns and larger MACRO market structures can be detected.
⚡ INTELLIGENT PATTERN SCANNING
EVA AI does not rely on one fixed pattern length.
The scanner evaluates multiple market windows and compares available structures by geometry, compression, trend context, pole strength, volatility and overall pattern quality.
This adaptive approach allows the indicator to detect compact intraday formations as well as larger swing trading patterns.
When two independent structures exist at the same time, the indicator can display both instead of hiding one valid setup behind another.
📐 PREMIUM CHART VISUALIZATION
Developing patterns are displayed directly on the chart with projected boundaries and optional transparent pattern zones.
Confirmed patterns become brighter after a valid closed-candle breakout.
Depending on the detected structure, the chart may display:
• Pattern boundaries
• Pivot point labels
• Neckline levels
• Calculated apex projections
• LONG or SHORT breakout labels
• Pattern quality score
• MICRO or MACRO classification
• Measured price targets
• Target guide lines
Every pattern family has its own visual style and color, making complex market structure easier to read.
🎯 CLOSED-CANDLE BREAKOUT CONFIRMATION
LONG and SHORT signals are generated only after the required breakout has been confirmed on a closed candle.
The script does not use lookahead, future market data or historical signal backfilling.
This means a confirmed signal is fixed on the candle where the breakout condition is actually validated rather than being drawn retrospectively on an earlier candle.
📊 PATTERN QUALITY FILTER
Every detected structure receives an internal quality score from 0 to 100.
The score evaluates factors such as:
• Pattern geometry
• Price compression
• Strength of the preceding movement
• Pattern proportions
• Pivot symmetry
• Breakout candle strength
• Volume behavior
• MICRO or MACRO structure priority
Separate quality thresholds are available for developing patterns and confirmed trading signals.
Raise the threshold to receive fewer but more selective setups. Lower it to increase pattern coverage.
📈 VOLUME AND BREAKOUT FILTERS
Optional volume filters can be used to evaluate consolidation volume and breakout activity.
Traders can choose whether volume should contribute to the quality score or become a strict confirmation requirement.
This makes the indicator adaptable to stocks, cryptocurrency, forex, futures, indices and other liquid markets.
🧠 REVERSAL PATTERN ENGINE
Double Top, Double Bottom, Head and Shoulders and Inverse Head and Shoulders patterns are analyzed through confirmed pivot sequences.
The engine evaluates:
• Distance between pattern points
• Relative height and depth
• Time symmetry
• Shoulder proportions
• Head dominance
• Neckline slope
• Prior directional price movement
• Breakout candle body
• Pattern lifetime
A separate MACRO pivot stream helps detect large reversal structures that may otherwise be hidden by smaller market noise.
🔺 TRIANGLE AND WEDGE DETECTOR
Triangles and wedges are selected from multiple pivot combinations rather than only the most recent four turning points.
The scanner compares slope direction, boundary convergence, initial pattern height, final compression and projected apex distance.
This improves the detection of larger chart formations while filtering weak or geometrically invalid structures.
🛠 FLEXIBLE SETTINGS
The indicator includes detailed controls for:
• Minimum and maximum pattern length
• Pivot sensitivity
• MICRO and MACRO pattern detection
• Pattern quality thresholds
• Breakout confirmation buffer
• Breakout candle strength
• Volume confirmation
• Pattern projection length
• Target calculation
• Pattern colors and transparency
• Maximum number of displayed structures
• Signal cooldown
• Developing pattern visibility
Default settings are balanced for general chart analysis, while experienced traders can create stricter profiles for scalping, day trading or swing trading.
💡 HOW TO USE
1. Add the indicator to a standard candlestick chart.
2. Watch the developing structure and its projected boundaries.
3. Check the pattern type, direction and quality score.
4. Wait for a confirmed closed-candle breakout.
5. Use the calculated target as a technical reference.
6. Confirm the setup with trend direction, liquidity, support and resistance, volume and personal risk management.
The indicator can be used as a chart pattern scanner, breakout indicator, price action tool, market structure detector and technical analysis assistant.
It is suitable for traders working with crypto, forex, stocks, futures and indices across intraday and higher timeframes.
⚠️ IMPORTANT
This indicator is an analytical tool. It does not guarantee profitable trades and should not be treated as financial advice.
Always evaluate market conditions, liquidity, volatility and risk before entering a position.
🚀 NEED A COMPLETE TRADING INDICATOR?
EVA AI+ combines market structure, liquidity zones, trend analysis, momentum confirmation and high-quality LONG/SHORT signals in one advanced trading system.
The indicator helps traders read market direction, locate liquidity, identify potential entries and manage trades with clearly structured Take Profit, Stop Loss and trailing logic.
✅ Stocks, Crypto, Forex and Futures
✅ Intraday and Swing Trading
✅ Market Structure and Liquidity Analysis
✅ LONG and SHORT Trading Signals
✅ Free Test Drive Available
🔥 Get EVA AI+ and request your FREE TEST DRIVE:
Indicator

Adaptive Trend Ensemble [BackQuant]Adaptive Trend Ensemble
Overview
Adaptive Trend Ensemble is an online-learning trend filter that combines eight different moving-average methods into one continuously weighted trend estimate.
Instead of selecting one moving average permanently, the indicator treats each method as an independent forecasting expert. Every bar, each expert is evaluated according to whether its previous slope correctly anticipated the direction of the latest price move.
Experts that were directionally correct retain more influence. Experts that were wrong lose influence through a multiplicative penalty. The weights are then normalised and used to blend all eight moving-average values into one adaptive ensemble line.
The indicator therefore attempts to answer two separate questions:
Which smoothing method has recently aligned best with price direction?*
How strongly do the weighted methods currently agree on the direction of trend?
The final output includes:
A dynamically weighted ensemble trend line.
Bullish and bearish trend-state colouring.
A gradient between price and the ensemble.
A consensus-driven glow.
Trend-coloured candles.
A live label showing the leading expert and its current weight.
Alerts when the ensemble trend changes direction.
This is not a fixed moving average and it is not a simple average of several indicators. The contribution of each expert changes over time according to its recent directional performance.
Core idea
Moving averages respond differently to the same market.
A Hull Moving Average may respond quickly during a sharp transition, while an RMA may remain stable through temporary noise. A linear-regression estimate may follow a smooth directional move well, while a conventional EMA may perform better during a more ordinary trend.
No individual smoothing method is consistently superior across every environment.
Markets alternate between:
Persistent trends.
Fast breakouts.
Slow directional drift.
Volatile reversals.
Compressed ranges.
Noisy transitions.
A fixed indicator cannot change its mathematical personality when the environment changes. It continues using the same weighting structure regardless of whether that structure currently suits the market.
Adaptive Trend Ensemble addresses this by maintaining a bank of different smoothing methods and changing their influence through time.
The model does not attempt to decide in advance which method is best. It allows recent realised price action to determine which experts should currently receive more weight.
Prediction with expert advice
The indicator is based on a class of online-learning methods commonly described as:
Prediction with Expert Advice
In this framework:
Several experts produce predictions.
The actual outcome is observed.
Each expert receives a loss based on its prediction.
Expert weights are updated.
The combined model places more influence on better-performing experts.
The term “expert” does not imply that each method is intelligent by itself. An expert is simply an individual forecasting rule.
In this indicator, the eight experts are eight moving-average methods.
The model uses a multiplicative-weights process closely related to the Hedge and Weighted Majority families of online-learning algorithms.
The central principle is:
Do not commit permanently to one model.
Track several models simultaneously.
Reduce the weight of models that make mistakes.
Allow the combined forecast to adapt as relative performance changes.
Online learning
The model learns sequentially, one bar at a time.
It does not train on a separate historical dataset and then freeze its parameters.
At each new bar:
The previous slope of each moving average is treated as that expert's prediction.
The realised close-to-close direction is observed.
Each expert receives a loss.
Weights are updated multiplicatively.
Weights are normalised.
The current expert values are blended using the new weights.
This makes the process online and adaptive.
The weight state is carried forward from bar to bar, meaning the current ensemble reflects the accumulated results of earlier expert decisions.
The expert bank
The ensemble contains eight moving-average experts:
Simple Moving Average - SMA*
Exponential Moving Average - EMA
Weighted Moving Average - WMA*
Hull Moving Average - HMA
Double Exponential Moving Average - DEMA*
Running Moving Average - RMA
Arnaud Legoux Moving Average - ALMA*
Least-Squares Moving Average - LSMA
All experts use the same Base Length.
This is important because it keeps their nominal observation horizon comparable. The ensemble is comparing different mathematical treatments of approximately the same lookback rather than comparing completely unrelated time horizons.
Even with an identical length, the experts behave differently because they assign weight to historical observations in different ways.
Simple Moving Average - SMA
The SMA applies equal weight to every observation inside the selected window.
Its general form is:
SMA = Sum of observations / Number of observations
The SMA is stable and easy to interpret, but every included observation has the same importance.
This can make it slower to react when a new trend begins because older prices continue to influence the average until they leave the window.
Within the ensemble, the SMA acts as a neutral equal-weight baseline.
Exponential Moving Average - EMA
The EMA assigns progressively greater weight to recent observations.
Its recursive form is based on:
EMA = α × Current Price + (1 - α) × Previous EMA
where α is determined by the selected length.
Compared with an SMA of the same length, an EMA generally responds more quickly to recent movement.
Its recursive weighting makes it useful during ordinary directional markets, although it can still turn repeatedly when price oscillates in a range.
Weighted Moving Average - WMA
The WMA assigns linearly increasing weight to more recent observations.
For example, in a simplified four-period WMA, the newest value receives four units of weight, while the oldest receives one.
This makes the WMA more responsive than an equal-weight SMA while retaining a finite lookback window.
Within the ensemble, it provides a direct recency-weighted alternative to the exponential behaviour of the EMA.
Hull Moving Average - HMA
The Hull Moving Average was designed to reduce lag while preserving a relatively smooth output.
Its construction combines weighted moving averages over different horizons, applies a lag-compensation step, and then smooths the result over approximately the square root of the original length.
Conceptually:
Calculate a faster WMA.
Calculate a slower WMA.
Use their difference to compensate for lag.
Smooth the compensated result.
The HMA often reacts quickly to changes in trend direction.
That responsiveness can make it valuable during strong transitions, but it may also make it more sensitive to short-term oscillation.
Double Exponential Moving Average - DEMA
Despite its name, DEMA is not simply an EMA calculated twice.
Its general construction is:
DEMA = 2 × EMA - EMA of EMA
The second EMA estimates some of the lag in the first EMA. Subtracting it attempts to create a smoother with less delay.
DEMA can respond quickly to directional changes, although reduced lag may also increase sensitivity during unstable conditions.
Running Moving Average - RMA
RMA is commonly associated with Wilder-style smoothing.
It uses a slower recursive update than a typical EMA of the same nominal length.
Its general form places substantial influence on the previous RMA value, producing a persistent and stable estimate.
The RMA expert often changes direction less aggressively than the faster methods.
Within the ensemble, it acts as one of the more conservative smoothing models.
Arnaud Legoux Moving Average - ALMA
ALMA applies a Gaussian-style weighting curve across the observation window.
The weighting distribution can be shifted toward more recent observations while maintaining a smooth bell-shaped profile.
The script uses a recent-weighted offset and a fixed Gaussian width.
ALMA attempts to balance:
Smoothness.
Reduced lag.
Controlled weighting of the observation window.
It provides a different weighting structure from the linear, exponential and lag-compensated experts.
Least-Squares Moving Average - LSMA
The LSMA is based on linear regression.
Instead of averaging historical prices directly, it fits a straight line through the selected window and evaluates the regression estimate at the current bar.
The method attempts to represent the local directional path of price.
LSMA can follow smooth trends closely because it models slope explicitly. However, it may respond strongly when the local regression direction changes abruptly.
Within the indicator, the LSMA is produced using the rolling linear-regression output.
Base Length
The Base Length is shared by all eight experts.
Lower values:
Make every expert more responsive.
Increase sensitivity to short-term changes.
Produce faster weight and trend changes.
Increase the possibility of whipsaws.
Higher values:
Create smoother expert outputs.
Focus the ensemble on broader trend structure.
Reduce short-term changes.
Increase lag during sudden reversals.
Because all experts share the same length, changing this setting adjusts the entire ensemble horizon.
It does not change the number of experts or their relative starting weights.
Expert predictions
The model evaluates each expert using the direction of its slope.
For each moving average:
Rising slope is represented as +1.
Falling or non-rising slope is represented as -1.
To evaluate the latest completed move, the script uses the expert's slope from the previous bar.
For example:
If the expert was rising from two bars ago to the previous bar, it predicted a positive current move.
If the expert was falling, it predicted a negative current move.
The realised outcome is determined from the current close relative to the previous close:
Close above previous close = positive realised direction.
Close below previous close = negative realised direction.
Unchanged close = zero realised direction.
The model therefore scores directional slope prediction, not the numerical distance between each moving average and price.
An expert is rewarded for getting direction right, even if its plotted value is relatively far from the market.
Likewise, an expert is penalised for getting direction wrong even if its line remains visually close to price.
Loss functions
The indicator provides two loss functions:
Directional 0/1*
Magnitude-weighted
The selected loss determines how strongly incorrect experts are penalised.
Correct experts receive zero loss under both modes.
Directional 0/1 loss
Directional mode treats every incorrect prediction equally.
The loss is:
0 when the expert predicted the realised direction correctly.
1 when the expert predicted incorrectly.
This means that an incorrect prediction on a very small move receives the same loss as an incorrect prediction on a large move.
Directional mode answers a simple question:
Was the expert right or wrong?
It does not consider how important the move was.
This mode can produce consistent learning because every directional observation is treated equally, but it may respond to small and insignificant price changes as strongly as major moves.
Magnitude-weighted loss
Magnitude-weighted mode scales the penalty according to the size of the realised move.
The move is normalised using ATR:
Move = Absolute close-to-close change / ATR
The ATR uses the shared Base Length.
The incorrect expert's loss becomes:
Loss = Normalised Move
with the magnitude capped at 3.
The cap prevents a single extreme bar from creating an unlimited penalty.
This mode gives greater importance to mistakes during large movements.
For example:
An incorrect expert during a 0.10 ATR move receives a small penalty.
An incorrect expert during a 1.00 ATR move receives a larger penalty.
An incorrect expert during a move above 3 ATR receives the capped penalty of 3.
Magnitude-weighted mode answers:
How costly was the directional mistake relative to current volatility?
This can make the ensemble adapt more strongly after significant movements while paying less attention to small fluctuations.
Flat price bars
If the current close is unchanged from the previous close, the realised direction is zero.
Because expert directions are encoded as either positive or negative, no expert can exactly match a zero realised direction.
Under Directional mode, all experts receive the same incorrect classification.
Because every weight is multiplied by the same penalty factor, their relative weight distribution remains effectively unchanged after normalisation.
Under Magnitude-weighted mode, the realised move is zero, so the resulting penalty is also zero.
In both cases, a completely flat close-to-close bar does not materially change the relative ranking of the experts.
Multiplicative weight update
Each expert begins with an equal weight:
Initial Weight = 1 / 8
After the loss is calculated, the weight is updated using:
New Unnormalised Weight = Old Weight × exp(-η × Loss)
where η is the Learning Rate.
This is the central Hedge or multiplicative-weights update.
Correct experts have zero loss:
exp(-η × 0) = 1
Their unnormalised weight is unchanged.
Incorrect experts have a positive loss, so their weight is multiplied by a value below one.
For example, in Directional mode with a Learning Rate of 2:
Incorrect Weight Multiplier = exp(-2) ≈ 0.135
An incorrect expert retains only about 13.5% of its previous unnormalised weight before the weight set is normalised again.
This does not mean its final displayed weight will necessarily fall by exactly 86.5%, because all expert weights are subsequently rescaled so they sum to one.
Why multiplicative updates are used
An additive system might subtract a fixed quantity from each incorrect expert.
That can create problems:
Weights can become negative.
The same penalty has a different effect on large and small weights.
The model may not adapt proportionally.
A multiplicative update preserves non-negative weights and penalises experts proportionally to their current influence.
It also allows the distribution to become concentrated around consistently successful methods.
Learning Rate - η
The Learning Rate controls how aggressively the ensemble shifts weight after mistakes.
Higher values:
Penalise incorrect experts more strongly.
Move influence rapidly toward recent winners.
Can produce winner-take-all behaviour.
Can make the leader change abruptly after a few important bars.
Lower values:
Produce gradual weight changes.
Keep the expert distribution more diversified.
Reduce sensitivity to short-term performance.
Make the model slower to adapt.
The Learning Rate does not change the moving averages themselves. It changes only how quickly their relative influence evolves.
High Learning Rate behaviour
At high settings, a wrong expert may lose most of its weight after one or two mistakes.
This can be beneficial when one smoothing method is clearly better suited to the current regime.
It can also create instability:
A recent winner can dominate the ensemble.
A temporary performance streak can cause excessive concentration.
The model can switch leaders quickly when conditions reverse.
Low Learning Rate behaviour
At low settings, the ensemble behaves more like a slowly adapting average of the expert bank.
No single observation dramatically changes the distribution.
This produces smoother adaptation, but a poorly suited expert may retain substantial influence for longer.
Weight normalisation
After all expert weights are updated, they are normalised:
Normalised Weight = Expert Weight / Sum of All Expert Weights
This ensures that the complete weight set sums to one.
The weights can then be interpreted as each expert's share of the ensemble.
For example:
A 25% weight means that expert contributes one quarter of the weighted output.
A 5% weight means its current influence is relatively small.
The weights are not probabilities that the experts will be correct on the next bar.
They are adaptive influence coefficients based on accumulated relative loss.
Weight Floor
The optional Weight Floor preserves a minimum allocation for every expert.
After normalisation, the adjusted weight is calculated so that:
Every expert receives at least the selected floor.
The remaining weight is distributed according to the normalised Hedge weights.
The full set continues to sum to one.
For eight experts, a floor of 0.01 reserves at least 1% for each expert.
This assigns:
A minimum combined mass of 8%.
The remaining 92% according to relative performance.
A floor of 0.05 reserves at least 5% for each of the eight experts, using 40% of the total distribution as minimum allocations.
The remaining 60% is distributed according to current performance.
Why use a floor?
Without a floor, repeatedly incorrect experts can approach a weight extremely close to zero.
Because the update only reduces weights after losses, an expert with almost no weight may require a long period of relative outperformance before it becomes influential again.
A positive floor keeps all methods alive.
This allows an expert that performed poorly in the previous regime to recover more quickly when the market environment changes.
Weight Floor set to zero
With a zero floor:
The model is free to concentrate almost entirely in one expert.
Recent winners can dominate strongly.
The ensemble can become highly specialised.
This produces the purest multiplicative-weights behaviour but increases the risk of weight collapse.
Positive Weight Floor
With a positive floor:
The expert bank remains diversified.
Cold experts retain some influence.
The model can recover more easily after regime changes.
The leading expert's maximum possible weight is reduced.
The floor therefore controls the balance between specialisation and diversity.
Ensemble output
After the weight update, the current values of the eight experts are blended:
Ensemble = Sum of Expert Weight × Expert Value
This is a weighted average in which the weights are determined by online directional performance.
If the HMA currently has the greatest weight, the ensemble will behave more like the HMA.
If the RMA and SMA dominate, the output will become smoother and more conservative.
If the weights are distributed evenly, the line represents a broad blend of all eight methods.
The output can therefore change its effective smoothing behaviour without changing the user-selected Base Length.
Line Smoothing
The weighted ensemble may be passed through an optional EMA for visual smoothing.
A setting of 1 effectively disables this additional stage.
Higher settings:
Create a smoother displayed line.
Reduce small slope changes.
Delay bullish and bearish flips.
This smoothing is cosmetic in the sense that it occurs after the online expert weighting.
It does not affect:
Expert predictions.
Expert losses.
Weight updates.
Consensus.
Leader selection.
It does affect the final plotted line and the trend state derived from that line.
Trend state
Trend direction is determined from the slope of the smoothed ensemble line.
If the line is above its previous value, trend becomes bullish.
If the line is below its previous value, trend becomes bearish.
If the line is unchanged, the previous trend persists.
This creates a persistent two-state regime.
A bullish flip occurs when the trend changes from bearish to bullish.
A bearish flip occurs when it changes from bullish to bearish.
The trend state is based on the ensemble's slope, not on price crossing the ensemble.
Price may be above or below the line without immediately changing its direction.
Consensus calculation
The indicator calculates a separate weighted directional vote.
Each expert's current slope direction is multiplied by its current weight:
Weighted Vote = Sum of Weight × Direction
Because each direction is either +1 or -1 and the weights sum to one, the vote lies between -1 and +1.
Examples:
+1 means all meaningful weight is assigned to rising experts.
-1 means all meaningful weight is assigned to falling experts.
0 means bullish and bearish weighted influence is evenly balanced.
The displayed consensus strength is:
Consensus Strength = Absolute Value of Weighted Vote
This converts the result to a range from zero to one.
0% means the weighted expert bank is evenly divided.
100% means the weighted influence is entirely aligned in one direction.
Weighted consensus versus expert count
Consensus is not calculated by simply counting how many of the eight experts are rising.
An expert with a 40% weight contributes more than one with a 2% weight.
For example:
Five low-weight experts may be bullish.
Three high-weight experts may be bearish.
The final weighted vote can still be bearish.
This means consensus measures the agreement of the current weighted model, not the raw number of methods on each side.
With a zero Weight Floor, consensus may become very high when one expert dominates, even if several near-zero-weight experts disagree.
With a positive floor, disagreement from the remaining experts has more influence on the consensus value.
Consensus is not confidence
The consensus percentage should not be interpreted as a probability that the trend will continue.
It measures only the current alignment of weighted expert slopes.
High consensus means:
The influential experts point in the same direction.
It does not guarantee:
Future price continuation.
A profitable entry.
Low reversal risk.
Strong agreement can occur late in a mature trend as well as early in a new one.
Leading method
The live information label identifies the expert with the highest current weight.
It displays:
The expert name.
Its current percentage weight.
The weighted consensus strength.
The current ensemble direction.
For example:
Leading: HMA (34.5%)*
Consensus: 78% ▲
This means the HMA currently has the largest share of the ensemble and the weighted expert bank is strongly aligned upward.
The leader percentage is not a win probability.
It is only the experts share of the current normalised weight distribution.
Leader changes
The leading method can change when:
The current leader makes directional mistakes.
Another expert remains correct while competitors are penalised.
A large magnitude-weighted move strongly changes relative weights.
The market transitions into a regime better suited to another smoother.
Leader changes can help reveal how the ensemble is adapting.
For example:
A shift toward HMA or DEMA may reflect stronger preference for responsive methods.
A shift toward SMA or RMA may reflect better recent performance from slower methods.
A shift toward LSMA may occur during a smooth local directional path.
These interpretations are contextual and should not be treated as fixed rules.
Gradient fill
The indicator fills the area between price and the ensemble line.
When price is above the line:
A bullish gradient is displayed.
When price is below the line:
A bearish gradient is displayed.
The gradient visually separates price from the adaptive trend estimate.
The fill reflects price location, while the line colour reflects the slope-derived ensemble trend.
These can temporarily disagree.
For example:
Price may fall below a still-rising ensemble during a pullback.
Price may rise above a still-falling ensemble during a counter-trend rally.
This disagreement can provide useful context.
Consensus glow
A glow is drawn around the ensemble line.
Its brightness changes according to weighted consensus.
When consensus is high:
The glow becomes brighter and more visible.
When the experts are divided:
The glow becomes more transparent.
The glow width is scaled using ATR based on the Base Length, helping the effect remain proportional across instruments and volatility environments.
The glow is a visual representation of model agreement. It does not modify the line or trend calculation.
Candle colouring
Candles can be coloured according to the current ensemble trend:
Bullish trend uses the selected bullish colour.
Bearish trend uses the selected bearish colour.
Candle colouring is based on the direction of the ensemble line, not the direction of each individual candle.
A bearish candle can therefore remain green during a bullish ensemble regime, and a bullish candle can remain red during a bearish regime.
How to interpret the indicator
Bullish ensemble trend
A bullish state means the final ensemble line is rising.
This indicates that the current weighted combination of experts is moving upward.
It does not require all individual experts to be bullish.
Bearish ensemble trend
A bearish state means the final ensemble line is falling.
The weighted combination is moving downward, even if one or more individual experts remain bullish.
High bullish consensus
A strongly positive vote means most influential expert weight is assigned to rising methods.
This can indicate broad directional alignment.
High bearish consensus
A strongly negative vote means the influential experts are predominantly falling.
Low consensus
A consensus near zero means weighted expert directions are divided.
This can occur during:
Trend transitions.
Sideways ranges.
Pullbacks.
Disagreement between faster and slower methods.
Low consensus does not automatically mean price will remain sideways. It means the ensemble's components are not currently aligned.
High leader weight and high consensus
This indicates that:
One method currently dominates.
The broader weighted bank is aligned with it.
The model is highly concentrated and directionally unified.
This can produce a responsive and decisive ensemble, but it also means the output depends heavily on the current leader.
Distributed weights and high consensus
This means several experts maintain meaningful weights while pointing in the same direction.
The trend is supported by a more diversified group of methods.
Leader weight high but consensus low
This can occur when the dominant expert points one way while several remaining experts point the other way.
The ensemble may still follow the leader, but internal disagreement is present.
How to use the indicator
1. Trend regime filter
Use the ensemble slope as directional context:
Prioritise long setups during bullish regimes.
Prioritise short setups during bearish regimes.
The indicator does not define entry price, stop placement or profit targets.
2. Consensus filter
A user may require stronger consensus before acting on the trend state.
For example:
A bullish flip with low consensus may represent an early or uncertain transition.
A bullish regime with high consensus indicates broader weighted alignment.
No universal consensus threshold is appropriate for every market.
3. Pullback analysis
During a bullish ensemble regime:
Price moving toward or below the line may represent a pullback.
The ensemble remaining bullish suggests its trend estimate has not yet reversed.
During a bearish regime:
Price moving toward or above the line may represent a counter-trend rally.
Price interaction with the line should be combined with structure and risk management.
4. Regime adaptation observation
The Leading Method label can be used to study how different smoothers perform through changing environments.
Rather than assuming one moving average is always best, the user can observe:
Which expert gains weight during trends.
Which expert takes over during transitions.
How concentrated the model becomes.
How quickly weights change under different Learning Rates.
5. Bullish and bearish flips
Trend flips can be used as:
Regime-change alerts.
Confirmation for another setup.
Potential exit conditions.
A directional filter for discretionary trades.
Because flips are based on line slope, responsive settings can generate repeated changes during ranges.
Suggested configurations
Balanced adaptive configuration
Moderate Base Length.
Moderate Learning Rate.
Directional loss.
Small positive Weight Floor.
Minimal Line Smoothing.
This keeps the model adaptive while preserving some expert diversity.
Fast adaptation configuration
Shorter Base Length.
Higher Learning Rate.
Magnitude-weighted loss.
Zero or very small Weight Floor.
Line Smoothing of 1 or 2.
This allows rapid concentration around recent winners but can create unstable leader changes.
Conservative diversified configuration
Longer Base Length.
Lower Learning Rate.
Directional loss.
Positive Weight Floor.
Additional Line Smoothing.
This creates slower and more diversified adaptation.
Large-move-focused configuration
Magnitude-weighted loss can be used when mistakes during large ATR-normalised moves should matter more than errors during minor fluctuations.
This may reduce the influence of small alternating bars on the weight distribution.
Pure directional configuration
Directional loss is useful when every close-to-close directional observation should be treated equally.
It creates a straightforward right-or-wrong scoring process.
How this differs from averaging moving averages
A normal moving-average ribbon or composite may calculate:
Average of SMA, EMA, HMA and other methods.
If every method receives equal weight permanently, its influence never changes.
Adaptive Trend Ensemble instead calculates:
Performance-dependent weights.
Sequential loss updates.
A dynamically changing weighted output.
Two bars with the same expert values can produce different ensemble values if the weight distributions differ.
How this differs from selecting the current fastest average
The indicator does not select whichever moving average is currently closest to price or whichever has moved the most.
Weights are based on whether previous expert slopes correctly anticipated realised price direction.
An expert can therefore lead even if it is not the fastest or closest line.
How this differs from an optimisation
The model does not search historical data for one set of parameters with the best backtest result.
It does not change the shared length of each expert.
Instead, it performs continuous online adaptation of the expert weights.
This avoids permanently selecting one historical winner, but it also means recent performance can strongly influence the current model.
How this differs from a machine-learning forecast
The indicator uses a genuine online-learning algorithm, but it is not a neural network or a price-target forecasting model.
It does not estimate the size of the next move.
The experts make binary directional predictions derived from their slopes.
The learning system then adjusts how much influence each moving-average value receives.
It is therefore best understood as an adaptive model-selection and blending process.
Causality and real-time behaviour
The learning update uses:
The prior-bar slope of each expert.
The current close-to-close realised direction.
It does not use future bars.
On historical completed candles, the update is fully causal.
On the current live candle:
The close can continue changing.
The realised direction can change.
Expert values can change.
Weights and consensus can update intrabar.
A bullish or bearish flip may appear before the candle closes.
Users requiring confirmed signals should evaluate the indicator at bar close.
Strengths
Combines eight distinct smoothing methods.
Adapts expert influence through online learning.
Supports directional and magnitude-sensitive losses.
Uses multiplicative updates rather than fixed weighting.
Provides optional protection against permanent weight collapse.
Separates ensemble direction from expert consensus.
Displays the currently leading method.
Uses one shared horizon for a fairer expert comparison.
Requires no offline training process.
Provides transparent open-source calculations.
Summary
Adaptive Trend Ensemble combines eight moving-average experts using a multiplicative online-learning model.
Each expert uses the same Base Length but applies a different smoothing method. The previous slope of each expert acts as its directional prediction for the latest close-to-close move.
After the realised direction is observed, incorrect experts receive either a fixed directional loss or an ATR-normalised magnitude-weighted loss. Their weights are reduced using an exponential Hedge update, then normalised and optionally adjusted using a minimum Weight Floor.
The current expert values are blended according to these adaptive weights, producing one ensemble line whose effective behaviour changes as different methods gain or lose influence.
A separate weighted vote measures current directional agreement. This consensus controls the visual glow and is displayed beside the current leading expert.
The result is a transparent adaptive trend model that does not assume one moving average will remain optimal. Instead, it continuously redistributes influence toward the methods that have recently aligned better with realised price direction while retaining configurable control over responsiveness, diversity and visual smoothing.
Indicator

EVA Ai Chart Patterns v2.9.3 🧬 EVA Ai+ Chart Patterns and Trading Signals Indicator
EVA Ai+ Chart Patterns automatically detects technical analysis patterns directly on the PulseWire chart.
The indicator scans both local and large-scale price structures, draws their boundaries, evaluates pattern quality, and displays clear LONG or SHORT signals after confirmation.
It can be used for crypto, Bitcoin, forex, stocks, futures, and index trading. The detector works on the current chart timeframe and supports scalping, day trading, and swing-trading analysis.
🔍 Patterns detected
📈 Continuation patterns
🟢 Bull Flag — LONG
🔴 Bear Flag — SHORT
🔵 Bull Pennant — LONG
🟠 Bear Pennant — SHORT
The detector evaluates the impulse pole, consolidation range, boundary slopes, price compression, and breakout quality.
🔄 Reversal patterns
🟢 Double Bottom — LONG
🔴 Double Top — SHORT
🟣 Head and Shoulders — SHORT
🔵 Inverse Head and Shoulders — LONG
Double Top and Double Bottom structures are drawn with thick dashed lines. Head and Shoulders patterns use thick dotted lines, making each pattern family easy to recognize on the chart.
🧠 Local and macro pattern detection
Short price structures and large reversal formations are processed separately.
The indicator can detect:
local chart patterns;
large reversal structures;
extended flags and pennants;
patterns containing intermediate price swings;
the strongest valid combination of pivot points.
A minor internal swing does not automatically invalidate a larger pattern. EVA compares several possible pivot combinations and selects the structure with the stronger geometry and quality score.
📊 Pattern quality score
Each detected formation receives a quality rating:
QUALITY 76%
The score considers pattern geometry, scale, time symmetry, prior market direction, pivot structure, and breakout confirmation.
Example chart labels:
FLAG
LONG · QUALITY 78%
HEAD AND SHOULDERS
SHORT · QUALITY 84%
MACRO · 68 bars
Low-quality matches are filtered. Separate thresholds are available for developing and confirmed patterns.
⏳ Developing and confirmed patterns
While a pattern is still developing, its boundaries may update as new candles appear. The chart label shows:
FORMING
A confirmed signal is created only after a candle closes beyond the pattern boundary or neckline.
Closed candle
+ confirmed breakout
+ sufficient quality
= LONG or SHORT
Confirmed signals are placed on the bar where the conditions are actually completed. They are not moved backward to earlier historical candles.
🎨 Individual pattern colors
Each pattern family uses a separate color:
Bull Flag — emerald;
Bear Flag — coral red;
Bull Pennant — cyan;
Bear Pennant — orange;
Double Bottom — lime;
Double Top — magenta;
Head and Shoulders — purple;
Inverse Head and Shoulders — blue.
Pattern colors and developing-pattern transparency can be adjusted in the indicator settings.
🔔 PulseWire alerts
Separate alert conditions are included for:
LONG Flag
SHORT Flag
LONG Pennant
SHORT Pennant
LONG Double Bottom
SHORT Double Top
SHORT Head and Shoulders
LONG Inverse Head and Shoulders
Alerts can be configured through the standard PulseWire alert menu.
📌 How to use the indicator
Identify the broader market context: trend, range, or reversal area.
Check which chart pattern is developing.
Review the expected direction: LONG or SHORT.
Look at the pattern quality score.
Wait for a confirmed candle close beyond the boundary.
Combine the signal with support and resistance, volume, and your risk-management rules.
A developing pattern represents an active scenario. A confirmed label means that the breakout conditions have already been completed.
🎯 Common use cases
EVA Ai+ Chart Patterns can be used for:
technical analysis;
chart pattern detection;
Price Action trading;
trend and reversal analysis;
breakout trading;
crypto trading;
Bitcoin trading;
forex trading;
stock and futures analysis;
scalping;
day trading;
swing trading;
LONG and SHORT trading signals.
⚠️ Risk notice
A chart pattern does not guarantee a reversal, continuation, or profitable trade. Signals should be evaluated together with market context, volume, key price levels, and predefined risk management.
This indicator is an analytical tool and does not provide individual financial or investment advice. Indicator

EVA Ai+ Chart Patterns Indicator - Price Action & Trading Signal🧬 EVA Ai+ — индикатор графических фигур и торговых паттернов
EVA Ai+ Chart Patterns автоматически находит графические фигуры технического анализа прямо на графике PulseWire.
Индикатор отслеживает локальные и крупные ценовые модели, строит их границы, определяет направление возможного пробоя и показывает понятные метки ЛОНГ или ШОРТ после подтверждения сигнала.
Подходит для анализа криптовалют, Bitcoin, Forex, акций, фьючерсов и фондовых индексов. Работает на текущем таймфрейме графика: от скальпинга и внутридневной торговли до более крупных свинговых моделей.
🔍 Какие фигуры распознаёт индикатор
📈 Фигуры продолжения движения
🟢 Бычий флаг — ЛОНГ
🔴 Медвежий флаг — ШОРТ
🔵 Бычий вымпел — ЛОНГ
🟠 Медвежий вымпел — ШОРТ
Алгоритм анализирует импульсное древко, ширину консолидации, наклон границ, сжатие диапазона и качество пробоя.
🔄 Разворотные фигуры
🟢 Двойное дно — ЛОНГ
🔴 Двойная вершина — ШОРТ
🟣 Голова и плечи — ШОРТ
🔵 Перевёрнутые голова и плечи — ЛОНГ
Двойные вершины и основания отображаются толстой пунктирной линией. Голова и плечи — толстой точечной линией. Благодаря этому разные модели легко различить даже на насыщенном графике.
🧠 Поиск локальных и крупных фигур
Обычный короткий паттерн и большая рыночная конструкция рассчитываются отдельно.
Индикатор умеет находить:
локальные фигуры внутри текущего движения;
крупные разворотные модели;
длинные флаги и вымпелы;
фигуры с промежуточными ценовыми колебаниями;
наиболее качественную комбинацию опорных экстремумов.
Мелкий рыночный шум не должен автоматически разрушать крупную модель. Для этого EVA сравнивает несколько допустимых комбинаций и выбирает структуру с более высоким качеством.
📊 Оценка качества фигуры
Каждая найденная модель получает оценку:
КАЧ. 76%
При расчёте учитываются геометрия, масштаб, симметрия, направление движения перед фигурой, качество экстремумов и пробой сигнальной границы.
На графике можно увидеть:
ФЛАГ
ЛОНГ · КАЧ. 78%
ГОЛОВА И ПЛЕЧИ
ШОРТ · КАЧ. 84%
КРУПНАЯ · 68 баров
Низкокачественные совпадения фильтруются. Порог для формирующихся и подтверждённых моделей настраивается отдельно.
⏳ Формирующаяся и подтверждённая фигура
Пока модель развивается, её линии могут обновляться вместе с новыми свечами. Такая фигура отмечается как:
ФОРМИРУЕТСЯ
Подтверждённый сигнал появляется после закрытия свечи за границей фигуры или линией neckline.
Закрытая свеча
+ подтверждённый пробой
+ достаточное качество
= ЛОНГ или ШОРТ
Подтверждённая метка не переносится на прошлые свечи. Сигнал фиксируется на том баре, где условия действительно были выполнены.
🎨 Отдельный цвет для каждого паттерна
У каждой группы свой цвет:
флаг ЛОНГ — изумрудный;
флаг ШОРТ — красно-коралловый;
вымпел ЛОНГ — голубой;
вымпел ШОРТ — оранжевый;
двойное дно — лаймовый;
двойная вершина — малиновый;
голова и плечи — фиолетовый;
перевёрнутые голова и плечи — синий.
Цвета и прозрачность формирующихся фигур доступны в настройках.
🔔 Торговые оповещения PulseWire
Для каждого подтверждённого паттерна предусмотрен отдельный алерт:
ЛОНГ Флаг
ШОРТ Флаг
ЛОНГ Вымпел
ШОРТ Вымпел
ЛОНГ Двойное дно
ШОРТ Двойная вершина
ШОРТ Голова и плечи
ЛОНГ Перевёрнутые голова и плечи
Оповещения можно подключить через стандартное меню PulseWire и получать уведомления при появлении подтверждённой фигуры.
📌 Как применять индикатор
Определите общий контекст рынка: тренд, диапазон или разворотная зона.
Посмотрите, какая фигура формируется на графике.
Проверьте направление: ЛОНГ или ШОРТ.
Обратите внимание на показатель КАЧ.
Дождитесь подтверждённого закрытия свечи за границей модели.
Сопоставьте сигнал с уровнями поддержки и сопротивления, объёмом и собственной системой управления риском.
Формирующаяся фигура показывает возможный сценарий. Подтверждённая метка сообщает, что условия пробоя уже выполнены.
🎯 Для каких задач подходит
Индикатор можно использовать для:
технического анализа;
поиска графических фигур;
Price Action;
анализа тренда и разворота;
поиска пробоя консолидации;
криптовалютной торговли;
торговли Bitcoin;
Forex;
акций и фьючерсов;
скальпинга;
дневной и свинг-торговли;
поиска сигналов ЛОНГ и ШОРТ.
⚠️ Уведомление о рисках
Графическая фигура не гарантирует продолжение или разворот цены. Используйте сигналы вместе с рыночным контекстом, уровнями, объёмом и заранее определённым риском.
Индикатор является аналитическим инструментом и не представляет собой индивидуальную инвестиционную рекомендацию.
🇬🇧 English Title
🧬 EVA Ai+ Chart Patterns Indicator — Price Action & Trading Signals
Search-focused publication title:
EVA Ai+ Flags, Pennants, Double Top & Head and Shoulders Indicator
🇬🇧 English Description
🧬 EVA Ai+ Chart Patterns and Trading Signals Indicator
EVA Ai+ Chart Patterns automatically detects technical analysis patterns directly on the PulseWire chart.
The indicator scans both local and large-scale price structures, draws their boundaries, evaluates pattern quality, and displays clear LONG or SHORT signals after confirmation.
It can be used for crypto, Bitcoin, forex, stocks, futures, and index trading. The detector works on the current chart timeframe and supports scalping, day trading, and swing-trading analysis.
🔍 Patterns detected
📈 Continuation patterns
🟢 Bull Flag — LONG
🔴 Bear Flag — SHORT
🔵 Bull Pennant — LONG
🟠 Bear Pennant — SHORT
The detector evaluates the impulse pole, consolidation range, boundary slopes, price compression, and breakout quality.
🔄 Reversal patterns
🟢 Double Bottom — LONG
🔴 Double Top — SHORT
🟣 Head and Shoulders — SHORT
🔵 Inverse Head and Shoulders — LONG
Double Top and Double Bottom structures are drawn with thick dashed lines. Head and Shoulders patterns use thick dotted lines, making each pattern family easy to recognize on the chart.
🧠 Local and macro pattern detection
Short price structures and large reversal formations are processed separately.
The indicator can detect:
local chart patterns;
large reversal structures;
extended flags and pennants;
patterns containing intermediate price swings;
the strongest valid combination of pivot points.
A minor internal swing does not automatically invalidate a larger pattern. EVA compares several possible pivot combinations and selects the structure with the stronger geometry and quality score.
📊 Pattern quality score
Each detected formation receives a quality rating:
QUALITY 76%
The score considers pattern geometry, scale, time symmetry, prior market direction, pivot structure, and breakout confirmation.
Example chart labels:
FLAG
LONG · QUALITY 78%
HEAD AND SHOULDERS
SHORT · QUALITY 84%
MACRO · 68 bars
Low-quality matches are filtered. Separate thresholds are available for developing and confirmed patterns.
⏳ Developing and confirmed patterns
While a pattern is still developing, its boundaries may update as new candles appear. The chart label shows:
FORMING
A confirmed signal is created only after a candle closes beyond the pattern boundary or neckline.
Closed candle
+ confirmed breakout
+ sufficient quality
= LONG or SHORT
Confirmed signals are placed on the bar where the conditions are actually completed. They are not moved backward to earlier historical candles.
🎨 Individual pattern colors
Each pattern family uses a separate color:
Bull Flag — emerald;
Bear Flag — coral red;
Bull Pennant — cyan;
Bear Pennant — orange;
Double Bottom — lime;
Double Top — magenta;
Head and Shoulders — purple;
Inverse Head and Shoulders — blue.
Pattern colors and developing-pattern transparency can be adjusted in the indicator settings.
🔔 PulseWire alerts
Separate alert conditions are included for:
LONG Flag
SHORT Flag
LONG Pennant
SHORT Pennant
LONG Double Bottom
SHORT Double Top
SHORT Head and Shoulders
LONG Inverse Head and Shoulders
Alerts can be configured through the standard PulseWire alert menu.
📌 How to use the indicator
Identify the broader market context: trend, range, or reversal area.
Check which chart pattern is developing.
Review the expected direction: LONG or SHORT.
Look at the pattern quality score.
Wait for a confirmed candle close beyond the boundary.
Combine the signal with support and resistance, volume, and your risk-management rules.
A developing pattern represents an active scenario. A confirmed label means that the breakout conditions have already been completed.
🎯 Common use cases
EVA Ai+ Chart Patterns can be used for:
technical analysis;
chart pattern detection;
Price Action trading;
trend and reversal analysis;
breakout trading;
crypto trading;
Bitcoin trading;
forex trading;
stock and futures analysis;
scalping;
day trading;
swing trading;
LONG and SHORT trading signals.
⚠️ Risk notice
A chart pattern does not guarantee a reversal, continuation, or profitable trade. Signals should be evaluated together with market context, volume, key price levels, and predefined risk management.
This indicator is an analytical tool and does not provide individual financial or investment advice. 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

VWAP Deviation Trend [BackQuant]VWAP Deviation Trend
Overview
VWAP Deviation Trend is a volume-weighted trend-following overlay that transforms VWAP and its surrounding price distribution into a directional trailing structure.
Rather than using VWAP only as a fair-value line, the indicator calculates:
A configurable anchored or rolling VWAP.
The volume-weighted standard deviation of price around that VWAP.
Adaptive upper and lower deviation bands.
One-sided trailing boundaries used to confirm bullish and bearish regimes.
The indicator is designed to identify when price has moved far enough away from accepted volume-weighted value to establish a meaningful directional shift.
Unlike a simple VWAP crossover, price can move through VWAP without immediately changing the active trend. A new regime requires price to break the opposite trailing deviation boundary, optionally with confirmation from the direction of VWAP itself.
The updated visual engine also measures trend strength and uses it to control:
Gradient intensity.
Trail glow width.
Post-flip bloom effects.
The visual separation between price and the active trail.
Core concept
VWAP represents the average price paid over a selected period, weighted by trading volume.
The basic formula is:
VWAP = Sum of Price × Volume / Sum of Volume
Prices associated with greater volume contribute more heavily to the final value. This makes VWAP a useful approximation of:
Volume-weighted fair value.
The center of traded activity.
The average position of market participants.
An institutional execution benchmark.
However, VWAP alone does not explain how widely price has been distributed around that value.
VWAP Deviation Trend treats VWAP as the center of a volume-weighted price distribution and measures the dispersion around it. That dispersion is then used to create trailing trend boundaries.
VWAP calculation modes
The indicator supports five VWAP windows:
4 Hours
Daily
Weekly
Rolling Lookback Bars
Rolling Lookback Days
4 Hours
Resets VWAP at fixed four-hour intervals.
This can be useful for:
Cryptocurrency markets.
Intraday futures.
Continuously traded markets.
Shorter fair-value regimes.
Daily
Resets at the beginning of each calendar day.
This is the traditional intraday VWAP structure and is useful for:
Session bias.
Intraday mean reversion.
Day-trading trend confirmation.
Weekly
Accumulates volume and price across the current week.
This creates a slower structural anchor suited to:
Swing trading.
Weekly positioning.
Broader accepted-value analysis.
Rolling Lookback Bars
Calculates VWAP over a fixed number of candles.
The window moves forward continuously and does not reset at a calendar boundary.
This is useful for:
Systematic trend models.
Consistent multi-timeframe analysis.
Markets where daily sessions are less important.
Rolling Lookback Days
Includes bars that fall within a selected number of calendar days.
This keeps the analytical window tied to elapsed time instead of a fixed candle count.
Anchored versus rolling VWAP
Anchored modes begin at a fixed boundary and accumulate until the next reset.
Rolling modes continually remove old observations as new observations arrive.
Anchored VWAP is useful when a particular session or week has structural meaning. Rolling VWAP is useful when the trader wants a stable and continuously adapting lookback.
Volume-weighted deviation
The indicator calculates more than the VWAP mean.
It also measures volume-weighted price variance using:
Weighted Mean Square = Sum of Price² × Volume / Sum of Volume
Weighted Variance = Weighted Mean Square - VWAP²
Weighted Deviation = Square Root of Weighted Variance
This measures how widely prices associated with meaningful trading volume are distributed around VWAP.
A small deviation suggests:
Trading is concentrated near fair value.
The market is relatively balanced.
Price acceptance is narrow.
A large deviation suggests:
Trading is spread across a wider range.
Price discovery is more active.
The market is less tightly centered around VWAP.
Because the calculation is volume weighted, high-volume prices influence the bands more than low-volume excursions.
Fallback when volume is unavailable
If usable volume is not available, the indicator falls back to an unweighted arithmetic mean and variance.
This allows it to function on synthetic or limited-volume symbols, although the result should then be interpreted as a rolling or anchored mean rather than a true VWAP.
Deviation bands
The raw width is calculated as:
Deviation Width = Weighted Deviation × Deviation Multiplier
The upper and lower raw bands are:
Upper Band = VWAP + Band Width
Lower Band = VWAP - Band Width
Higher deviation multipliers create wider bands and fewer trend changes.
Lower multipliers create tighter bands and faster, more frequent flips.
ATR minimum width
During low-dispersion periods, volume-weighted deviation can become extremely narrow.
This can cause small and insignificant movements to trigger repeated reversals.
The optional ATR floor calculates:
ATR Floor = ATR × ATR Minimum Multiplier
The final width becomes:
Band Width = Maximum of Deviation Width and ATR Floor
This preserves volume-weighted deviation as the primary band engine while preventing the channel from collapsing below a practical volatility threshold.
Trailing-band construction
The raw deviation bands move freely with VWAP and dispersion.
The indicator converts them into one-sided trailing levels.
Lower trail
While the selected trigger remains above the lower trail:
The trail can rise.
It cannot move downward.
This creates a ratcheting support structure.
Upper trail
While the trigger remains below the upper trail:
The trail can fall.
It cannot move upward.
This creates a ratcheting resistance structure.
The active trend trail is:
The lower trail during bullish regimes.
The upper trail during bearish regimes.
Why trailing logic matters
A raw VWAP band can move toward price and create unstable signals.
The one-sided trail preserves trend structure and creates hysteresis.
Hysteresis means the threshold required to enter a bullish regime is different from the threshold required to enter a bearish regime.
This allows price to rotate around VWAP without constantly changing the active trend.
Trend initialization
When the first valid VWAP is available:
The trend initializes bullish if the trigger is at or above VWAP.
The trend initializes bearish if the trigger is below VWAP.
After initialization, a full break of the opposite trail is required to change regimes.
Bullish trend flip
A bullish flip requires:
The selected trigger to move above the upper trailing band.
The current trend not already to be bullish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bullish.
The active trail moves beneath the market.
A bullish signal marker is displayed.
Bearish trend flip
A bearish flip requires:
The selected trigger to move below the lower trailing band.
The current trend not already to be bearish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bearish.
The active trail moves above the market.
A bearish signal marker is displayed.
Flip trigger
The trend can be triggered using:
Close
The selected VWAP price source
Close is the more conventional option.
Using the price source, such as HLC3, can produce a slightly smoother trigger because it reflects more of the bar than the close alone.
VWAP slope confirmation
Optional slope confirmation requires VWAP itself to move in the direction of the proposed new trend.
For a bullish flip:
Current VWAP must be above VWAP from the selected lookback.
For a bearish flip:
Current VWAP must be below its prior value.
This can help reject:
Temporary band breaks.
Low-volume price spikes.
Liquidity sweeps against flat fair value.
The tradeoff is additional confirmation delay.
Breaking the trail on flips
The active trail changes from one side of the market to the other during a regime transition.
The Break Trail On Flips option inserts a visual gap on the flip bar so the previous and new trails are not connected by a misleading line segment.
This affects presentation only.
Visual trend-strength engine
The updated script includes a visual-strength model that controls the intensity of the gradient and glow.
It combines two measurements:
Distance between price and the active trail.
Slope of VWAP relative to the current band width.
Distance strength
The script measures:
Absolute Distance = |Close - Trend Trail|
This is normalized by the current band width.
A larger distance indicates stronger separation between price and the structural trail.
Slope strength
VWAP movement across the slope lookback is also normalized by the band width.
This measures whether volume-weighted fair value itself is moving meaningfully relative to the size of the current deviation structure.
Combined trend strength
The final visual strength is weighted:
70% price-to-trail distance.
30% VWAP slope strength.
This produces a value between zero and one.
It does not change trend logic or signals. It controls the visual intensity of the indicator.
Layered gradient fill
Instead of using one flat gradient, the updated indicator divides the space between the trail and price into six visual layers.
The levels are placed progressively between:
The active trend trail.
The current closing price.
The gradient is:
Most concentrated near the structural trail.
Progressively softer toward price.
The opacity adapts to trend strength.
When price is strongly separated from the trail and VWAP is moving with the regime:
The gradient becomes more vivid.
When the trend is weak:
The fill becomes softer and more transparent.
This makes the visual ribbon encode more than direction. It also reflects the current strength of the price-to-structure relationship.
Flip bloom
After a confirmed trend flip, the indicator creates a temporary bloom around the new trail.
The bloom is strongest immediately after the transition and fades over the following bars.
Its intensity follows this general sequence:
First bar after flip: strongest bloom.
Second bar: reduced bloom.
Third bar: light residual bloom.
Afterward: bloom disappears.
This visually emphasizes fresh regime changes without permanently increasing chart brightness.
The bloom is cosmetic and does not affect calculation.
Adaptive trail glow
The glow surrounding the trail also changes with trend strength.
The base width is ATR-scaled, then increases slightly as the visual trend-strength score rises.
This creates:
A broader glow during stronger regimes.
A narrower glow when trend structure is weaker.
The glow contains:
An inner, more visible layer.
A wider, softer outer layer.
Visual interpretation
The updated presentation provides several pieces of information simultaneously:
Color shows the active trend direction.
The trail shows the structural regime boundary.
Gradient intensity reflects trend strength.
Glow width reinforces structural conviction.
The bloom highlights fresh regime transitions.
How to use the indicator
Trend regime filter
Use the active color and trail position as directional context:
Favor longs during bullish regimes.
Favor shorts during bearish regimes.
Pullback structure
In a bullish regime:
VWAP represents volume-weighted fair value.
The lower trail represents deeper structural support.
In a bearish regime:
VWAP represents the mean-reversion anchor.
The upper trail represents deeper structural resistance.
Trend-strength context
A vivid gradient and broader glow suggest:
Price is well separated from the trail.
VWAP is moving in the trend direction.
The regime has stronger structural momentum.
A weak or faded gradient suggests:
Price is closer to the trail.
VWAP slope is weaker.
The trend may be consolidating or losing strength.
Fresh transitions
The bloom helps identify newly established regimes.
A fresh flip with:
Strong bloom.
Growing price separation.
VWAP slope alignment.
generally represents stronger early trend structure than a flip that immediately loses visual intensity.
Dynamic risk management
The active trail may be used as:
A trailing stop reference.
A regime invalidation boundary.
A position-management guide.
Because the trail responds to both volume-weighted dispersion and volatility, it adjusts as market conditions change.
How this differs from a standard VWAP
A standard VWAP:
Plots only volume-weighted mean price.
Usually resets once per session.
Does not maintain trend state.
VWAP Deviation Trend:
Supports anchored and rolling windows.
Calculates volume-weighted dispersion.
Creates adaptive raw bands.
Converts them into directional trailing boundaries.
Maintains persistent bullish and bearish regimes.
Adds a strength-reactive visual system.
How this differs from Supertrend
A traditional Supertrend normally uses a central price such as HL2 and ATR-based bands.
VWAP Deviation Trend uses:
Volume-weighted fair value as the center.
Volume-weighted standard deviation as the primary width.
ATR only as an optional minimum floor.
This means the trail responds not only to range volatility, but also to where trading volume has been concentrated.
How this differs from Bollinger Bands
Bollinger Bands normally use:
A moving average.
Unweighted standard deviation.
Symmetrical non-trailing bands.
This indicator uses:
A volume-weighted mean.
Volume-weighted variance.
One-sided trailing bands.
Persistent trend-state logic.
It is therefore a trend-regime model rather than a standard mean-reversion envelope.
Input guide
VWAP Mode
Selects the anchored or rolling calculation window.
Deviation Multiplier
Controls the width of the statistical bands.
Higher values produce wider, slower regimes. Lower values produce tighter and faster regimes.
ATR Minimum Width
Prevents excessive narrowing during compressed conditions.
VWAP Slope Confirmation
Requires volume-weighted fair value to move with the proposed trend.
Flip Trigger
Selects whether close or the chosen price source must cross the trail.
Visual settings
Allow the trader to display:
The trend trail.
VWAP.
Raw deviation bands.
Layered gradient.
Adaptive glow.
Signals.
Trend candles.
Strengths
Combines fair value, dispersion, and trend structure.
Uses volume-weighted mean and variance.
Supports multiple anchored and rolling VWAP windows.
Uses ATR protection against narrow-band whipsaws.
Creates persistent regimes with hysteresis.
Provides optional VWAP slope confirmation.
Includes a trend-strength-reactive visual system.
Clearly emphasizes fresh trend transitions.
Limitations
Volume quality varies between instruments.
Anchored VWAP modes may be unstable immediately after a reset.
Long windows can react slowly to sudden regime changes.
Tight settings can increase whipsaws.
Wide settings can delay reversals.
Slope confirmation can add additional lag.
Visual strength is contextual and is not a separate trading signal.
Alerts
The indicator includes alerts for:
Confirmed bullish trend flips.
Confirmed bearish trend flips.
These represent complete VWAP deviation regime changes, not ordinary crosses of VWAP.
Summary
VWAP Deviation Trend converts volume-weighted fair value and price dispersion into a directional trend trail.
It calculates VWAP over a configurable anchored or rolling window, measures volume-weighted standard deviation around that VWAP, and builds upper and lower deviation bands. An optional ATR floor prevents the structure from becoming excessively narrow during quiet conditions.
The raw bands are transformed into one-sided trails. The lower trail ratchets upward during bullish regimes, while the upper trail ratchets downward during bearish regimes. Trend changes occur only when price breaks the opposite trail, optionally with confirmation from the slope of VWAP.
The updated visual engine measures price separation and VWAP slope to dynamically control the layered gradient, trail glow, and temporary post-flip bloom. This creates a clearer representation of direction, structural strength, and fresh regime transitions without changing the underlying signal logic. Indicator

Watermark Pro @SafarTradesWatermark Pro
Watermark Pro is a customizable branding and metadata overlay for PulseWire charts. It helps create a clean, professional workspace while keeping important chart information consistently visible.
The indicator combines customizable branding, chart metadata, and account status badges into a single configurable layout, making it suitable for personal trading, screenshots, educational content, and social media publishing.
Branding Panel
Display a fully customizable title and subtitle with flexible positioning to maintain a consistent visual identity across all charts.
Account Status Badge
Display a customizable status badge (e.g., Live Account, Demo Account, Funded Account, Backtesting) with multiple styling options to clearly identify the chart environment.
Chart Metadata
Optionally display the current date, trading symbol, and timeframe in a dedicated information panel that updates automatically as charts change.
Customization
Every component can be customized independently, allowing you to configure the layout to match your personal workflow and visual preferences.
Theme presets
Branding panel
Account status badge
Chart metadata panel
Flexible positioning
Color and typography controls
Badge styling options
Intended Use
Watermark Pro is suitable for traders, educators, analysts, and content creators who want consistent chart branding and a clean presentation for trading, analysis, screenshots, and educational content. Indicator

ICT Sessions & Killzones - Asia London NY + Liquidity[LunqFX]ICT Sessions & Killzones is a modern smart-money session indicator for PulseWire that maps the three global trading sessions — Asia, London and New York — as clean, colour-coded ranges and, unlike most session tools, automatically detects liquidity sweeps: the exact moment price raids a previous session's high or low and rejects it. It turns the daily rhythm of the market — the ICT killzones, session opens, and the liquidity pools left behind — into a clear, actionable map. Works on forex, crypto, indices, futures and gold (XAUUSD), on any intraday timeframe. Built in Pine Script v6. Keywords: ICT, killzones, sessions, Asia session, London session, New York session, liquidity, liquidity sweep, stop hunt, smart money concepts, SMC, session high low, opening range, forex, crypto, day trading, scalping.
◆ WHY SESSIONS MATTER
Price does not move randomly — it moves in sessions. Asia sets the range, London expands it, New York reverses or continues it. The highs and lows each session leaves behind become liquidity pools — resting stop orders that smart money targets. Knowing where those levels are, which session is active, and when a level gets swept is the core of session-based and ICT trading. This tool puts all of that on your chart automatically.
◆ WHAT IT DRAWS
Session boxes — Asia (violet), London (teal) and New York (gold) ranges drawn automatically from each session's high and low, kept across history so you can study the pattern.
Previous-session liquidity levels — the last completed session's high and low extended forward as dashed lines. These are the magnets price hunts next.
Liquidity sweep markers — a compact, colour-coded arrow (▲/▼ with the session code A / L / NY) printed when price wicks beyond a prior session extreme and closes back inside — a real stop-raid / rejection. Hover any marker for the full detail.
Neon gradient candles — turquoise up / magenta down, intensity scaled by momentum.
◆ THE LIVE DASHBOARD
A clean, colour-railed panel that reads the sessions at a glance:
Active session — which session is open right now (● marks any that are live; London and New York overlap in real hours, so both can be active).
Range per session — each session's high–low.
Range in pips — how far each session actually moved.
★ Widest range — the session that dominated the day (the "power session").
Timezone readout, fully themeable, adjustable text size.
◆ HOW IT WORKS
Every bar is assigned to a session from its own timestamp (no repainting from higher-timeframe data). The session's running high and low build the box in real time. When a new session opens, the previous session's extremes are locked in as liquidity levels. A liquidity sweep is flagged only when price trades beyond a prior session's high/low and then closes back inside it — a genuine rejection — so a clean break straight through does not trigger a false signal. This keeps the chart clean and every sweep meaningful.
◆ HOW TO USE IT
Trade the killzones. The London and New York opens produce the biggest, cleanest moves — focus your entries there.
Use prior session highs/lows as targets. Untapped levels act as magnets; price often runs them before reversing.
Fade or follow sweeps. When a sweep prints, the raid has taken liquidity — fade it back into range, or trade the reversal in the opposite direction.
Read the dashboard for context. Know which session is active and which had the widest range before you commit.
Set your times/timezone. Adjust each session's hours and the timezone in the settings to match your market and broker.
Combine with your own market structure, order blocks or bias for higher-probability confluence.
◆ SETTINGS
Session times & colours (Asia / London / New York), timezone, session boxes (soft fill or outline), previous-session levels with adjustable extension, liquidity sweep markers, neon candles, and a dashboard (show/hide, position, text size, background).
◆ ALERTS
Liquidity sweep — fires when any previous-session high or low is swept.
◆ LIMITATIONS
Sessions are an intraday concept — use a 1m to 4h timeframe. On daily or higher the panel shows a reminder and no sessions are drawn.
Default session times are in GMT; set the timezone and hours to match your instrument and broker feed, as session boundaries vary by symbol.
A liquidity sweep shows that a level was raided and rejected — it is context and confluence, not a standalone buy/sell signal.
Session ranges reflect the data of your chart's feed; different brokers can differ slightly.
◆ ORIGINALITY & NON-REPAINTING
Original work — the session engine, the rejection-based liquidity-sweep detection, the previous-session liquidity levels and the dashboard are all my own implementation; no third-party code is used. Sessions and levels are built from each bar's own timestamp with no higher-timeframe lookahead, so a sweep printed on a closed bar stays.
Educational analysis tool, not financial advice. Trading involves risk. Always do your own research and manage risk. © LunqFX. Indicator

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

W & M Pattern | 3 Peaks + RR ToolW and MW & M Pattern | 3 Peaks + Liquidity Sweep | RR Tool
This indicator identifies high-probability reversal setups by combining classical market structure analysis with liquidity sweep detection — two concepts widely used in Smart Money and Price Action trading.
How It Works
The indicator continuously scans the chart for two mirror-image setups:
Bullish W Pattern (Long Setup)
In a falling market, price forms three consecutive Lower Highs (LH1 → LH2 → LH3), confirming a bearish structure. The indicator then watches for a W formation — where price first drops to a swing low, sweeps below it to grab liquidity (the sharp wick down), and then reverses sharply upward forming the right leg of the W. This liquidity sweep is the key trigger, as it signals that smart money has absorbed sell-side orders and a reversal is likely. A long entry is signaled as price recovers, with the stop loss placed just below the W's sweep low and the take profit targeting either the 1st or 3rd Lower High.
Bearish M Pattern (Short Setup)
In a rising market, price forms three consecutive Higher Highs (HH1 → HH2 → HH3), confirming a bullish structure. The indicator then watches for an M formation — where price pushes above the prior swing high to sweep buy-side liquidity (the sharp wick up), then fails and drops below the neckline. This sweep signals that smart money has distributed into retail buying pressure and a reversal downward is likely. A short entry is signaled as price breaks down, with the stop loss just above the M's sweep high and take profit targeting the 1st or 3rd Higher High. Indicator

NLMS Adaptive Trend Filter [BackQuant]NLMS Adaptive Trend Filter
Overview
The NLMS Adaptive Trend Filter is a machine learning inspired trend-following indicator built around one of the most important adaptive filtering algorithms in signal processing: the Normalized Least Mean Squares (NLMS) filter .
Unlike traditional moving averages that use fixed weighting schemes, the NLMS filter continuously learns from incoming market data and updates its internal coefficients in real time. Rather than assuming that price behavior remains constant, the filter attempts to adapt its structure as market conditions evolve.
This approach originates from the field of digital signal processing, where adaptive filters have been used for decades in applications such as:
• Telecommunications
• Radar systems
• Echo cancellation
• Noise reduction
• Speech processing
• Control systems
• Financial signal extraction
The goal of this indicator is to bring one of these adaptive filtering concepts into market analysis by creating a trend model that continually adjusts itself based on prediction error rather than relying on static averaging methods.
Historical Background
The roots of the NLMS filter can be traced back to the work of Bernard Widrow and Ted Hoff in the late 1950s and early 1960s.
While working at Stanford University, they developed what became known as the:
Least Mean Squares (LMS) Algorithm
The LMS algorithm was revolutionary because it provided a computationally simple method for training adaptive systems using gradient descent.
Rather than solving a complex optimization problem all at once, the LMS algorithm updates its weights incrementally after each observation.
The basic concept was:
1. Make a prediction.
2. Measure the prediction error.
3. Adjust the model slightly.
4. Repeat indefinitely.
This idea eventually became one of the foundational concepts behind modern machine learning and online optimization.
Many modern neural networks still rely on the same underlying principle:
Error → Gradient → Weight Update
The LMS algorithm later evolved into several variants, one of the most important being:
Normalized Least Mean Squares (NLMS)
NLMS improves stability by scaling weight updates according to the energy of the input signal.
This prevents learning rates from becoming too aggressive during high-volatility periods and too weak during low-volatility periods.
As a result, NLMS became one of the most widely used adaptive filtering algorithms in engineering.
What Makes NLMS Different From Moving Averages?
Traditional moving averages use predetermined weights.
For example:
Simple Moving Average (SMA)
Every observation receives equal weight.
Example:
20-period SMA
Each bar contributes:
1 / 20 = 5%
regardless of market conditions.
Exponential Moving Average (EMA)
Recent observations receive more weight.
The weighting structure is fixed and never changes.
Weighted Moving Average (WMA)
Uses linearly decreasing weights.
Again, the weighting scheme is fixed.
The problem is that markets do not operate under fixed conditions.
Volatility changes.
Trend persistence changes.
Noise levels change.
Market structure changes.
Yet traditional moving averages continue using the exact same weighting model.
NLMS takes a different approach.
Instead of assigning permanent weights, it learns them dynamically.
The filter constantly asks
"What weighting structure would have predicted the current market best?"
It then updates itself accordingly.
The Core Idea Behind Adaptive Filters
Imagine trying to forecast today's price using the previous 20 bars.
A normal moving average assumes a fixed weighting pattern.
An adaptive filter attempts to learn the optimal weighting pattern.
At every bar:
• A prediction is generated.
• Actual price is observed.
• Prediction error is measured.
• Weights are adjusted.
The process repeats indefinitely.
Over time, the filter learns which historical observations are most useful and which are less important.
Understanding Filter Taps
One of the most important concepts in adaptive filtering is the idea of:
Taps
A tap is simply a historical observation used as an input.
If the indicator uses:
20 taps
it means:
Price
Price
Price
...
Price
are all being used to generate the prediction.
Each tap receives a learned weight.
Instead of:
Current Estimate =Average of past 20 bars
the filter becomes:
Current Estimate =
(w1 × Price ) +
(w2 × Price ) +
(w3 × Price )
...
(w20 × Price )
The weights are continuously adjusted through learning.
How Prediction Works
The indicator attempts to estimate current price using previous observations.
Mathematically:
Prediction = Σ(weight × historical price)
This prediction becomes the filter output.
If the prediction is accurate:
Weights change very little.
If the prediction is poor:
Weights adjust more aggressively.
This allows the model to gradually adapt to changing market conditions.
Prediction Error
The engine measures:
Error = Actual Price − Predicted Price
This error drives all learning.
Large error means:
The model is wrong.
Small error means:
The model is performing well.
The objective is to minimize prediction error over time.
The LMS Learning Rule
The original LMS update rule is:
New Weight =Old Weight + Learning Rate × Error × Input
This is effectively a form of gradient descent.
The filter moves its weights in the direction that reduces future prediction error.
This is conceptually identical to many machine learning optimization methods.
Why Normalization Matters
The original LMS algorithm has a weakness.
When input values become very large:
Weight updates can become unstable.
This is particularly problematic in financial markets where volatility constantly changes.
NLMS solves this problem by normalizing updates according to signal energy.
Instead of:
Weight Update ∝ Error
it becomes:
Weight Update ∝ Error / Signal Power
This creates adaptive scaling.
When volatility expands:
Updates automatically shrink.
When volatility contracts:
Updates automatically expand.
This improves stability significantly.
How the Indicator Uses NLMS
The script implements an online one-step predictor.
For every new bar:
1. Previous M bars are gathered.
2. Current price is predicted.
3. Prediction error is calculated.
4. Weight vector is updated.
5. New estimate becomes available.
This process occurs continuously as new data arrives.
Because no future data is used, the filter remains fully causal and suitable for live trading.
Weight Initialization
Initially all weights are equal:
1 / M
This effectively starts the model as a simple moving average.
Over time the filter learns a custom weighting structure based on market behavior.
The initial equal-weight state acts as a neutral prior.
Step Size (μ)
The learning rate controls how aggressively the filter adapts.
Lower values:
• More stable
• Smoother output
• Slower adaptation
Higher values:
• Faster adaptation
• More responsiveness
• Greater noise sensitivity
Think of μ as controlling the intelligence speed of the model.
Small values make it conservative.
Large values make it reactive.
Regularization (ε)
Regularization prevents division by very small values.
Without it:
Periods of extremely low signal power could create unstable updates.
Regularization improves numerical stability and robustness.
It acts as a safety mechanism for the learning process.
Output Smoothing
After the NLMS estimate is generated, an optional EMA can be applied.
This smoothing is not part of the NLMS algorithm itself.
It exists purely for visual clarity.
The raw adaptive filter already contains the learning logic.
The smoothing stage simply reduces small fluctuations.
Setting smoothing to 1 effectively disables it.
Trend Detection
Trend direction is derived from the slope of the adaptive filter.
Bullish:
NLMS Output > Previous Output
Bearish:
NLMS Output < Previous Output
This creates a directional state machine.
Unlike crossover systems, trend changes occur whenever the adaptive estimate changes slope.
Bullish Flips
A bullish signal occurs when:
Trend changes from bearish to bullish.
This means the adaptive filter has transitioned from declining to rising.
Bearish Flips
A bearish signal occurs when:
Trend changes from bullish to bearish.
This means the adaptive filter has transitioned from rising to falling.
Visual Components
The indicator includes several visualization layers.
Adaptive Filter Line
The main output of the NLMS model.
This represents the learned trend estimate.
Gradient Fill
The space between price and filter is colorized.
Price Above Filter:
Bullish shading.
Price Below Filter:
Bearish shading.
This provides immediate visual context regarding trend alignment.
Edge Glow
An ATR-based glow surrounds price.
This helps emphasize directional conditions while improving chart readability.
Trend Candles
Candles can optionally inherit trend coloration.
Green:
Adaptive trend rising.
Red:
Adaptive trend falling.
This allows traders to visualize the model's directional state directly on price.
How It Differs From Traditional Trend Filters
Most trend indicators answer:
"What is the average price?"
NLMS attempts to answer:
"What weighting structure best predicts current price?"
This distinction is extremely important.
The indicator is not simply smoothing price.
It is continuously learning how price behaves.
Traditional indicators use fixed mathematics.
NLMS uses adaptive mathematics.
Strengths
• Self-adjusting weighting structure.
• Adapts to changing market conditions.
• Based on established signal-processing theory.
• Stable due to normalization.
• Less reliant on arbitrary moving-average formulas.
• Learns continuously.
• Fully causal and non-lookahead.
Limitations
• Not a predictive model in the forecasting sense.
• Can still lag during major regime shifts.
• Excessively large learning rates may introduce noise.
• Small tap counts can become unstable.
• Large tap counts can become sluggish.
Like all adaptive systems, there is a tradeoff between responsiveness and stability.
Best Use Cases
The NLMS Adaptive Trend Filter is particularly effective for:
• Trend identification.
• Regime classification.
• Dynamic support/resistance visualization.
• Adaptive trend following.
• Noise reduction.
• Signal confirmation.
Summary
The NLMS Adaptive Trend Filter applies one of the most important adaptive algorithms in modern signal processing to financial markets. Rather than relying on fixed moving-average weights, it continuously learns from prediction error and updates its internal model in real time. Built upon the pioneering work of Widrow and Hoff, the indicator combines adaptive filtering, normalized gradient descent, and online learning principles into a practical trend-following tool that evolves alongside changing market conditions. The result is a trend model that is fundamentally different from traditional moving averages, not because it smooths price differently, but because it learns how to smooth price as new information arrives.
Indicator

Indicator

Volatility Gated Supertrend [BackQuant]Volatility Gated Supertrend
Overview
Volatility Gated Supertrend is a regime-aware trend-following indicator built around a modified Supertrend engine with an integrated volatility filter . Unlike a traditional Supertrend, which flips direction whenever price crosses its trailing bands, this version introduces a gating mechanism that can block trend reversals during low-volatility conditions .
The purpose of the indicator is simple:
Keep the responsiveness and structure of a Supertrend.
Reduce false flips during sideways or compressed conditions.
Allow trend transitions primarily when volatility is expanding enough to justify participation.
The result is a smoother and more selective trend engine designed to suppress whipsaws while still reacting to meaningful directional movement.
The full source structure for the indicator can be referenced here: :contentReference {index=0}
Core idea
Traditional Supertrend indicators work well during directional markets but struggle in compressed environments:
Price repeatedly crosses the trailing bands.
Trend direction flips too frequently.
False reversals appear during chop.
This indicator attempts to solve that problem by asking:
“Is there enough volatility expansion to justify accepting a new trend?”
Instead of blindly allowing every flip, the indicator measures:
Current volatility,
Baseline volatility,
Relative expansion or compression.
Only when volatility conditions are sufficient does the trend engine allow a directional transition.
What the Supertrend is
The Supertrend is a volatility-based trailing trend indicator built from:
ATR (Average True Range)
A central price source
A directional trailing stop structure
The classic logic:
Upper band = price source + ATR × multiplier
Lower band = price source − ATR × multiplier
These bands trail price dynamically:
In bullish conditions, the lower band ratchets upward.
In bearish conditions, the upper band ratchets downward.
When price crosses one of the bands:
The trend flips direction.
This creates a clean directional regime model.
How this version differs
The major difference is the volatility gate .
A normal Supertrend asks:
“Did price cross the band?”
This indicator asks:
“Did price cross the band, and is volatility strong enough to trust the move?”
That additional filter dramatically changes behavior in sideways conditions.
ATR and volatility structure
The indicator uses two ATR measurements:
Fast ATR → current short-term volatility
Slow ATR → baseline long-term volatility
The core ratio:
Volatility Ratio = Fast ATR / Slow ATR
Interpretation:
Ratio above threshold → volatility expansion
Ratio below threshold → volatility compression
This becomes the gate logic.
Volatility Gate Logic
The gate opens only when:
Fast ATR / Slow ATR ≥ Gate Threshold
If volatility is too compressed:
The gate closes.
Trend flips are blocked.
Importantly:
The Supertrend bands still calculate normally.
Price can still cross them.
But the directional state will not update while the gate is closed.
This distinction matters because it means:
The market may technically trigger a reversal,
But the indicator intentionally ignores it if volatility conditions are weak.
Why this helps
Most trend-following systems fail in chop because:
Small meaningless moves trigger directional flips.
There is insufficient range expansion.
The market lacks trend persistence.
By requiring volatility confirmation:
Weak reversals are filtered out.
Trend state becomes more stable.
Noise is reduced.
This makes the indicator particularly useful during:
Low-volatility consolidations,
Mean-reverting conditions,
Slow drifting ranges.
Band construction
The indicator uses:
hl2 as the central source,
ATR for dynamic width,
A configurable multiplier for sensitivity.
Formulas:
Upper Band = hl2 + ATR × multiplier
Lower Band = hl2 − ATR × multiplier
The trailing logic prevents the bands from moving backward unnecessarily:
Bullish lower band only rises.
Bearish upper band only falls.
This creates the staircase-style trailing structure common in Supertrend systems.
Trend state
Trend direction is binary:
1 = bullish
-1 = bearish
A raw bullish flip occurs when:
Close > trailing upper band
A raw bearish flip occurs when:
Close < trailing lower band
However:
The trend only updates if the volatility gate is open.
This is the defining behavior of the script.
Blocked flips
One of the most important features is the visualization of blocked signals .
When:
Price crosses a band,
But volatility is insufficient,
The script:
Plots an X-cross marker,
Keeps the existing trend state,
Refuses the flip.
This gives traders visibility into:
Potential but unconfirmed reversals,
Areas of weak participation,
Fake breakouts or low-energy transitions.
Visual behavior
Trend band
The active trailing band changes color based on trend direction:
Bullish → bullish color
Bearish → bearish color
Gate closed → gated color (dimmed)
Trend fill
The script fills the space between price and the active band:
Bullish fill during bullish regimes
Bearish fill during bearish regimes
This creates a cleaner directional overlay.
Outer glow
An additional glow layer expands slightly beyond the trend band:
Adds directional emphasis,
Improves trend readability,
Visually reinforces active regime.
When the gate closes:
The band and candles dim.
This visually communicates:
“The trend engine is currently suppressing flips.”
Candle coloring
Candles can optionally inherit the trend state:
Bullish regime → bullish candles
Bearish regime → bearish candles
Gate closed → dimmed neutral appearance
This allows the indicator to function as a full-chart regime overlay.
Signal logic
Bullish signal
Occurs when:
Trend flips from bearish to bullish,
AND the gate is open.
Bearish signal
Occurs when:
Trend flips from bullish to bearish,
AND the gate is open.
Blocked signal
Occurs when:
A raw flip condition appears,
BUT volatility ratio is below threshold.
This distinction is important:
A blocked signal is not ignored information.
It is a rejected transition.
How to interpret the gate
Gate open
Volatility is active.
Market expansion is sufficient.
Trend flips are allowed.
Gate closed
Market is compressed.
Conditions are likely choppy.
Trend reversals are suppressed.
This effectively turns the indicator into a:
Trend-following system during expansion,
Trend-holding system during compression.
Why ATR ratio works well
ATR ratio is a powerful regime detector because it measures:
Current volatility relative to normal volatility.
Not just:
“Is volatility high?”
But:
“Is volatility high relative to its recent baseline?”
This adaptive behavior allows the gate to work across:
Different assets,
Different timeframes,
Different volatility environments.
Input guide
ATR Multiplier
Controls band width:
Higher = wider bands, fewer flips
Lower = tighter bands, more sensitivity
ATR Length
Controls volatility calculation for the Supertrend itself.
Fast ATR
Short-term volatility measure.
Slow ATR
Long-term baseline volatility measure.
Gate Threshold
Controls how strict the gate is:
Lower threshold = more permissive
Higher threshold = more restrictive
Example:
0.6 → allows more flips
1.0 → requires current volatility to match baseline
1.2 → requires expansion regime
Strengths
Reduces Supertrend whipsaws in chop.
Adds regime awareness.
Uses adaptive volatility filtering.
Clean trend visualization.
Blocked-signal logic provides extra context.
Limitations
Can delay reversals during early expansion.
Very high thresholds may suppress legitimate transitions.
Still fundamentally a trend-following system.
Not designed for low-volatility mean reversion trading.
Best use case
Volatility Gated Supertrend works best as:
A directional regime filter,
A swing trend overlay,
A volatility-aware trend confirmation tool,
A way to suppress noise during consolidations.
It is particularly useful for traders who:
Like Supertrend logic,
But dislike how often it flips in sideways markets.
Summary
Volatility Gated Supertrend extends the classic Supertrend framework by introducing a volatility-aware gating engine that blocks trend reversals during compressed market conditions. By comparing fast ATR against slow ATR, the script determines whether enough volatility expansion exists to justify a directional transition. The result is a cleaner, more stable trend system that retains the strengths of Supertrend logic while dramatically reducing whipsaws during low-energy market regimes. Indicator

Volatility Hull Ribbon [BackQuant]Volatility Hull Ribbon
Overview
Volatility Hull Ribbon is a trend-following overlay built from a Hull-style moving average that replaces traditional volume weighting with volatility weighting . Instead of weighting price by traded volume, this indicator weights price by the absolute True Range of each bar, meaning bars with larger range expansion have more influence on the final trend estimate.
The goal is to create a smoother but responsive trend line that pays more attention to bars where the market actually moved with force. It then plots this volatility-weighted Hull structure as either a clean line or a ribbon-style band, with gradient fill, candle coloring, and long/short flip markers.
At a high level, the indicator does three things:
Builds a volatility-weighted moving average using True Range as the weighting source.
Applies Hull-style lag reduction to produce a faster trend-following curve.
Visualizes trend direction using slope, ribbon fill, candles, and flip signals.
Core idea
Most moving averages treat each bar equally or weight only by time. That means a quiet candle and a high-range expansion candle can have similar influence depending on the MA type.
Volatility Hull Ribbon takes a different approach:
Bars with larger True Range are treated as more important.
Bars with smaller True Range have less influence.
Recent bars are also weighted more heavily than older bars.
This creates a trend estimate that responds more strongly when the market expands, while remaining smoother during lower-energy movement.
What “volatility-weighted” means here
The custom weighting function uses:
Price source
Absolute True Range
A decreasing time weight
For each bar inside the lookback:
Weighted price contribution = source * abs(True Range ) * recency weight
Weight contribution = abs(True Range ) * recency weight
Then:
Volatility-weighted average = weighted price sum / weighted True Range sum
So price movement on wide-range bars matters more than price movement on quiet bars.
Why True Range is used
True Range captures more than just high-low movement. It accounts for gaps and previous close displacement. This makes it a broader volatility proxy than simple candle range.
Using True Range as the weight means the filter gives more importance to bars where:
Range expanded,
Price displaced aggressively,
Volatility increased,
Market participation likely intensified.
This is useful because strong trend moves often occur during volatility expansion, not during quiet drift.
Hull-style construction
The indicator then applies a Hull-style transformation to the volatility-weighted average.
The structure is:
VWHMA = VWMA_TR( 2 * VWMA_TR(src, len / 2) - VWMA_TR(src, len), sqrt(len) )
Where VWMA_TR means the custom True-Range-weighted moving average.
This follows the same logic as the classic Hull Moving Average:
Use a faster half-length average.
Use a slower full-length average.
Subtract the lagging component.
Smooth the result with sqrt(length).
The difference is that every smoothing step is volatility-weighted instead of standard weighted-average based.
Why this matters
A classic Hull Moving Average is already designed to reduce lag. This version modifies the internal weighting so the curve becomes more sensitive to volatility-backed price movement .
That means:
Large expansion bars can pull the filter faster.
Weak low-range chop has less effect.
Trend changes during strong movement can be reflected more clearly.
Trend detection
Trend direction is based on the slope of the VWHMA:
Bullish when VWHMA > VWHMA
Bearish when VWHMA < VWHMA
This is a simple but effective regime definition:
Rising volatility-weighted Hull = bullish trend pressure.
Falling volatility-weighted Hull = bearish trend pressure.
The script uses this slope state to color:
The main line,
The ribbon fill,
Optional candles,
Signal markers.
Ribbon mode
When “Plot as Band?” is enabled, the script creates a second line:
onebar_off = WMA(VWHMA , 10)
This is a delayed and smoothed version of the VWHMA. The area between the current VWHMA and this offset line becomes the ribbon.
Interpretation:
Ribbon expansion shows separation between current trend structure and its delayed reference.
Ribbon compression shows trend slowing or flattening.
A clean flip in the ribbon often coincides with trend transition.
The ribbon is not a volatility band. It is a trend displacement ribbon built from the difference between the current VWHMA and its delayed smoothed version.
Gradient fill logic
The fill is directional:
If VWHMA is above the offset line, fill intensity is stronger near the VWHMA and fades toward the offset.
If VWHMA is below the offset line, the gradient reverses.
This creates a cleaner visual than a flat fill because it emphasizes the active side of the ribbon.
In practice:
Strong bright ribbon = trend line leading the delayed reference.
Faded/narrow ribbon = weaker separation.
Ribbon reversal = trend pressure has shifted.
Signal logic
Signals are generated when the VWHMA slope changes direction:
Long signal: crossover(VWHMA, VWHMA )
Short signal: crossunder(VWHMA, VWHMA )
This means:
A long signal prints when the current VWHMA turns upward relative to the previous value.
A short signal prints when the current VWHMA turns downward.
These are slope-flip signals, not price crossover signals.
Important interpretation
A signal does not mean “buy blindly” or “sell blindly.” It means the volatility-weighted trend estimate has changed direction. The quality of the signal depends on:
Market structure,
Higher timeframe trend,
Volatility conditions,
Whether the ribbon is expanding or compressing.
Candle coloring
When enabled, candles are painted according to the VWHMA slope:
Bullish slope = long color.
Bearish slope = short color.
This makes the indicator easier to read as a regime overlay. You can quickly see when the market is consistently aligned with the volatility-weighted trend.
How to use it
1) Trend filter
Use the VWHMA color as a bias filter:
Only favor longs when the VWHMA is rising.
Only favor shorts when the VWHMA is falling.
2) Trend transition tool
Slope flips can identify early trend shifts:
Long marker = VWHMA has turned upward.
Short marker = VWHMA has turned downward.
Because the filter is Hull-style and volatility-weighted, it can react faster than slower trend filters while still suppressing some low-range noise.
3) Ribbon strength reading
The ribbon gives additional context:
Expanding ribbon = stronger separation and cleaner trend pressure.
Contracting ribbon = momentum weakening.
Ribbon flattening = chop or transition risk.
4) Pullback structure
In strong trends, price often respects the VWHMA or ribbon area:
Bull regime: pullbacks into the ribbon can act as support.
Bear regime: rallies into the ribbon can act as resistance.
5) Volatility-backed trend confirmation
Because large True Range bars influence the calculation more, this tool is useful for identifying whether trend changes are being supported by actual range expansion.
If price moves but the VWHMA does not respond strongly, the move may lack volatility-backed confirmation.
Input guide
Price Source
Defines the input series used for the calculation. Close is standard, but hl2, hlc3, or ohlc4 can be used for smoother structural behavior.
Lookback Period
Controls the smoothing length:
Lower values = faster response, more signals, more noise.
Higher values = smoother trend, fewer flips, more lag.
Plot as Band
Enables the ribbon view using the delayed smoothed VWHMA reference.
Line Width
Controls the main line thickness when not relying heavily on band mode.
Show Trend Candles
Paints candles by current trend state.
Show Signals
Toggles the long/short slope-flip markers.
Strengths
Uses volatility-weighted smoothing instead of equal weighting.
Combines volatility sensitivity with Hull-style lag reduction.
Clean ribbon visualization for trend displacement.
Simple slope-based regime interpretation.
Works well as a trend overlay or bias filter.
Limitations
Slope flips can still whipsaw in sideways markets.
Large wick bars can influence the filter strongly because True Range is used as weight.
It does not measure volume, despite using a VWMA-style internal function.
It is a trend tool, not a complete trading system.
Best use case
Volatility Hull Ribbon works best when used as a visual trend structure layer:
Use color for bias.
Use ribbon expansion/compression for strength.
Use slope flips for regime transitions.
Use price interaction with the ribbon for pullback context.
Summary
Volatility Hull Ribbon is a Hull-style trend overlay that replaces traditional weighting with True Range weighting, making the moving average more responsive to volatility-backed price movement. It builds a low-lag volatility-weighted Hull curve, compares it to a delayed smoothed reference to form a ribbon, and uses slope changes to define trend direction and signals. The result is a clean, responsive trend ribbon that highlights when volatility-backed trend pressure is rising, fading, or reversing. Indicator

Measured Move Projection Zones [AGPro Series]Measured Move Projection Zones
🔹 OVERVIEW
Measured Move Projection Zones is a premium price-action visualization tool built around one clear sequence: impulse, base, projection, and invalidation.
The script detects a qualified impulse leg, waits for a compact base range, then projects a measured-move target band from the base boundary. It also displays invalidation context, event labels, and a compact AGPro panel so the structure can be reviewed quickly on the chart.
The default profile is tuned for 1-hour charts, where measured-move structures need enough responsiveness to appear consistently while still avoiding low-quality micro-swings. The result is a clean projection map for traders who want structured continuation context without turning the chart into a dense extension grid.
This script is not designed to promise outcomes or mark every possible target. It is designed to make the measured-move workflow easier to see, compare, and audit.
🔹 WHAT MAKES IT DIFFERENT
Most projection tools start from a manual anchor, a generic extension grid, or a simple breakout distance. Measured Move Projection Zones is more selective.
It requires a directional impulse first. It then waits for a compact base. Only after the base qualifies does it create the projected target band and invalidation framework.
That sequence matters because it prevents the chart from becoming a collection of random forward boxes. The visual logic is always tied to a specific price-action chain:
Impulse leg -> base range -> projection band -> invalidation context.
The script also avoids the look of a traditional support/resistance map. The rectangles are not generic zones. They represent measured-move components: impulse body, base range, projected target band, and invalidation reference.
For public PulseWire presentation, the script is deliberately visual but controlled: moderated labels, visible structure boxes, no expired-label flood, and a compact panel that summarizes the current state.
🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS
This script stays in a narrow measured-move projection lane.
It does not overlap with ATR compression or volatility-map scripts because the core logic is not volatility contraction, expansion, or envelope behavior. ATR is only used for normalization, tolerance, and spacing.
It does not overlap with breakout-quality tools because it does not score a breakout event as the main product. Breakout beyond the base boundary only changes the measured-move state from armed to active.
It does not overlap with premium/discount or valuation-zone tools because it does not map equilibrium, discount, OTE, rebalance pockets, or fair value areas. Its target band is derived from an impulse leg and base boundary, not a valuation model.
It does not overlap with wedge, reversal, or pattern-scanner tools because it does not require converging rails, neckline behavior, double tops, double bottoms, head-and-shoulders logic, or multi-pattern classification.
It does not overlap with liquidity heatmap, bias dashboard, or volume-profile tools because it does not estimate liquidity fields, higher-timeframe directional bias, POC gravity, acceptance ladders, or volume shelves.
The differentiator is simple and specific: this is an impulse-base measured-move projection visualizer with target-band and invalidation context.
⚙️ METHODOLOGY
The methodology is built in stages:
1. Swing Confirmation
The script uses pivot confirmation to identify meaningful swing points. The default pivot setting is tuned for 1-hour chart rhythm.
2. Impulse Qualification
After a valid pivot sequence appears, the script measures the leg size in ATR units. The impulse must be large enough and must form within a reasonable bar window.
3. Base Validation
Once the impulse is confirmed, the script waits for a compact base range. The base must stay within a defined ATR height and avoid excessive retracement from the impulse end.
4. Projection Construction
When the base qualifies, the script projects a measured-move target band from the base boundary. The default multiplier is 1.00, representing a classic equal measured move.
5. Invalidation Context
The opposite side of the base receives an ATR-buffered invalidation guide. This does not create a trade command; it simply marks where the measured-move structure is no longer clean.
6. State Tracking
The setup moves through clear states: Waiting, Building Base, Armed, Projecting, Target Band, Invalidated, and Expired.
7. Visual Management
The script keeps a moderated amount of historical structure visible. Event labels are capped, expired labels are disabled by default, and the projection guide line is optional to keep the chart clean.
📊 PANEL
The AGPro panel is designed for quick structure review.
Panel rows include:
- State
- Direction
- Impulse Quality
- Projection Progress
- Target Distance
- Target Band
- Base Range
- Invalidation
The first panel row follows the AGPro public-release standard: one merged blue header row containing only the panel title.
Panel location is adjustable. Panel theme is adjustable. Panel font size is adjustable. The default size is Normal for a clean public-chart look.
🎛️ KEY INPUTS
1H Pivot Confirmation Length
Controls the swing confirmation used to anchor impulse legs. Lower values are more responsive. Higher values are more selective.
1H Minimum Impulse Size
Defines the minimum impulse strength in ATR units. The default is tuned to keep 1-hour charts active without accepting very small swings.
1H Base Range Bars
Controls how many bars are used to validate the post-impulse base. The default is shorter for hourly chart pacing.
1H Maximum Base Height
Limits how tall the base can be in ATR terms. This prevents wide ranges from being treated as clean measured-move bases.
1H Maximum Base Retracement
Controls how deeply price can retrace from the impulse end while still qualifying as a measured-move structure.
Measured Move Multiplier
Controls the projection distance. The default value of 1.00 represents an equal measured move.
1H Target Band Width
Controls the ATR-based visual tolerance around the projected target.
Invalidation Buffer
Places the invalidation guide beyond the opposite side of the base range.
1H Projection Bars
Controls how far the projected target band and base extension reach forward.
1H Projection Expiration
Controls how long an armed or active projection can remain open before it expires.
1H Event Label Retention
Controls whether the chart keeps a moderated history of event labels or only the latest event label.
1H Balanced Event Labels
Caps event labels so the chart remains informative but not overloaded.
Show Projection Guide Line
Optional dotted guide from the base boundary to the target band. Disabled by default on 1-hour charts to reduce diagonal clutter.
🔍 HOW TO READ IT
Waiting
No valid impulse-base sequence is active.
Building Base
An impulse has been detected and the script is watching for a compact base.
Armed
A valid base has formed. The projection framework is ready, and the target band is mapped forward.
Projecting
Price has moved beyond the base boundary and the measured-move structure is active.
Target Band
Price has interacted with the projected target band.
Invalidated
Price has closed beyond the invalidation guide, meaning the measured-move framework is no longer clean.
Expired
The projection did not complete within the selected expiration window.
Event labels provide a fast visual timeline. The boxes show where the measured structure came from, where the base formed, and where the projected band sits.
🧩 BEST USE CASES
This script is best used on 1-hour charts where traders want a clean view of impulse-base-continuation behavior.
Strong use cases include:
- Measuring continuation structures after a directional leg
- Comparing active projections against nearby price action
- Reviewing whether a base is compact enough to support a projection
- Mapping projected target zones without using a full extension grid
- Studying failed measured moves through invalidation labels and zones
- Creating cleaner screenshots for price-action review
The script can also be used on other timeframes, but the default settings were intentionally tuned around 1-hour structure density and visual balance.
🧠 VISUAL DESIGN PHILOSOPHY
The visual design is built around premium restraint.
The chart should not look empty, but it also should not look like every candle is receiving a signal. Measured Move Projection Zones keeps the main structural elements visible:
- Impulse boxes
- Base range boxes
- Projected target bands
- Invalidation zones or guides
- Moderated event labels
- Compact AGPro panel
Expired labels are disabled by default because they can quickly become noisy on hourly charts. Event labels are still preserved in a moderated amount so the chart has enough visual context.
The optional projection guide line is disabled by default because long diagonal lines can dominate a 1-hour screenshot. Users can enable it when they want a more explicit projection path.
The goal is a chart that looks structured, premium, and publication-ready while still being easy to read.
🔔 ALERTS
The script includes alert conditions for the core lifecycle events:
- Measured Move Armed
- Projection Active
- Target Band Interaction
- Projection Invalidated
- Projection Expired
These alerts are designed around structure states, not trade commands. They help users monitor when a measured-move framework forms, activates, interacts with the projected band, invalidates, or expires.
🔹 LIMITATIONS AND TRANSPARENCY
Measured Move Projection Zones is a structural visualization tool. It does not predict future price and does not claim that a projected target band will be reached.
Pivot-based swing logic confirms structure after the necessary bars have formed. This creates cleaner anchors, but it also means the script is not trying to label every move in real time before confirmation.
The target band is a measured projection derived from the impulse and base, not a certainty zone. Invalidation and expiration states are part of the design because failed measured moves are also useful information.
Settings matter. More aggressive inputs will create more structures. More conservative inputs will create fewer, cleaner structures.
✅ IDEAL USER
This script is ideal for traders who:
- Use 1-hour charts for price-action review
- Study impulse-base-continuation behavior
- Want measured-move target zones without a cluttered extension grid
- Prefer visual structure over heavy signal text
- Want a clean AGPro-style panel for quick state review
- Care about invalidation and failed projection context
- Need a public-chart-friendly tool that looks polished, focused, and easy to understand
Measured Move Projection Zones is built for users who want a disciplined projection framework on the chart: enough structure to be useful, enough restraint to stay premium. Indicator

1-2-3 Reversal Map [AGPro Series]1-2-3 Reversal Map
🔹 OVERVIEW
1-2-3 Reversal Map is a focused PulseWire overlay built for traders who want a clean, structured way to follow one of the most recognizable reversal formations in price action: the confirmed 1-2-3 reversal.
This tool maps the full life cycle of a 1-2-3 structure. It identifies the confirmed swing sequence, marks Point 1, Point 2, and Point 3, projects the neckline from Point 2, evaluates the neckline break, and highlights the retest pocket after confirmation. The goal is not to fill the chart with generic reversal signals. The goal is to make the actual 1-2-3 process easier to see, compare, and track.
The script is designed around visual clarity. The latest active structure stays readable through numbered swing labels, restrained guide lines, a clearly identified neckline, and a concept-specific retest pocket. The panel then summarizes the current stage, neckline status, retest status, and reversal score in a compact AG Pro layout.
🔹 WHAT MAKES IT DIFFERENT
Most reversal tools try to do too many things at once. They mix candle patterns, double tops, double bottoms, head and shoulders structures, failed breakouts, generic support and resistance zones, trend filters, and broad reversal markers into one crowded chart.
1-2-3 Reversal Map takes a more disciplined approach. It stays inside one lane: the confirmed 1-2-3 reversal sequence.
The script does not mark every possible turning point. It waits for a defined swing chain:
1. Point 1 establishes the original swing extreme.
2. Point 2 forms the neckline reference.
3. Point 3 confirms that price has created a structurally relevant retracement.
4. The neckline break turns the structure from a setup into a confirmed map.
5. The retest pocket shows where the broken neckline can be evaluated again.
This creates a cleaner workflow than broad reversal scanners. Instead of asking the chart to show everything, the script asks one focused question: has a valid 1-2-3 structure progressed from swing formation to neckline break and retest behavior?
🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS
This script was intentionally built to avoid overlapping with other AGPro public tools.
It is not a broad reversal pattern scanner. It does not combine double top, double bottom, head and shoulders, inverse head and shoulders, wedge, or candle-pattern logic. It focuses only on the 1-2-3 reversal sequence.
It is not a Turtle Soup or failed-breakout tool. It does not begin with a failed range break or liquidity sweep. Its starting point is a confirmed three-point swing structure.
It is not a wedge reversal tool. It does not evaluate converging trendlines, compression geometry, or wedge breakout behavior.
It is not a generic support and resistance map. The rectangle is not a general zone engine. It is a neckline retest pocket that appears only after a valid 1-2-3 neckline break.
It is not a breakout dashboard. Breakout logic exists only as one stage inside the 1-2-3 reversal process.
This makes the script narrow enough for a differentiated AGPro release while still being visually useful and searchable for traders who specifically look for 1-2-3 reversal structure, neckline break, and retest confirmation workflows.
⚙️ METHODOLOGY
The script uses confirmed pivot structure to define each 1-2-3 sequence.
For a bullish 1-2-3 structure:
- Point 1 is a confirmed swing low.
- Point 2 is the recovery swing high and neckline reference.
- Point 3 is a higher low that holds above Point 1.
- The neckline break requires price to close beyond Point 2 with a configurable ATR buffer.
- The retest pocket is projected around the broken neckline after confirmation.
For a bearish 1-2-3 structure:
- Point 1 is a confirmed swing high.
- Point 2 is the reaction swing low and neckline reference.
- Point 3 is a lower high that holds below Point 1.
- The neckline break requires price to close beyond Point 2 with a configurable ATR buffer.
- The retest pocket is projected around the broken neckline after confirmation.
The reversal score is structure-native. It evaluates:
- P1-P2 leg size relative to ATR
- Point 3 hold quality
- P3 retracement balance
- Timing symmetry between structure legs
- Break distance beyond the neckline
- Break candle body quality
- Close location inside the break candle
- Optional volume participation
The score is not designed as a prediction model. It is a ranking layer for comparing the quality of structures that meet the script's own rules.
📊 PANEL
The AG Pro panel is built to keep the structure status readable without forcing the user to interpret every chart object manually.
Panel rows:
- Stage: shows whether the structure is waiting, armed, broken, retested, expired, or invalidated.
- Neckline Break: shows whether the neckline has been confirmed.
- Retest: shows whether the retest pocket is inactive, being watched, or held.
- Reversal Score: shows the current 0-100 score and quality grade.
The panel uses the AGPro standard format:
- One merged blue header row
- Only the script name in the first row
- Adjustable panel location
- Adjustable panel theme
- Adjustable panel font size
🎛️ KEY INPUTS
Pivot Left Bars / Pivot Right Bars:
Controls how mature the swing points must be before the 1-2-3 structure can form. Higher values create fewer and cleaner structures. Lower values make the script more responsive.
Minimum P1-P2 Leg ATR:
Filters out small structures by requiring a minimum distance between Point 1 and Point 2.
Minimum Point 3 Hold ATR:
Defines how much Point 3 must hold relative to Point 1. This helps separate valid structural retracements from weak retests of the original extreme.
Minimum / Maximum P3 Retracement:
Controls the acceptable retracement range for Point 3. This prevents both shallow noise and near-failed structures from being accepted too easily.
Neckline Break Buffer ATR:
Adds a configurable buffer beyond the neckline before the break is accepted.
Retest Pocket Width ATR:
Controls the height of the retest pocket around the broken neckline.
Retest Pocket Projection Bars:
Controls how far the pocket is projected forward.
Show Context Tags:
Adds compact labels such as Neckline and Retest Pocket so the visual elements are easier to identify.
Show Recent Structure Traces:
Keeps a small rolling set of recent structure lines and pockets while keeping numbered swing labels focused on the latest active setup.
Label Font Size:
Controls all chart labels, including swing numbers, context tags, and optional event labels.
Panel Font Size:
Controls the AG Pro panel text size separately from chart labels.
🔍 HOW TO READ IT
Start with the numbered swing labels.
Point 1 marks the original structural extreme. Point 2 marks the neckline reference. Point 3 marks the retracement that must hold for the 1-2-3 structure to remain valid.
Next, watch the neckline.
The neckline is the main confirmation level. Before it breaks, the panel shows the structure as armed or waiting. After it breaks, the structure becomes a confirmed 1-2-3 map.
Then watch the retest pocket.
The retest pocket appears around the broken neckline after confirmation. This is the script's key context zone. It helps the user observe whether price can return to the neckline area and hold the structure instead of treating every move after the break as equally important.
Finally, use the panel score as a quality filter.
A high score means the structure has stronger internal balance according to the script's rules. A lower score means the 1-2-3 sequence may still exist, but its structure quality is weaker.
🧩 BEST USE CASES
This script is best suited for:
- Traders who use classic 1-2-3 reversal logic
- Swing traders who want confirmed pivot structure
- Price-action traders who track neckline breaks
- Traders who prefer breakout-retest workflows
- Users who want fewer, clearer chart objects instead of broad reversal scanners
- Multi-timeframe chart review where structure clarity matters
- Public chart sharing where visual cleanliness is important
It can be useful on crypto, forex, indices, equities, and commodities, especially on charts where swing structure and neckline behavior are visually meaningful.
🧠 VISUAL DESIGN PHILOSOPHY
The design goal is clarity through restraint.
The script avoids a crowded signal-board style. It uses numbered labels only for the current active swing structure. It separates the neckline from the retest pocket with distinct visual language. Recent traces are kept limited and softened so they provide context without dominating the chart.
The active neckline is drawn with a stronger accent color. The retest pocket is shown as a clean rectangle around the broken neckline. Structure legs are dotted and restrained, helping the user understand the geometry without overpowering price.
The chart should feel premium, readable, and publication-ready. The indicator is built to support a clean PulseWire screenshot rather than create visual noise.
🔔 ALERTS
The script includes alerts for the main 1-2-3 lifecycle events:
- 1-2-3 structure armed
- Bullish 1-2-3 neckline break
- Bearish 1-2-3 neckline break
- 1-2-3 retest pocket held
- 1-2-3 structure invalidated
These alerts are designed around structure progression, not generic reversal marking.
🔹 LIMITATIONS AND TRANSPARENCY
The script uses confirmed pivots, which means swing points appear only after the required right-side confirmation bars. This is intentional. It prioritizes confirmed structure over instant but unstable markings.
The script does not attempt to identify every possible reversal pattern. It does not evaluate macro trend, fundamentals, order flow, news, or external liquidity conditions.
The reversal score is a structured quality model, not a certainty model. It helps compare 1-2-3 structures inside this script's framework, but it does not forecast outcomes.
Retest pockets are contextual areas around the broken neckline. They are not universal support or resistance zones, and they are not designed to replace broader market analysis.
✅ IDEAL USER
This script is ideal for traders who:
- Understand classic 1-2-3 reversal structure
- Prefer confirmed market structure over early noise
- Want a clean neckline and retest workflow
- Value visual clarity and chart discipline
- Use PulseWire for structured price-action review
- Want a focused public-free AGPro tool that does one concept well
1-2-3 Reversal Map is built for users who want a focused reversal map, not a crowded reversal scanner.
🔹 RELEASE NOTES
- Initial public release of 1-2-3 Reversal Map .
- Added confirmed Point 1, Point 2, and Point 3 swing mapping.
- Added neckline projection with close-based break confirmation.
- Added breakout retest pocket around the broken neckline.
- Added context tags for Neckline and Retest Pocket.
- Added AG Pro panel with Stage, Neckline Break, Retest, and Reversal Score.
- Added adjustable panel location, panel theme, label size, and panel font size.
- Added recent structure traces with softened historical visuals.
- Added alerts for armed structures, neckline breaks, retest holds, and invalidations. Indicator

Cup and Handle Quality [AGPro Series]Cup and Handle Quality
🧩 OVERVIEW
Cup and Handle Quality is a visual pattern-quality overlay for one of the most recognized continuation structures in technical analysis: the cup and handle.
The script is designed to map the full pattern lifecycle instead of only marking a breakout candle. It studies the left cup rim, the cup base, the right rim recovery, the controlled handle pullback, the breakout behavior, and the measured projection context. The goal is to make cup and handle structures easier to recognize, compare, and explain directly on the chart.
The final visual output is intentionally clear. The detected cup and handle candle ranges are framed with subtle boxes, while thick curved outlines make the formation readable at a glance. The rim line, target line, DEPTH arrow, and MOVE arrow help users understand how the structure is measured, not just where the label appears.
✅ WHAT MAKES IT DIFFERENT
Most public cup and handle tools focus on one of two things: either they draw a simple breakout marker, or they scan aggressively and leave the chart crowded with low-context shapes. Cup and Handle Quality takes a narrower approach.
It combines three layers:
- Structure recognition: left rim, cup base, right rim, and handle low
- Quality scoring: cup symmetry, handle depth, and breakout quality
- Visual education: cup box, handle box, thick pattern outline, rim line, target line, and measurement arrows
This makes the script more than a pattern detector. It is also a visual explanation tool. The chart shows where the cup was detected, where the handle formed, how deep the cup is, and where the measured projection line comes from.
🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS
This script has its own lane inside the AGPro Series.
It is not a flag scanner, wedge detector, triangle breakout module, inside-bar breakout tool, Donchian breakout validator, double-top detector, head-and-shoulders detector, generic support-resistance map, or supply-demand zone script.
Its lane is specifically:
Cup rim recovery -> controlled handle depth -> breakout participation -> measured projection line.
The script focuses on the complete cup and handle lifecycle. It does not try to replace broader breakout engines, market-structure tools, support-resistance tools, liquidity tools, or trend dashboards. The defining feature is the combination of a recognizable cup-and-handle drawing with a quality panel that grades the actual pattern components.
⚙️ METHODOLOGY
The engine builds the pattern from pivot structure. A qualified setup begins with a left rim, moves into a cup low, recovers into a right rim, and then forms a handle pullback after the right rim.
The quality model evaluates:
1. Cup Symmetry
The script compares the two rim areas and measures how balanced the cup is over time. A cleaner return from the cup base into the right rim area produces a stronger symmetry reading.
2. Handle Depth
The handle is measured as a percentage of cup depth. A useful handle should create structure without pulling so deeply that the cup profile loses strength. The input range allows the user to control how strict or flexible the handle requirement should be.
3. Breakout Quality
Breakout quality is calculated from candle behavior and participation context. The script checks distance beyond the rim, candle body efficiency, close location, and relative volume against a configurable baseline.
4. Final Score
The final score combines the structure score and breakout behavior into a compact quality reading. Developing setups can be shown before breakout confirmation, while confirmed breakouts require the breakout quality gate.
📊 PANEL
The AGPro panel displays the main quality dimensions in a compact format:
- Cup Symmetry
- Handle Depth
- Breakout Quality
- Score
The first row follows the AGPro standard with a merged blue title row. Panel location, panel theme, panel font size, and label font size are adjustable from settings.
🎛️ KEY INPUTS
- Pivot Span controls structural sensitivity.
- Minimum Cup Bars defines the shortest accepted cup duration.
- Maximum Cup Bars defines the longest accepted cup duration.
- Maximum Rim Variance % controls how closely the left and right rims must align.
- Minimum Cup Depth ATR filters shallow structures.
- Minimum Handle Depth % filters handles that are too shallow.
- Maximum Handle Depth % filters handles that are too deep.
- Breakout Volume Baseline controls the relative volume comparison.
- Minimum Setup Score controls developing setup visibility.
- Minimum Breakout Quality controls confirmed breakout strictness.
- Minimum Pattern Score controls the final quality gate.
- Show Developing Setup controls pre-breakout visualization.
- Show Cup Path controls the curved cup drawing and cup candle box.
- Show Handle Box controls the detected handle range.
- Show Target Line controls the measured projection line.
- Show Measurement Arrows controls the DEPTH and MOVE explanation arrows.
- Pattern Stroke Width controls the thickness of the cup and handle outlines.
- Target Projection Bars controls how far the measured target line extends.
🔍 HOW TO READ IT
Start with the rim line. This is the reference level the structure must recover into and eventually move beyond.
Then read the cup. The subtle cup box marks the detected candle range, while the thick curved outline helps the formation read visually as a cup instead of a simple V-shaped swing.
Next read the handle. The handle box marks the controlled pullback area after the right rim. The curved handle outline makes the handle easier to recognize without turning it into a generic rectangle pattern.
The DEPTH arrow shows the measured cup depth. The MOVE arrow transfers that depth upward from the rim area. The TARGET line shows the forward measured projection level.
The panel summarizes the same structure numerically. Stronger Cup Symmetry, disciplined Handle Depth, and stronger Breakout Quality combine into the final Score.
🧩 BEST USE CASES
Cup and Handle Quality is best used on liquid symbols and timeframes where swing structure has enough room to develop. It is especially useful for users who want a clean visual map of a classic continuation pattern without filling the chart with unrelated pattern families.
The default settings are tuned for active discovery. Users who want fewer patterns can raise pivot sensitivity or score thresholds. Users who want a more reactive view can lower the score thresholds, while still using the chart visuals to review pattern quality.
🧠 VISUAL DESIGN PHILOSOPHY
The design philosophy is simple: make the pattern understandable without making the chart noisy.
The cup and handle are drawn with thick curved lines because this pattern is visual by nature. Newer users should be able to see the shape immediately. At the same time, the candle boxes keep the drawing grounded in the actual detected structure.
The target is shown as a line rather than a large zone, keeping the projection clean. The DEPTH and MOVE arrows explain the measurement logic without turning the indicator into a crowded education panel. Labels are compact, and the panel is restrained so the chart remains the main focus.
🔔 ALERTS
The script includes an alert condition for confirmed cup and handle breakouts.
Alert name:
Cup and Handle Quality Breakout
Alert message:
Cup and Handle Quality : high-quality cup and handle breakout confirmed on {{ticker}} at {{close}}.
Alerts are tied to confirmed breakout logic, which means the structure, breakout quality, and pattern score must pass the configured gates.
🔹 LIMITATIONS AND TRANSPARENCY
Cup and handle structures are pattern-based and depend on pivot interpretation. Different sensitivity settings can produce different structures on the same chart.
Very noisy markets, illiquid symbols, extreme gaps, and unusually compressed price action can reduce pattern readability. Lower thresholds may produce more setups, but visual review remains important when using any chart-pattern tool.
The thick cup and handle lines are designed as visual guides. The subtle candle boxes identify the detected structure ranges, while the curved outlines make the pattern easier to understand on the chart.
✅ IDEAL USER
This script is built for traders and analysts who want a clean, visual, and structured way to study cup and handle formations.
It is especially useful for:
- Users who want classic chart patterns with a modern quality layer
- Price-action traders who care about structure, handle depth, and breakout behavior
- Chart reviewers who want a clear visual explanation of the setup
- Newer users who benefit from seeing the cup, handle, depth, move, and target drawn directly on the chart
- AGPro users who want a focused cup-and-handle tool that does not overlap with broader breakout or market-structure scripts Indicator

Darvas Box Breakout Quality [AGPro Series]Darvas Box Breakout Quality
🔹 OVERVIEW
Darvas Box Breakout Quality is built for one of the most recognizable and widely searched chart-pattern structures in technical analysis: the Darvas Box.
The script focuses on the full Darvas lifecycle:
Box formation → compression quality → breakout direction → volume support → failed-break behavior.
Instead of treating every horizontal range as support and resistance, this script waits for a Darvas-style structure to form, validates the box by age and volatility-adjusted height, then evaluates how price resolves from that box. The result is a clean chart-pattern workflow designed for traders who want to study rectangular compression and breakout quality without turning the chart into a crowded zone map.
The main visual element is the active Darvas box itself. By default, resolved boxes are removed after breakout so the chart stays focused on the current live structure instead of filling with old rectangles.
🔹 WHAT MAKES IT DIFFERENT
Most box or breakout tools stop at drawing a rectangle or marking the first break beyond a level. Darvas Box Breakout Quality adds structure, scoring, and failure awareness.
Core differentiators:
• Darvas-first structure logic
The rectangle is not a generic support/resistance zone. It comes from a Darvas box formation process built around a fresh seed high, containment, age, and volatility-adjusted box height.
• Compression quality
The script measures whether the box has enough maturity and controlled range behavior before treating it as a meaningful active structure.
• Breakout quality score
Every qualified breakout is evaluated with a 0-100 model that includes compression quality, relative volume, breakout distance, candle body participation, and directional close location.
• Volume confirmation
Breakout labels can require volume support, helping separate stronger participation events from weaker boundary pokes.
• Failed-break tracking
After breakout, the script watches whether price returns back inside the former box within the selected failure window. If it does, the event is marked as a failed break.
• Premium visual restraint
The default chart view uses one active box, compact labels, controlled label spacing, and a compact AGPro panel. The goal is to make the chart informative without making it noisy.
🧭 WHY THIS DOES NOT OVERLAP WITH OTHER AGPRO TOOLS
This script is intentionally separated from the existing AGPro breakout and chart-pattern family.
It is not Inside Bar Breakout Quality, because it does not require a mother bar or inside-bar compression sequence.
It is not Donchian Breakout Quality, because it is not based on rolling channel highs and lows.
It is not Opening Range Breakout logic, because it is not tied to a session-defined range.
It is not Triangle Breakout Quality, because it does not use converging pivot boundaries, apex pressure, or diagonal structure.
It is not Breakout Volume Quality, because volume is only one part of the confirmation model, not the entire concept.
It is not a supply/demand, order-block, or generic support/resistance zone script. The rectangle exists only when the Darvas box formation process supports it.
That distinction matters visually and analytically. On the chart, this script tells a Darvas story: rectangular compression, active box behavior, quality of release, and failed-break review.
⚙️ METHODOLOGY
1. Darvas seed detection
The script looks for a fresh high over the selected lookback period. This high becomes the initial reference for a potential Darvas box.
2. Box formation
After the seed appears, price must spend enough time contained beneath the upper boundary while the lower boundary develops. The box remains in formation until it meets the selected age and height requirements.
3. Volatility normalization
The box height is measured relative to ATR. This helps filter boxes that are too flat to matter or too wide to represent clean compression.
4. Active box state
When the box qualifies, the script displays the active Darvas box and optional midpoint. The box projects forward so the active breakout boundary remains visible while price approaches it.
5. Breakout confirmation
A bullish breakout requires price to resolve above the Darvas top. A bearish breakout requires price to resolve below the Darvas bottom. Users can require close-based confirmation for stricter filtering.
6. Quality score
The breakout score combines:
• Compression quality
• Relative volume support
• ATR-normalized breakout distance
• Candle body participation
• Directional close location
7. Failed-break monitoring
After breakout, the script watches a defined number of bars. If price returns back inside the former Darvas boundary, the failed-break marker is printed.
📊 PANEL
The AGPro panel summarizes the current Darvas environment:
• Box Age
• Compression
• Breakout Side
• Volume Support
• Latest Quality / State
The first panel row follows the AGPro publication standard: one merged blue header row containing only the panel title. Panel location, panel theme, and panel font size are adjustable from settings.
🎛️ KEY INPUTS
Darvas Box Detection
• New High Lookback
• Minimum Box Age
• Maximum Box Age
• ATR Length
• Minimum Box Height ATR
• Maximum Box Height ATR
• Require Close Beyond Box
Breakout Quality
• Volume MA Length
• Volume Support Threshold
• Require Volume Support
• Target Break Distance ATR
• Minimum Breakout Score
• Failed Break Window
Visual Controls
• Show Active Darvas Box
• Show Box Midline
• Show Breakout Labels
• Show Failed Break Markers
• Keep Resolved Box
• Box Projection Bars
• Label Cooldown Bars
• Maximum Visible Labels
• Label Offset ATR
• Label Stack Offset ATR
• Label Font Size
Panel
• Panel Location
• Panel Theme
• Panel Font Size
🔍 HOW TO READ IT
When a Darvas box becomes active, the chart displays the live rectangular structure. The panel shows how old the box is, how compressed it is, and whether the latest environment has breakout direction or volume support.
When price resolves outside the box with enough quality, the chart prints a compact breakout label such as UP 79 or DN 75. The number represents the breakout quality score.
When price fails to hold outside the box and returns back inside during the selected failure window, the script prints a compact failed-break marker such as FAIL UP or FAIL DN.
The best readings come when the box is visually clear, compression is meaningful, and the breakout candle has both directional close quality and volume support.
🧩 BEST USE CASES
• Classic Darvas box formations
• Rectangular range compression
• Box breakout quality review
• Volume-backed breakout confirmation
• Failed-break review after a box release
• Clean chart-pattern study
• Multi-timeframe Darvas structure observation
• Screenshot-friendly public chart analysis
🧠 VISUAL DESIGN PHILOSOPHY
Darvas Box Breakout Quality is designed to look premium through restraint.
The script avoids filling the chart with old boxes by default. It keeps the active Darvas box as the main visual layer, uses short event labels, adds cooldown and stack spacing to reduce overlap, and keeps the panel compact.
This makes the indicator easier to publish, easier to read, and easier to use across different symbols and timeframes.
🔔 ALERTS
The script includes alert conditions for:
• High-quality bullish Darvas breakout
• High-quality bearish Darvas breakout
• Failed bullish Darvas breakout
• Failed bearish Darvas breakout
These alerts follow the same structure-aware logic used by the chart labels.
🔹 LIMITATIONS AND TRANSPARENCY
Darvas box detection is structure-based and depends on the selected lookback, age, and ATR filters. Changing those settings can make the script more selective or more active.
Volume support depends on the quality of the symbol's volume feed. On instruments where volume is less informative, users may prefer to adjust the volume threshold or disable the volume requirement.
The score is a structured description of breakout quality according to the script's internal model. It is designed to help compare Darvas box releases by quality, not to replace the user's broader market context.
✅ IDEAL USER
This script is designed for traders who want a focused Darvas box tool with cleaner structure detection, breakout quality scoring, volume confirmation, failed-break awareness, and a premium chart layout.
It is best suited for users who want the Darvas box itself to remain the main story on the chart. Indicator

Heikin Ashi Trend Zones [AGPro Series]Heikin Ashi Trend Zones
Heikin Ashi Trend Zones is a clean overlay built for traders who like the smoothing behavior of Heikin Ashi but still want to keep the original market candles visible. Instead of repainting the chart with synthetic candles, the script reads the internal Heikin Ashi state in the background and converts it into a focused trend-state layer.
The engine follows four core ideas:
1. Internal HA Side
The script calculates the active Heikin Ashi side from synthetic HA open and close values, then filters weak neutral bodies so the state does not flip on every small candle.
2. HA Streak Quality
The panel tracks how long the current HA side has been active. This helps separate early state changes from mature continuation phases.
3. Optional Transition Zones
When the HA side changes with enough body strength, wick cleanliness, close location, ATR pressure, and prior-state maturity, the script can project a compact rectangular transition zone. This layer is disabled by default so the public chart view stays clean, but it remains available for traders who want to inspect HA changeover corridors.
4. Continuation Quality
Once a HA streak matures, the script scores continuation quality using body strength, wick cleanliness, close location, smoothed HA slope, streak depth, and ATR context. Labels appear only when the continuation score is strong enough and the cooldown rules allow a clean chart presentation.
What makes this script different
- It does not replace real candles with Heikin Ashi candles.
- It does not behave like a generic trend-following dashboard.
- It focuses on HA state transitions, HA streak maturity, and continuation quality.
- Optional transition boxes are concept-native HA corridors, not broad horizontal support/resistance zones.
- Label density is capped with cooldown and maximum visible label controls.
- The panel exposes HA side, streak, transition quality, continuation quality, and ATR context in a compact AGPro layout.
Visual design
The overlay stays restrained:
- A slim trend-state ribbon follows the smoothed HA path.
- Optional transition zones can extend forward as compact rectangles when enabled.
- Continuation labels are offset from candles with ATR spacing.
- Panel location, panel theme, panel font size, and label font size are adjustable.
Suggested usage
Use the script to study whether Heikin Ashi structure is shifting, stabilizing, or continuing while the original candles remain visible. The strongest reads usually come from alignment between a clean HA side, a growing streak, strong continuation quality, and an ATR context that supports the current state.
Default settings are tuned for a balanced public chart view with a clean ribbon and selective continuation labels. Faster traders can reduce smoothing and cooldown values. Swing traders can enable transition zones, increase transition projection, and require higher continuation quality for fewer labels. Indicator

Flag Continuation Zones [AGPro Series]🔷 Flag Continuation Zones
Flag Continuation Zones is a premium bull flag and bear flag continuation engine designed to identify clean continuation structures without turning the chart into a generic breakout scanner.
The script focuses on a classic, highly recognizable price-action sequence:
impulse pole → controlled flag compression → qualified breakout → forward continuation zone
Instead of marking every small consolidation as a flag, the engine validates the structure through pole strength, travel efficiency, flag depth, channel compression, trend alignment, breakout distance, and optional volume participation.
🔷 What Makes This Different
Most flag indicators are visually simple but structurally loose. They often label shallow pauses, random pullbacks, or broad ranges as flags.
Flag Continuation Zones takes a stricter route.
It first requires a validated impulse pole. The move must be large enough relative to ATR and efficient enough to show directional commitment. After that, the script waits for a controlled counter-trend flag window. The flag must remain compact, avoid excessive retracement, and preserve continuation structure before any breakout is accepted.
This creates a chart experience that is more selective, cleaner, and easier to trust visually.
🔷 How The Engine Works
The script evaluates four core stages:
1. Pole Validation
The prior impulse is measured by ATR multiple and path efficiency. This helps separate real directional movement from noisy grinding price action.
2. Flag Compression
After the pole, the script studies the consolidation window. A valid flag must remain inside an acceptable depth and range relative to the pole.
3. Breakout Confirmation
A continuation event is accepted only when price clears the flag boundary with an ATR buffer and, when available, enough volume participation.
4. Continuation Mapping
Accepted structures create a forward rectangular zone, an impulse pole line, a breakout label, and an optional measured-move projection line.
🔷 Visual Design
The visual language is intentionally restrained:
- clean bull and bear flag labels
- rectangular continuation zones
- impulse pole reference lines
- optional measured-move target line
- trend EMA context
- compact AG Pro status panel
- adjustable panel location
- dark and light panel themes
- adjustable label and panel font sizes
The goal is to make the pattern visible and premium without crowding the chart.
🔷 How This Is Different From Other AGPro Tools
This script is not a generic Trend Continuation Quality tool. It is not an abstract continuation scorecard.
It is specifically built around the flag pattern family:
- impulse pole quality
- flag channel compression
- breakout through the flag boundary
- measured-move continuation context
It also avoids overlapping with triangle, consolidation breakout, Donchian breakout, inside-bar breakout, and trendline tools by staying focused on the pole-and-flag structure itself.
🔷 Best Fit
This script is useful for traders who want to scan for cleaner bull flag and bear flag continuation patterns across crypto, forex, stocks, indices, and futures.
It is especially suitable for:
- continuation traders
- breakout traders who want stricter structure
- price-action traders who follow classic chart patterns
- users who prefer rectangular zones and measured-move context
- traders who want fewer but higher-quality labels
🔷 Key Inputs
Important controls include:
- Pole Lookback
- Flag Window
- Minimum Flag Bars
- Minimum Pole ATR Multiple
- Minimum Pole Efficiency
- Maximum Flag Depth
- Maximum Flag Range
- Breakout Buffer
- Volume Confirmation
- Signal Cooldown
- Zone Forward Bars
- Label Font Size
- Panel Location
- Panel Theme
- Panel Font Size
🔷 In One Sentence
Flag Continuation Zones turns the classic bull flag and bear flag pattern into a cleaner, scored, zone-based continuation map built for premium public chart presentation.
Indicator

Wedge Reversal Detector [AGPro Series]Wedge Reversal Detector
🔷 Overview
Wedge Reversal Detector is a focused chart-pattern engine built for one specific structure: the rising wedge and falling wedge. Instead of scanning every possible reversal pattern, drawing broad support and resistance, or behaving like a generic breakout dashboard, this script studies the geometry of a wedge itself: confirmed pivot boundaries, slope convergence, pattern maturity, reversal break quality, projected reaction zone, and invalidation context.
The goal is to make wedge analysis cleaner and more objective on a live chart. A valid wedge is not treated as just two random trendlines. The script requires a confirmed pivot structure, a meaningful initial width, a narrowing final width, and the correct slope relationship for either a rising wedge or a falling wedge. Once a qualified structure is active, it draws the converging boundaries directly on the chart and waits for a reversal-side break.
The detector also includes two visual preparation layers. The developing-wedge preview layer can draw dashed boundaries before the structure is fully armed. The Wedge Radar layer keeps the latest compression window visible when no confirmed candidate is active. Radar projection is capped so higher-timeframe charts stay clean, and low-compression radar states can remain boundary-only until the structure becomes visually meaningful. Break labels, reaction zones, and invalidation guides remain reserved for stricter confirmed candidates. This keeps the chart visually informative without weakening the actual confirmation logic.
The visual layer includes compact boundary tags that label the upper and lower rails directly on the right side of the structure. These tags are designed as chart annotations, not signal spam: they identify whether the rail is acting as a rejection rail, compression rail, reclaim rail, break rail, or invalidation rail. A single optional compression tag can also summarize the current radar or wedge state.
🔶 Why This Is Different
Many wedge indicators stop at pattern drawing. Others become broad pattern scanners that mix wedges with channels, double tops, double bottoms, triangles, support and resistance zones, and unrelated reversal signals. Wedge Reversal Detector intentionally stays narrower.
Its edge is the sequence:
1. Detect a qualified rising or falling wedge from confirmed pivots.
2. Measure whether the boundaries are genuinely converging.
3. Grade wedge maturity before any break occurs.
4. Confirm the reversal-side break with an optional close-based rule and ATR buffer.
5. Score break quality using maturity, boundary expansion, candle structure, close location, and volume participation.
6. Project a concept-native reaction zone from the wedge width.
7. Display a clean invalidation guide so the structure remains readable after the break.
This makes the script a wedge lifecycle tool, not a general reversal scanner.
💎 Unique Edge
The most important difference is that the script treats a wedge as a living geometric compression structure. It does not simply connect the latest two highs and lows and call the pattern complete. A candidate must pass span, width, convergence, and slope requirements before it becomes active.
For rising wedges, the script looks for rising pivot highs and rising pivot lows where the lower boundary is climbing faster than the upper boundary. This creates upward compression, which is the core geometry behind a rising wedge. For falling wedges, it looks for falling pivot highs and falling pivot lows where the upper boundary is falling faster than the lower boundary. This creates downward compression, which is the core geometry behind a falling wedge.
That difference matters because many weak wedge tools confuse ordinary channels with wedge compression. This script separates those structures by requiring the final width to be materially smaller than the starting width.
🔹 Methodology
The engine begins with confirmed pivot highs and pivot lows. The user controls the pivot confirmation length, which allows the detector to be tuned for intraday, swing, or higher-timeframe charts.
From the latest confirmed swing pair, the script builds two boundary lines:
- Upper boundary from confirmed pivot highs
- Lower boundary from confirmed pivot lows
The detector then evaluates:
- Pattern span in bars
- Initial boundary width measured against ATR
- Final boundary width relative to the starting width
- Upper boundary slope
- Lower boundary slope
- Correct rising-wedge or falling-wedge geometry
Only when those requirements align does the pattern become an active wedge.
🔸 Break Quality Model
A wedge break is scored only after the reversal-side boundary is broken. The break quality score is built from multiple factors:
- Wedge maturity
- Distance beyond the broken boundary
- Candle body participation
- Close location inside the break candle
- Volume ratio versus recent average volume
The score is translated into a simple grade so the chart stays easy to read. This does not claim that a break must continue. It gives the user a structured read of how strong the confirmed break appears under the script's own rules.
🎯 Projected Reaction Zone
After a confirmed wedge reversal break, the script projects a reaction zone using the initial wedge width. This zone is not a generic support/resistance box. It is tied directly to the wedge geometry and appears only after the structure confirms. The goal is to show the next area where price may naturally react after escaping the compression.
The zone width and projection length are configurable, so users can keep the chart compact or allow more forward context depending on timeframe and style.
🧭 Invalidation Context
The script also draws an invalidation guide after a confirmed break. For a bullish falling-wedge break, invalidation is tracked below the opposite wedge boundary with an ATR buffer. For a bearish rising-wedge break, invalidation is tracked above the opposite wedge boundary with an ATR buffer.
This keeps the post-break structure organized without adding trade instructions or turning the script into a strategy.
📊 Panel
The compact AGPro panel summarizes the current wedge lifecycle:
- Wedge Type
- Maturity
- Break Quality
- Target Zone
Panel location, panel theme, and panel font size are adjustable from settings. The first panel row uses the AGPro standard: one merged blue header row containing only the panel title.
⚙️ Key Settings
- Pivot Confirmation Length controls how strict the swing structure is.
- Minimum Wedge Span filters out tiny patterns.
- Maximum Final Width Ratio controls how much convergence is required.
- Developing Wedge Preview Ratio controls how early dashed formation boundaries can appear.
- Wedge Radar controls the latest-window visual radar that prevents panel-only charts while waiting for confirmed wedge geometry.
- Radar Projection Bars limits how far radar boundaries extend into future bars.
- Radar Fill Threshold keeps low-compression radar structures from creating oversized filled areas.
- Boundary Tags add compact right-side rail annotations so the structure is easier to read without covering candles.
- Compression Tag shows one status label for radar compression or armed-wedge maturity.
- Boundary Break Buffer ATR adds confirmation distance beyond the wedge boundary.
- Volume Confirmation Ratio contributes to break quality scoring.
- Projection Length Bars controls how long the reaction zone extends forward.
- Label Font Size and Label Offset ATR help maintain a clean chart presentation.
🧩 How It Differs From Other AGPro Tools
This script is intentionally separate from AGPro channel, breakout, liquidity, and broad reversal tools.
It is not a channel map. Channel tools organize parallel or multi-family structure. Wedge Reversal Detector only studies converging wedge geometry.
It is not a double top or double bottom detector. Those patterns are based on repeated horizontal rejection and neckline behavior. This script is based on converging diagonal boundaries.
It is not a broad reversal scanner. It does not combine every reversal pattern into one dashboard. It stays focused on wedge compression, wedge maturity, reversal break, projected reaction zone, and invalidation.
It is not a generic breakout quality tool. Break quality is evaluated only after a valid rising or falling wedge exists.
🔔 Alerts
The script includes alerts for:
- Bullish falling wedge break
- Bearish rising wedge break
- High quality wedge break
- Wedge invalidation
These alerts are event notifications for the detected structure, not automated trading instructions.
✨ Best Use Case
Wedge Reversal Detector is best suited for traders who already watch chart patterns, market structure, compression, and failed trend continuation. It helps reduce manual drawing by highlighting qualified wedge structures, then keeping the chart organized through the confirmation, projection, and invalidation phases.
The result is a clean, premium, wedge-specific workflow designed for public chart reading: fewer random lines, fewer noisy labels, and a clearer view of whether the wedge structure is still forming, breaking, projecting, or invalidating.
Indicator
