Volatility Regime Trend Ribbon [Pineify]Volatility Regime Trend Ribbon
Overview
This overlay adapts smoothing as markets change. It ranks ATR, selects a regime, and adjusts trend speed and ribbon width.
Key Features
Three ATR percentile regimes.
Regime-specific trend lengths and band scales.
Optional colors, confirmed markers, and alerts.
How It Works
ATR is ranked over a rolling window. Low ranks select low volatility, high ranks select high volatility, and middle ranks select normal volatility. Warm-up uses the normal state.
The selected length drives a recursive EMA-style center. Ribbon edges equal the center plus or minus ATR times the base multiplier and regime scale. This is a price boundary, not a statistical confidence interval. Direction turns bullish after a confirmed close above the upper edge, bearish below the lower edge, and otherwise retains its prior state.
Trading Ideas and Insights
Colors separate quiet, ordinary, and elevated ranges. A band exit can frame a direction change; movement inside stays unresolved. Gaps or thin trading can add lag and false transitions. No output is an automatic trade.
How Multiple Indicators Work Together
ATR measures range, percentile rank adds context, adaptive smoothing changes speed, and the band supplies the direction threshold. They form one engine without external data.
Unique Aspects
The original design links volatility to smoothing speed and band scale, not just color. Retained direction inside the band adds hysteresis; alerts distinguish regime and direction changes.
How to Use
Apply it to a liquid market and let the percentile window warm up.
Tune lengths and band scales for the symbol and timeframe.
Read center color as direction and ribbon color as regime.
Use confirmed alerts with independent risk controls.
Customization
ATR Length controls range sensitivity; Percentile Lookback controls context. Thresholds define states, lengths set speed, and band inputs set transition distance. Display layers are optional. Current values can change intrabar; markers and alerts require a confirmed close.
Conclusion
This ribbon organizes volatility regime and ATR percentile context for 15-minute to daily charts. It uses past and present data, remains lagging and parameter-sensitive, and makes no performance claim.
Indicator

Butterworth Spectral Trend [QuantAlgo]🟢 Overview
The Butterworth Spectral Trend is a trend-following indicator built on a 2-pole Butterworth SuperSmoother rather than fixed moving averages or crossover logic. It extracts a low-noise spectral trend path from price, optionally stretches or compresses that path’s cutoff from residual signal-to-noise conditions, then converts filter slope into direction with hysteresis and hold controls so traders can separate genuine trend turns from short-lived noise across every timeframe and market.
🟢 How It Works
The foundation of the indicator is a classic 2-pole Butterworth SuperSmoother. Coefficients are derived from the live cutoff period and a damping factor (√2 by default for the maximally flat Butterworth response), then applied recursively to the selected price source, with an optional Nyquist average of the current and prior sample to suppress 2-bar oscillation:
butterworth_coefficients(float period, float damping) =>
float safe_period = math.max(period, 2.0)
float argument = damping * math.pi / safe_period
float alpha = math.exp(-argument)
float c2 = 2.0 * alpha * math.cos(argument)
float c3 = -alpha * alpha
float c1 = 1.0 - c2 - c3
A provisional filter always runs at the base cutoff. Residual energy (price minus provisional filter) and provisional slope energy are tracked with EMA-style RMS estimates. Their ratio maps market conditions into a noise weight that lengthens the cutoff when residuals dominate and shortens it when directional slope energy is cleaner:
float residual = price_source - provisional_filter
float signal_to_noise = residual_rms > 0 ? slope_rms / residual_rms : 10.0
float noise_weight = 1.0 / (1.0 + math.min(math.max(signal_to_noise, 0.05), 10.0))
float target_cutoff = min_cutoff + (max_cutoff - min_cutoff) * noise_weight
float desired_cutoff = adaptive_cutoff ? base_cutoff * (1.0 - adapt_strength) + target_cutoff * adapt_strength : float(base_cutoff)
The live cutoff is blended toward that target with a smoothing factor so period changes do not jump bar to bar. The final spectral filter is then computed from those adaptive coefficients. When adaptivity is disabled, the filter always uses the fixed base cutoff period.
Direction is read from the spectral filter’s slope, not from price-versus-line crossovers. Optional hysteresis requires opposite slope to exceed a multiple of its typical recent magnitude before a flip is allowed, and a minimum hold bar count enforces a cooldown after each flip:
float filter_slope = spectral_filter - nz(spectral_filter , spectral_filter)
float deadband = hysteresis * typical_slope
bool opposite_move = slope_direction != 0 and slope_direction != trend_direction
bool clears_deadband = abs_filter_slope > deadband or hysteresis == 0.0
bool hold_complete = bars_since_flip >= min_hold_bars
if opposite_move and clears_deadband and hold_complete
trend_direction := slope_direction
bars_since_flip := 0
This design means the trend path is spectral (period-based smoothing), while state flips are slope-gated. Clean directional conditions can tighten the cutoff for faster response; noisy conditions can lengthen it for more stability. Hysteresis and hold bars further reduce clustered flips without changing the underlying filter math.
Direction state is tracked through an integer trend direction, with signal conditions derived from comparing the current and prior bar states:
turned_bullish = trend_direction == 1 and trend_direction != 1
turned_bearish = trend_direction == -1 and trend_direction != -1
trend_changed = turned_bullish or turned_bearish
🟢 Signal Interpretation
▶ Bullish Trend (Green/Bullish palette): When spectral filter slope turns positive and clears any active hysteresis and hold constraints, the indicator enters bullish mode with bullish colouring applied across the SuperSmoother line, optional spectral bodies, gradient fill, and BUY label. This state persists until slope reverses with enough strength (and after enough bars) to satisfy the signal filters, allowing shallow noise wiggles in the filter to occur without flipping direction.
▶ Bearish Trend (Red/Bearish palette): When spectral filter slope turns negative under the same constraints, the indicator enters bearish mode with bearish colouring across all visual elements. A confirmed opposite slope move is required to exit this state and print a SELL signal.
🟢 Features
▶ Preconfigured Presets: Three parameter sets cover different trading approaches. "Default" targets swing trading on 1-hour to daily charts with a balanced base cutoff, moderate residual adaptivity, and lookback. "Fast Response" shortens the cutoff and strengthens adaptivity for intraday charts from 5-minute to 1-hour, where earlier turns matter more than flip sparsity. "Smooth Trend" lengthens the cutoff, softens adaptivity, and adds light hysteresis plus a short hold for position trading on daily and weekly timeframes, where false flips are more costly than delayed ones. Selecting a preset overrides the corresponding core, adaptivity, and signal inputs.
▶ Built-in Alerts: Three alert conditions cover all directional states. "Bullish Trend Signal" fires on the bar where trend direction confirms bullish. "Bearish Trend Signal" fires on the bar where it confirms bearish. "Any Trend Change" combines both into a single condition for traders who want a unified notification regardless of direction. Alerts continue to work even when signal labels are hidden.
▶ Visual Customisation: Six colour presets (Classic, Aqua, Cosmic, Cyber, Neon, and Custom) apply coordinated bullish and bearish colour schemes across the SuperSmoother line, spectral bodies, gradient fill, signal labels, and optional bar and background colouring. Bar colouring tints price candles with the active trend colour at a configurable transparency level, and background colouring extends the directional tint across the full chart pane.
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

Fibonacci Retracement [AFD]Fibonacci levels that find their own two points, and keep finding them.
THE PROBLEM WITH DRAWING THEM BY HAND
A retracement is two clicks and a judgement call. The judgement is the hard part - which high, which low, and whether the leg you just measured is one move or two glued together. Then the session rolls over and the answer changes, so you do it again.
This draws the grid from the chart's own data instead. You tell it which range matters and it finds the two points itself, every bar, forever. Come back after the open and it has already re-anchored to the new day.
PICKING THE RANGE
Four choices, and they are all self-maintaining.
Current Day is the default and it is the one most intraday traders want - today's high and low, re-anchoring at each session open. Previous Day is yesterday's, and it draws from yesterday's start rather than today's, so the geometry sits over the data it came from. Current Week is the same idea one period up.
Latest Swing is the interesting one. It takes the last confirmed swing high and low, and it insists they alternate.
That insistence matters more than it sounds. ta.pivothigh() and ta.pivotlow() are independent detectors, and a real chart prints two, three, four highs in a row with no qualifying low between them. Take the most recent of each and you get a "leg" whose high end is simply the latest high, not the highest one in the span - so the grid measures a move that never happened as a single push, and 0.618 lands somewhere with no relationship to anything. Here, a pivot on the same side as the last one replaces it only if it is more extreme, and a pivot on the opposite side starts the next leg. On clean impulses this changes nothing at all. On ragged ones it pulls the anchor back to the extreme the leg actually reached.
Swing Strength sets how many bars have to print either side of a pivot before it counts. Higher means fewer and more significant swings, and a longer wait.
WHICH WAY THE LEG RUNS
Fib Direction is Auto, Long or Short, and it is the one control that stays live no matter what else you switch off - because it governs both grids, not just the near one.
Auto works out the direction from the range you actually chose. It looks at the two extremes that range uses and puts 0.00 at whichever one printed later, on the reasoning that the more recent extreme is the one the move ended on. So on Current Day, a day that made its low at 10:15 and its high at 15:50 gets 0.00 at the high and a grid you read downwards. Force it with Long or Short when you disagree.
THE MINUS SIGN, AND WHY THE EXTENSIONS HAVE ONE
Everything on this chart is numbered from the leg end. 0.00 sits at the recent extreme that finished the move, 1.00 at the point it started from. That way the number you read is retracement depth, and it means the same thing whichever direction the leg ran.
The extensions continue that same line past 0.00, which is why they are negative. -0.618 sits 0.618 of the leg's range beyond the 0.00 line, in the direction the leg was travelling - exactly the way 0.618 sits 0.618 of the range on the other side of it. One ruler, and the sign tells you which side of the origin you are on.
If that looks unfamiliar, put PulseWire's own Fib Retracement tool on the same two points. Its tags read the same: -0.618, not 1.618. The 1.618 reading belongs to the Trend-Based Fib Extension tool, which measures from the leg origin instead - a perfectly good convention, but putting both on one chart gives you two rulers running opposite directions from the same 1.00 line, and sooner or later you read the wrong one.
Six ratios are on offer - -0.272, -0.414, -0.618, -1.00, -1.618, -3.236 - and they ship switched off. They are levels, not targets. They are arithmetic on the leg. This script says nothing about whether price gets to one, marks no entry or exit, and has no alerts of any kind.
THE SECOND GRID
Switch on Show HTF Context and a second grid draws behind the first, anchored to the latest confirmed swing on a higher timeframe and dimmed so it stays context rather than competing for your attention. It ships off, so a fresh add gives you one clean grid.
HTF Mode is where this differs from most higher-timeframe overlays. Adaptive , the default, does not hold a fixed interval - it takes the next one up from whatever chart you are on. A 5-minute chart anchors to the 15-minute swing, a 1-hour chart to the 4-hour. Change timeframe and it follows you, and because it always resolves to something strictly higher, it cannot silently resolve to nothing.
Custom lets you name the timeframe instead, which is what you want when a specific one matters - the 4-hour swing while you scalp the 5, say. The catch is that it has to be strictly higher than the chart. Set Custom to 240 and drop to a 4-hour chart and the grid disappears with no warning label, because 240 is not higher than 240.
Both grids keep their own level checkboxes, line width, label size and text colour, so you can make the context layer as quiet as you like. The extension ratios are the exception: which ratios get drawn is shared by both grids, while which grids draw them is not. Each layer has its own extension toggle. The tooltips say which is which, because a control that looks global and is not is worse than one that plainly is.
THE SETTINGS ACTUALLY WORTH YOUR TIME
Most of the 63 inputs are the ordinary colour-and-width kind. These are the ones that change how the thing reads.
Color Mode defaults to Gradient, and it is doing real work. Each level takes its colour from its own ratio, so hue states depth - the shallow end and the deep end are different colours, and the 0.618-0.786 span reads as a region instead of two more identical lines. There are five presets plus Custom. Single Color reverts to one colour per grid if you prefer the classic look, and either way whatever transparency you pick in the colour picker is the transparency you get.
Enable Glow draws every level twice - a wide, near-transparent halo under a thin bright core. It costs nothing but line objects and it is the difference between a grid you can see on a busy chart and a set of hairlines you lose against the candles. Turn it off when the chart is crowded.
Fill Between Levels shades the intervals. OTE Band, the default, shades only 0.618-0.786. All Bands shades everything, Custom Bands lets you pick, and Off is off. The fills are independent of the line checkboxes, so you can shade a band whose boundary lines are hidden.
Highlight Golden Zone at Price is the one piece of reactive styling here. While the last close is between the 0.618 and 0.786 prices, that band draws more opaque and lifts off the chart. It creates nothing new - no box, no zone object, no centre line, no label - it just restyles the band the fill control already drew, and Highlight Strength sets by how much. It is arithmetic on two numbers already on your screen.
HTF Layer Dimming adds transparency to the whole context grid on top of whatever its colours already carry, which is how the second grid stays behind the first instead of doubling the clutter.
Extension Fade fades each extension a little further as it travels away from the leg, so the near ones read as more prominent than the far ones. It counts only the extensions you actually enabled, not their slot in the ladder - so if you turn on just the far ones, the nearest of them is still drawn at full strength rather than arriving pre-dimmed.
Ratio Label Format switches the tags between decimal and percent - 0.618 or 61.8%, minus signs intact either way. Show Price Labels adds the actual price beside each ratio; it is off by default because eight prices is a lot of text.
Line Extension Left/Right and Label Right Offset control how far the grid reaches and how far past it the tags sit. The defaults keep the tags in the empty margin, clear of both the candles and the price scale.
One last thing: any control that cannot do anything greys itself out. Switch the context grid off and its settings dim. Switch to Gradient and the single-colour pickers dim. There is no control in this script that looks live, takes a value, and quietly does nothing.
GETTING STARTED
Add it. You get one grid on today's range, gradient-coloured, golden zone shaded.
Want a different range? Anchor Range. Leave Fib Direction on Auto until it tells you something you disagree with.
Want context from above? Show HTF Context, and leave HTF Mode on Adaptive unless a specific timeframe matters to you.
Want the extensions? Turn them on for whichever grid you want them on, then pick your ratios.
Too busy? Glow off, Fill Between Levels off. You are back to plain lines.
THINGS THAT WILL LOOK LIKE BUGS AND ARE NOT
Swing anchors arrive late. A pivot is not a pivot until Swing Strength bars have printed after it, so on Latest Swing and on the context grid you are always looking at the last confirmed pivot, not the bar in front of you. When a newer one confirms, the anchor moves. That is the price of anchoring to something you can only recognise in hindsight, and it is the same trade every swing-based tool makes.
The day and week ranges are live. Current Day and Current Week use the period's running high and low, so the grid re-scales when the session makes a new extreme. It is showing you the range as it stands, not a finished one.
It draws one grid, not a history of them. You get the current grid, redrawn as things move. There is no trail of old ones behind you.
Higher-timeframe data uses the documented confirmed-value form - the expression is offset by one bar and the request passes barmerge.lookahead_on. Together, that is the pattern the Pine Script documentation gives for reading a higher timeframe without pulling unclosed data into historical bars. The source is open, so you can read the call rather than take my word for it.
Custom HTF at or below the chart timeframe draws nothing at all , and says nothing about it. Worth remembering before you conclude the context layer is broken.
A 12-month chart draws no context grid. 12M is the top of PulseWire's interval list, so Adaptive has nothing left to step up to. 3-month and 6-month charts both work.
Prices come from standard OHLC via ticker.standard(), so your levels are the same on Heikin Ashi, Renko, Kagi, Line Break and Point and Figure as they are on candles. The synthetic geometry of those chart types can still put the lines somewhere you would not expect.
WHAT IT DELIBERATELY DOES NOT DO
No alerts. No signals. No scores, ratings or probabilities. No zones, no nested zones, no centre line. It draws Fibonacci levels, labels them honestly, and stops. If you want something that tells you when to act, this is not it.
WHY IT IS DIFFERENT
Four self-maintaining ranges instead of a two-point drag you place today and replace tomorrow. Two independently configured grids on one continuous number line, with the higher one dimmed to sit behind rather than on top. Extensions numbered on the same ruler as the retracements, matching the tags PulseWire's own tool gives those prices, rather than a second scale running the other way. A swing range that is genuinely one leg, because the pivot pair is kept alternating. And colour that carries information - a level's hue states its depth - instead of a palette applied to identical lines.
Open source under the Mozilla Public License 2.0. Indicator

Edge Profiler - Self-Learning Signal StatisticsAlmost every indicator answers one question: when should I enter. Edge Profiler answers the two questions that actually decide whether an entry is tradable: how far did this exact setup historically go against me before it resolved, and how long did it usually take.
It does that by keeping a record of its own signals on the symbol and timeframe you have open, and turning that record into a stop distance, a target and an expected holding time.
WHAT IT MEASURES
For every signal it has ever produced on the current chart, the script stores four numbers:
MAE, Maximum Adverse Excursion. How far price travelled against the signal before the signal resolved, measured in ATR units so the value is comparable across symbols and volatility regimes.
MFE, Maximum Favourable Excursion. How far price travelled in favour, in the same units.
Duration. How many bars the signal remained the active one.
Outcome. The signal-to-signal return, again in ATR units.
The last N signals are kept, older ones are dropped, so the statistics describe the current regime rather than a market that no longer exists. The sample size is adjustable.
WHAT IT DERIVES
Data Stop. Entry minus the 80th percentile of historical MAE, times the ATR at entry. Read plainly, this is a stop level that 80 percent of past signals on this chart never reached. The percentile is adjustable, so 90 gives a wider and safer stop, 70 a tighter and more aggressive one.
Data Target. Entry plus the median historical MFE. A level that half of past signals reached before resolving. Also adjustable by percentile.
Expected duration. The median bar count of past signals. The panel shows the age of the open signal as a percentage of that median, which flags a move that has already outlived what this setup normally delivers.
Expectancy. The average signal-to-signal return in ATR units. Positive means the engine has historically produced more favourable resolution than adverse on this chart. Negative is a warning, and it is deliberately shown rather than hidden.
Win rate. The share of stored signals whose signal-to-signal return was positive.
WHY EXCURSION STATISTICS AND NOT A BACKTEST
A backtest tells you what a complete rule set produced, and it is only as honest as its exit assumptions. Excursion statistics measure something narrower and more robust: the shape of the move that follows a trigger, independent of any exit rule. That makes the numbers usable no matter how you personally manage the trade. If the median adverse excursion on this chart is 0.4 ATR and you are risking 0.15 ATR, the data is telling you the stop is inside the noise, and no entry technique will fix that.
BRING YOUR OWN SIGNAL
Three transparent entry engines are included, and the statistics profile whichever one is selected:
Volatility Trail. An ATR trailing stop that flips direction when price closes through it. Default.
EMA Cross. Close crossing a single exponential moving average.
Donchian Breakout. Close breaking the highest high or lowest low of the last N bars.
Switching the engine reprofiles everything from scratch on the same chart, which makes it easy to see which of the three has the cleaner statistical footprint on the instrument you actually trade. Two engines with the same win rate can have very different adverse excursion, and that difference is what decides whether a stop survives.
ON THE CHART
Entry line, Data Stop line and Data Target line for the currently open signal.
Shaded risk zone between entry and stop, reward zone between entry and target.
Triangles at each signal.
Bars tinted by the active signal direction.
A panel with the full statistics and the live state of the open signal, including its running MAE and MFE so you can see in real time whether the current move is behaving like its own history or not.
ALERTS
Long signal.
Short signal.
Open signal has moved further against entry than the historical stop percentile.
Open signal has outlived the median duration.
SETTINGS THAT MATTER
Entry Engine. Which signal gets profiled.
Sample Size. How many past signals are kept. Smaller adapts faster and is noisier, larger is more stable and slower to react to a regime change.
Minimum Sample. Statistics stay hidden below this count instead of showing numbers built on four observations. Default 15.
Stop Percentile. The single most consequential setting. It is the trade-off between stop survival and risk size.
READING IT HONESTLY
These are descriptive statistics of past signals on one chart. They are not a forecast and they carry no guarantee. A sample of 20 signals is a hint, not evidence. Statistics drawn from a trending period will misprice risk the moment the market goes sideways, and the percentile you choose is an assumption about how much you are willing to be wrong before you are stopped. Load enough history for the sample to fill, check that expectancy is positive before you take the levels seriously, and treat a negative expectancy reading as the script telling you this engine has no edge here.
This is an analysis tool, not financial advice, and not a trading system on its own. Use it with your own risk management and position sizing. Past behaviour of any method does not guarantee future results. Indicator

AlgoForex PULSE Momentum & Volatility CompassAlgoForex PULSE is a single-pane trend, momentum and volatility read-out. It replaces the usual stack of three separate indicators — a moving average, an oscillator and a volatility gauge — with one adaptive framework drawn directly on price.
WHY IT EXISTS
A fixed-period moving average has one setting and two problems: it lags in a trend and whipsaws in a range. Most traders answer this by adding an oscillator in a lower pane and a volatility filter somewhere else, then spend the session moving their eyes between three places. PULSE folds those three jobs into one object on the chart.
HOW THE BASELINE WORKS
The baseline is an adaptive average driven by an efficiency ratio. For the chosen lookback it measures:
• net directional travel = |price now − price N bars ago|
• total travel = the sum of every bar-to-bar move over the same N bars
The ratio of the two is the efficiency ratio. Near 1, almost all movement went one way, so the average is allowed to accelerate toward price. Near 0, price covered a lot of distance and ended up nowhere, so the average slows down and flattens. The smoothing constant is squared, which makes the transition between the two states sharper than a linear blend.
The practical effect: the line tracks trends closely, then stops reacting to noise when the market goes sideways.
AURORA BANDS
Three ATR-scaled layers are drawn on each side of the baseline and filled with the live trend colour. They serve two purposes at once:
• the WIDTH shows current volatility — the cloud breathes as ATR expands and contracts
• the POSITION of price inside the cloud shows how stretched the move is
A close hugging the outer band is an extended move. A close oscillating around the baseline is a market with no commitment.
TREND STATE (with hysteresis)
The trend does not flip the moment price touches the baseline. It requires a close beyond baseline ± (Trend Trigger × ATR), default 0.5× ATR. This buffer is the difference between a handful of meaningful flips per session and dozens of meaningless ones. Raise it for fewer, slower signals; lower it for a more reactive read.
Flips are marked with and labels.
MOMENTUM SCORE (0-100)
Rather than a second pane, momentum is reduced to one number:
Momentum = 55 × normalised position inside the bands + 45 × RSI
The position component is clamped to ±1 so a single spike bar cannot dominate the reading. The result drives three things: the gauge in the dashboard, the candle colour gradient, and the surge markers (small dots) fired when the score crosses the bullish or bearish levels.
CONVICTION
The dashboard shows the raw efficiency ratio as a percentage. This is deliberately kept separate from the momentum score because the two answer different questions:
• Momentum = which direction, how strongly
• Conviction = how clean that movement was
A high momentum score with low conviction is a move fighting through chop. High on both is the condition worth acting on.
SQUEEZE RADAR
Current ATR is compared against its own percentile over a lookback window (default: bottom 25% of the last 100 bars). While ATR sits in that bottom band the background is tinted, marking compression. The bar where ATR climbs back out is marked with a the expansion point.
Compression tells you nothing about direction, only that the range is unusually tight. Pair it with the trend state for a directional bias.
HOW TO USE IT
1. Read the trend colour first — it sets your bias for the session.
2. Check Conviction. Below roughly 20% the market is not paying trend-followers.
3. Wait for price to pull back toward the baseline rather than chasing the outer band.
4. Treat a squeeze release in the direction of the trend as a timing cue, not a signal on its own.
5. Momentum surge dots confirm strength — they are not standalone entries.
SETTINGS THAT MATTER MOST
• Adaptive Length — the responsiveness of the whole system. Lower = faster.
• Trend Trigger ( ATR) — signal frequency. The single most useful dial here.
• Squeeze Percentile — how rare a "squeeze" should be. Lower = stricter.
ALERTS
Bullish trend flip Bearish trend flip Bullish momentum surge Bearish momentum surge Squeeze started Squeeze release.
NOTES
Works on any symbol and any timeframe. The dashboard is bilingual (English) and can be switched in the settings.
This indicator is an analysis tool. It does not predict price and it is not financial advice. No indicator has an edge on its own — use it inside a plan that includes risk management and position sizing. Past behaviour of any tool does not guarantee future results. Indicator

Adaptive Cycle Momentum Oscillator [ZurvanEG]⯁ Adaptive Cycle Momentum Oscillator
◇ Overview
MOM is a cycle-adaptive momentum oscillator built to present market direction, strength, fatigue, volatility compression and saturation within one coherent framework.
Unlike conventional momentum oscillators that apply the same lookback to every market condition, MOM can adjust its momentum window to the market’s active rhythm. This allows its response to become faster or slower as market behaviour changes, while a fixed-length mode remains available for users who require consistent settings.
Beyond measuring momentum, MOM adds context to the reading. It distinguishes strengthening movement from fading pressure, reduces the influence of momentum formed during volatility compression, identifies statistically unusual momentum zones, and detects confirmed divergence structures.
The objective is not to produce more signals or predict every reversal. It is to provide a cleaner and more informative view of momentum—showing not only its direction, but also the conditions under which it is developing.
◈ Key Features
◇ Adaptive Momentum
Automatically adjusts the momentum lookback as market rhythm changes. Fixed mode can be selected whenever a constant length is preferred.
◇ Momentum Regime
Classifies momentum as bullish, bearish or neutral. Separate entry and exit levels reduce unstable regime switching around the dead zone.
◇ Strength & Fatigue
The line gradient shows direction and magnitude, while color strength distinguishes expanding momentum from momentum fading toward zero.
◇ Volatility Squeeze
Detects compressed volatility and reduces momentum produced inside quiet conditions. Squeeze intensity can also be displayed as a variable background.
◇ Saturation Bands
Adaptive upper and lower bands identify momentum readings that are extreme relative to the oscillator’s own recent behavior. They should be treated as saturation zones, not automatic reversal signals.
◇ Divergence
Detects confirmed regular and hidden bullish or bearish divergence. Signals can optionally be restricted to pivots occurring beyond the saturation bands to filter weaker mid-range structures.
◇ Visuals & Information
Optional candle coloring transfers the oscillator’s momentum gradient to the main chart. A compact table displays the current regime, momentum value and slope state, with optional cycle, length, squeeze and divergence diagnostics.
◇ Alerts
Independent alerts are available for:
⬦ Bullish and bearish regime shifts
⬦ Upper and lower saturation contacts
⬦ Squeeze entry and release
⬦ Confirmed bullish and bearish divergence
◈ Interpretation
Adaptive Cycle Momentum Oscillator helps answer:
⬦ Is momentum bullish, bearish or neutral?
⬦ Is the current move strengthening or fading?
⬦ Was momentum produced during expansion or compression?
⬦ Is the reading unusually saturated for this market?
⬦ Has a meaningful divergence been confirmed?
◈ Notes
⬦ Adaptive mode requires sufficient historical data for cycle estimation.
⬦ Divergences appear after pivot confirmation and are therefore delayed by design.
⬦ Saturation does not guarantee reversal, especially during strong trends.
⬦ Squeeze attenuation provides context; it does not predict breakout direction.
◈ Conclusion
Adaptive Cycle Momentum Oscillator is designed as a complete momentum-analysis framework rather than a simple oscillator or signal generator. It combines adaptive measurement, stable directional regimes, strength and fatigue colouring, volatility context, dynamic saturation bands and confirmed divergence in a single visual system.
By adapting to market rhythm and evaluating momentum within its surrounding conditions, MOM helps separate meaningful directional pressure from weak movement produced inside noise or compression. Its visual structure is intended to make changes in direction, intensity and exhaustion recognizable without requiring several overlapping indicators.
MOM does not attempt to replace price structure, risk management or trading confirmation. Its role is to provide a clearer and more consistent momentum perspective that can support trend analysis, pullback evaluation, saturation monitoring and divergence assessment across different instruments and timeframes.
Indicator

Adaptive Confluence Oscillator [ForexCracked]🔵 OVERVIEW
The Adaptive Confluence Oscillator scores four independent read-outs of the market on a continuous scale, weights them according to the current market regime, and plots the result as a single 0 to 100 line. Instead of asking "do my indicators agree, yes or no," it asks "how strongly does each one agree, and which of them should I be listening to right now."
It has no fixed overbought or oversold levels. The bands are calculated from the oscillator's own recent behaviour, so they widen when the market gets volatile and tighten when it goes quiet.
Signals confirm on candle close and do not repaint.
🔵 WHY THIS IS BUILT THE WAY IT IS
Most multi-indicator tools take a vote. RSI is oversold or it is not. That throws away most of the information: an RSI of 29 and an RSI of 12 are not the same signal, but a vote counts them identically. It also treats every indicator as equally relevant at all times, which is plainly false. Stochastic exhaustion means one thing in a strong trend and the opposite thing in a range.
This oscillator fixes both problems. Every component returns a continuous score, and the market regime decides how much each score is worth.
🔵 THE FOUR COMPONENTS (each scored from -1 to +1)
• Trend: how far price sits from its baseline EMA, measured in ATR units rather than in price. Distance matters, not just which side of the line you are on. Because it is measured in ATR, it reads the same on gold as it does on EURUSD.
• Momentum: RSI recentred around 50, so it contributes proportionally instead of flipping at a threshold.
• Impulse: the MACD histogram converted to a z-score against its own rolling deviation. This makes MACD comparable across symbols and timeframes without ever re-tuning it, which raw MACD values are not.
• Stretch: the Stochastic, recentred. This is the component that changes behaviour with regime (see below).
🔵 THE REGIME SWITCH (the part that makes it adaptive)
ADX decides whether the market is trending or ranging, and that changes two things.
First, the weights re-balance:
• Trending: Trend 0.35, Momentum 0.25, Impulse 0.30, Stretch 0.10
• Ranging: Trend 0.15, Momentum 0.25, Impulse 0.20, Stretch 0.40
Second, and more importantly, the Stretch component flips sign. In a trend, a stretched Stochastic confirms the move and pushes the score further in that direction. In a range, the same reading argues for a fade and pushes the score the other way. This is the behaviour a discretionary trader applies without thinking about it, and it is what a fixed vote cannot express.
🔵 ADAPTIVE BANDS
There are no 70/30 lines here. The upper and lower bands are the rolling mean of the oscillator plus and minus a multiple of its own standard deviation. A reading of 68 can be an extreme in a quiet market and completely unremarkable in a volatile one, and the bands reflect that.
• BUY: the score crosses above the upper adaptive band
• SELL: the score crosses below the lower adaptive band
🔵 DIVERGENCE
The script finds pivots on the score itself and compares them against price at those same bars. When price makes a higher high but the score makes a lower high, that is marked as a bearish divergence, and the mirror case as bullish. Divergences are labelled and have their own alerts. Because a divergence is anchored to a confirmed pivot, it prints a few bars after that pivot forms and never moves once printed.
🔵 THE DASHBOARD
The panel shows each component's live score, its current weight, the detected regime with the ADX value, and the oscillator against its adaptive bands. You can see exactly which component is driving the reading and why, rather than trusting a black box.
🔵 SETTINGS
• Baseline EMA 34, ATR 14, Trend Span 2.0 x ATR
• RSI 14, MACD 12/26/9, Stochastic 14
• ADX 14, trending above 22
• Band lookback 100, band width 1.0 x standard deviation
🔵 HOW TO USE
• Take signals where the dashboard regime agrees with the direction. A BUY in a trending regime is a continuation. A BUY in a ranging regime is a fade off the bottom of the range.
• Treat a divergence as a warning to tighten or take partials, not as a standalone entry.
• Raise the band width above 1.0 for fewer and stronger signals, lower it for more.
• Widen Trend Span on noisy symbols so ordinary volatility does not read as trend.
⚠️ DISCLAIMER
This is an analysis tool, not a prediction. A confluence score is a measure of agreement, and indicators can agree and still be wrong. Results depend on market conditions, settings, and your own execution and risk management. Shared for educational and research purposes. Not financial advice. Indicator

Fractal Memory Strategy [Jayadev Rana]Fractal Memory Strategy trades the same engine as the Fractal Memory Projection indicator: it looks for the historical episode most similar to current price action, and only takes trend flips that agree with how that episode played out. Exits scale out at three volatility-adaptive targets.
HOW IT DECIDES
An ATR trailing stop tracks the trend. When it flips, the last 30 closes are converted to normalized log returns and compared against past windows by mean squared distance. The bars that followed the best analog give a net direction; the flip is only traded when the analog direction agrees (the filter can be disabled). Orders are processed on bar close, so no lookahead is involved. For visual context the strategy also draws the 50-candle ghost projection beyond the last bar - it is display-only and never affects order logic.
ENTRIES AND EXITS
On a confirmed bullish flip with agreement the strategy closes any short and enters long; the mirror applies to shorts. One unit of risk R equals ATR times (1.2 plus the ATR percentile rank over 200 bars), so targets and stops widen in volatile regimes and tighten in quiet ones. Position exits: one third at 1R, one third at 2R, the remainder at 3R, with a stop at 1.5R (all adjustable). Direction can be restricted to long-only or short-only.
PROPERTIES USED IN THE PUBLISHED BACKTEST
10,000 initial capital, 10 percent of equity per trade, 0.01 percent commission per order, 2 ticks slippage, no pyramiding, orders on close. These are deliberately conservative; adjust them to match your own broker before drawing any conclusion.
PANEL
Match similarity, volatility regime, forecast direction, closed trade count and win rate.
NOTES
The analog projection is a statistical reference, not a prediction, and past behaviour does not guarantee anything about the future. Results vary by symbol and timeframe; test on your own market with realistic costs before considering any live use. This is an educational tool, not financial advice. Strategy

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

Adaptive Momentum Ribbon [JOAT]Adaptive Momentum Ribbon
An eight-layer moving-average ribbon whose colour is driven by live momentum and whose compression flags the coil before the move.
What it is
A single moving average tells you very little. A ribbon of them, fanned by speed, tells you three things at once: direction (the colour), strength (how wide it fans) and turning points (where it squeezes and flips). This indicator builds that ribbon and adds a momentum core and a compression detector so the ribbon is not just decorative — it gates the signals.
How it works
• The ribbon — eight exponential moving averages from fast to slow, with an optional light second smoothing pass for cleaner turns. When the fast layers sit above the slow layers the stack is bullish, and vice versa.
• Momentum core — a rate-of-change normalised by ATR and then smoothed. This value is mapped onto a colour gradient, so a strong trend glows saturated while a fading one drifts toward neutral. The same value gates entries, so you buy strength rather than every flip.
• Compression detector — the width between the fastest and slowest ribbon lines is ranked as a percentile over a lookback window. A low percentile means the market is coiled; a move out of that coil is the tradable expansion. Coils are highlighted so you can see energy building.
• Flip signals — a Buy prints when the ribbon flips up out of (or just after) a compression with positive momentum; a Sell is the mirror. Because a flip requires the stack to actually reverse, signals are naturally spaced, and a minimum-gap control adds a further safeguard against clustering.
Trade levels
Each signal draws a red risk box to the ATR-based stop and a green reward box to the third target, with inner target lines and right-edge price labels for entry, stop and every take-profit at your chosen R multiples.
The dashboard
An adjustable panel shows trend direction, a block-gradient momentum meter with a signed headline value, the compression state (coiled or expanded), a 0–100 conviction estimate, the current signal, and a live first-target-before-stop tally from closed bars only.
How to use it
• Works on all assets and timeframes; the ribbon adapts to whatever data it is given.
• Use the coil highlight to prepare for a move and the flip-with-momentum signal to time it.
• Require the coil filter for cleaner, fewer signals in choppy markets, or relax it for more responsive trend entries.
Settings
Base length and layer step, source, optional smoothing, momentum length and smoothing, signal momentum gate, compression window and percentile threshold, risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
The combination is the point: a speed-fanned ribbon, an ATR-normalised momentum gradient that both colours the ribbon and filters signals, and a percentile-ranked compression model that isolates coils. Together they turn a familiar visual into a structured, non-repainting trend-and-expansion tool.
Notes and limitations
• Moving averages lag by nature; the ribbon confirms trend, it does not call exact tops or bottoms.
• In strong one-way trends the compression filter may keep you out of some continuation entries — that is the intended trade-off for fewer false flips.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Indicator

Indicator

Adaptive Predictability Engine Entropy Gate, Regime RouterAdaptive Predictability Engine — Entropy Gate, Regime Router & Expert Committee
What it is
The Adaptive Predictability Engine is a governed decision framework, not another confluence average. It refuses to treat all market conditions as tradable. It applies a strict hierarchy: first it asks whether price is forecastable at all right now; if it is, it decides whether trend-style or reversion-style logic is appropriate; and only then does a small committee of transparent experts vote — with the committee continuously re-weighting itself toward whichever experts have been correct recently. When the market is unpredictable, the whole engine stands aside and shows nothing to trade.
It plots directly on price: long/short signals, the live entry/target/stop of the active trade, a plain-language dashboard, and an optional self-calibration panel that scores past signals in R-multiple expectancy (not just win rate).
Why these components are combined (mashup justification)
This is a deliberate, dependent stack — each layer conditions the next, so removing any one changes the layer below it. That is the difference between a governed engine and a bag of averaged indicators.
Predictability gate (permutation entropy + structure). Permutation entropy (Bandt–Pompe) measures the ordinal randomness of recent price across three time scales; this is blended with |Hurst − 0.5|, the distance of the market from a random walk, which is high for strong trends and strong mean-reversion. The blended predictability is percentile-ranked so the gate self-tunes per symbol and timeframe. If the tape is unpredictable, nothing downstream may fire. This is the master switch, and it is why the engine spends much of its time deliberately doing nothing.
Regime router (Hurst exponent). When structure exists, the Hurst exponent (generalized, via a structure-function slope) decides whether it is persistent (trend) or anti-persistent (mean-revert), and routes weight toward the appropriate family of experts rather than averaging trend and reversion logic together.
Expert committee (Hedge / multiplicative weights). Six deliberately diverse experts — price trend, volume-weighted price, order-flow delta, momentum exhaustion, volatility extreme, and range extreme — each cast a directional vote. Their weights update every bar by exponential regret (right experts gain influence, wrong ones lose it), with fixed-share regularization so no single expert can dominate and make the vote fragile.
Distribution-shift guard. If the recent return distribution moves materially versus a reference window, the engine freezes learning and cuts conviction until conditions settle, so stale weights don't drive trades through a regime change.
The output is a single decision = the regret-weighted vote of only the currently-appropriate experts, gated to zero whenever the tape is unpredictable.
How to use it
Add it to any liquid symbol and timeframe. Defaults are tuned for index futures (e.g. NIFTY) but every input is adjustable, and the Data source group lets you repoint price and volume for any market.
Watch the dashboard headline: LONG / SHORT / WAIT / STAND ASIDE. When a signal fires, the engine draws the entry, ATR target, and ATR stop so the action is concrete.
Treat the shaded background as a hard "do not trade" — the engine has judged the tape unpredictable.
Open the Edge calibration (advanced) panel to see, per market memory, the past R-expectancy of the engine's own signals versus a direction-matched baseline. Positive expectancy means the sample was profitable before costs; this is descriptive of the past, not a forward guarantee.
Use the Ablation (research) toggles to switch each layer off and see, on your own data, whether it earns its place.
What makes it original
Most published tools average indicators and hope. This one inverts the approach by asking whether to act at all before what to do, using information-theoretic predictability (permutation entropy) as a master gate, a memory estimate (Hurst) as a router, and online regret-minimization (Hedge) to arbitrate a diverse expert set — with built-in R-expectancy self-calibration so users can judge it honestly rather than on a cherry-picked screenshot. The order-flow expert reads finest-available lower-timeframe signed volume with automatic fallback. The coupling and governance order are the contribution; the individual estimators are classical and credited below.
Concept credits
Permutation entropy — Bandt & Pompe. Hurst exponent / long-range dependence — H. E. Hurst; Mandelbrot. Hedge / multiplicative-weights online learning — Freund & Schapire; Littlestone & Warmuth; Vovk. Efficiency/structure framing — Kaufman. Triple-barrier labelling and R-multiple expectancy — M. López de Prado. Wilson score interval — E. B. Wilson. Synthesis, governance design, and implementation are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. No indicator has an inherent edge. The calibration panel is a descriptive summary of past behaviour on the current chart — not a backtest and not a forward prediction. Always validate independently, apply realistic costs and slippage, and manage risk. You are solely responsible for your trading decisions. Indicator

Indicator

Dominant Cycle OscillatorDominant Cycle Oscillator
A cycle tool that measures the market's current dominant cycle length directly from the data — rather than assuming a fixed period — then reads where price sits inside that cycle (its phase) and how strong the cycle is (its power). It answers three things a fixed-length oscillator can't: how long the cycle is right now, where we are within it, and whether a tradable cycle even exists.
Why these parts are combined (not a mashup for show). Each is required by the previous one. A band-pass filter isolates the tradable cycle band from slow trend and fast noise — you can't measure a cycle cleanly without first removing what isn't cyclical. An autocorrelation periodogram turns that cleaned series into a power spectrum and reports the dominant period as the spectrum's centre of gravity. A cycle-strength read — how far the dominant peak stands above the spectral noise floor — says whether that period is real or noise, so signals are suppressed when no cycle exists. Forward calibration then measures whether the cycle turns actually pay on this symbol.
How it works. Band-pass (high-pass + low-lag smoother) → autocorrelation across lags → discrete Fourier transform → power spectrum → dominant period via its centre of gravity. The cleaned cycle is normalized into a ±100 phase wave. A long fires when the phase turns up from a trough with a real cycle present, a short when it turns down from a peak; each side fires at most once per swing. Every signal is labelled by a triple barrier — a profit target and equal stop in ATR units plus a time limit — split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict (Long/Short, Weak cycle, or Wait) and the Conviction, which reads "High" only when that turn type shows a positive edge that survives the test on this symbol — otherwise it openly says "context only" or "no proven edge here." The dashboard shows the measured cycle length and its strength. Best used with your own trend and risk plan, not alone.
Honesty & limitations. The dominant-cycle estimate is approximate and lags at regime shifts. Edge figures are computed on this chart's own history with overlapping windows and no costs — context, not a guaranteed backtest; past behaviour doesn't predict the future. Non-repainting. The periodogram is computationally heavy on deep history / very low timeframes.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Sharp Reversal OscillatorSharp Reversal Oscillator
A reversal-timing oscillator that re-shapes price into a near-Gaussian form so turning points snap into sharp, clear extremes instead of rounded, ambiguous ones — then scores its own turns forward on your chart, in plain language, so you can see at a glance whether to act or wait.
Why these parts are combined (not a mashup for show). Three steps are stacked, each fixing the previous one's flaw. Raw price excursions are fat-tailed, so it's unclear where an extreme really is; a distribution-normalizing transform stretches values near the edges, turning a compressed extreme into a clear spike. But that transform is easily biased by trend — in a strong move it pins to one side — so the input is first band-pass cleaned (slow trend and fastest noise removed), leaving the tradable swing it should sharpen. The normalization window is then set from the market's measured dominant cycle rather than a fixed guess, so it stays tuned as cycles stretch and compress. The three only work as one tool.
How it works. Band-pass clean → locate price within its recent range, scaled to (−1, 1) → distribution-normalizing transform, smoothed → signal when the line crosses its one-bar trigger from an extreme. The window optionally follows a dominant cycle measured by autocorrelation of the band-passed price. Each signal is then labelled by a triple barrier — a profit target and an equal stop in ATR units, plus a time limit — so a "win" means the target was hit before the stop. Results split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict row (Long/Short signal, Watch, or Wait). Check Conviction — it reads "High" only when that signal type shows a positive edge that survives the statistical test on this symbol; otherwise treat it as context. Green wave above zero is up-pressure, red below is down; shaded bands are extremes; the faint line is the trigger. Best used with your own trend and risk plan, not alone.
What's original. The band-pass-cleaned input, the self-tuning window, the forward triple-barrier calibration with an out-of-sample split, and a conviction read that openly admits when there's no proven edge — instead of presenting every signal as equally reliable.
Inputs. Price source (change it for any market), reading mode (Simple/Pro), engine and self-tuning controls, extreme level, full calibration settings, and an auto-adapting dashboard legible on dark or light charts. Defaults are tuned for NSE:NIFTY1! intraday.
Honesty & limitations. Edge figures are computed on this chart's own history with overlapping windows and no costs — context, not a guaranteed backtest; past behaviour doesn't predict the future, and the cycle estimate lags at regime shifts.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Adaptive Trend Cycle OscillatorAdaptive Trend Cycle Oscillator
A bounded cycle-timing oscillator that does two things most cycle tools don't: it tunes its own period to the market's measured rhythm, and it scores its own signals forward on your chart in plain language — so you can see at a glance whether to act or wait.
What it is. A 0-100-style cycle line (shown −100…+100) that highlights up-phases and down-phases and marks turns out of oversold/overbought. A dashboard translates the current state into a one-word verdict and an honest conviction read.
Why these parts are combined (not a mashup for show). Three classical ideas are fused because each fixes the previous one's flaw. A trend-difference line (fast average minus slow average) captures direction but is unbounded and late at turns. Running it through a double stochastic normalization bounds it and sharpens the cyclical phase, so reversals show sooner with less whipsaw. The remaining weakness is the fixed normalization length — real cycles stretch and compress — so the length is set from a measured dominant cycle (autocorrelation of a band-passed price), making the oscillator self-tuning. The three only work as one tool; separately each is incomplete.
How it works. (1) Dominant cycle: band-pass filter → autocorrelation across lags → Fourier transform → power spectrum → dominant period via its centre of gravity. (2) Oscillator: trend-difference → stochastic over the measured period → smooth → stochastic → smooth. (3) Calibration: each signal is labelled by a triple barrier — a profit target and an equal stop in ATR units, plus a time limit — so a "win" means the target was reached before the stop. Results split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict row first (Long/Short signal, Watch, or Wait). Check Conviction — it only reads "High" when that signal type shows a positive edge that survives the statistical test on this symbol; otherwise treat the signal as context. Green wave above the mid line is an up-phase, red below is a down-phase; shaded bands are extremes. Best used alongside your own trend and risk plan, not alone.
What's original. The self-tuning period, the forward triple-barrier calibration with an out-of-sample split, and a conviction read that openly admits when there's no proven edge — rather than presenting every signal as equally reliable.
Inputs. Price source (change it to use any market), reading mode (Simple/Pro), cycle and self-tuning controls, signal zones, full calibration settings, and an auto-adapting dashboard that stays legible on dark or light charts. Defaults are tuned for NSE:NIFTY1! intraday.
Honesty & limitations. Edge figures are computed on this chart's own history with overlapping windows and no costs — context, not a guaranteed backtest; past behaviour doesn't predict the future, and the cycle estimate lags at regime shifts.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Adaptive SuperTrend -, Regime Filter & Buy/Sell Signals [LunqFX]Adaptive SuperTrend is a self-tuning trend indicator for PulseWire that fixes the biggest flaw of the classic SuperTrend: a fixed multiplier that whipsaws in choppy markets and lags in fast ones. This version makes the SuperTrend multiplier adaptive — it automatically widens in high volatility and tightens in low volatility — and layers a regime filter and a momentum filter on top to deliver clean, non-repainting Buy/Sell signals with an automatic take-profit / stop-loss ladder and live performance stats. It works on forex, crypto, stocks, indices, futures, gold (XAUUSD) and Bitcoin (BTCUSD), on any timeframe, for scalping, day trading and swing trading. Built in Pine Script v6. Keywords: adaptive supertrend, supertrend, trend, trend following, buy sell signals, regime filter, ATR trailing stop, volatility, momentum, take profit, stop loss, risk reward, trend reversal, no repaint, scalping, day trading, swing trading.
◆ WHY ADAPTIVE
A normal SuperTrend uses one fixed multiplier for every market and every condition, so it gets shaken out in volatile phases and reacts too slowly in calm ones. Adaptive SuperTrend ranks current volatility against its own recent history (0–100%) and maps that onto a multiplier range — wide when the market is wild, tight when it is calm — with zero manual tuning. The same settings behave sensibly on EURUSD, BTCUSD and the S&P 500.
◆ WHAT IT DOES
Adaptive trend line + fill — a volatility-adjusted trailing stop that flips turquoise (up) / magenta (down).
Filtered Buy/Sell signals — a trend flip only fires as a signal when two filters agree.
Auto TP/SL ladder — on every signal it draws the stop (on the trend line) and TP1 / TP2 / TP3 at 1R / 2R / 3R, so you get a complete trade plan instantly.
Conviction Score 0–100 — one number summarising how strong the current setup is.
Live win-rate stats — the script tracks its own past signals on the fly.
Neon trend candles + a clean live dashboard.
◆ HOW IT WORKS (the concepts)
Adaptive multiplier: ATR is ranked by percentile over a lookback window; the percentile sets the SuperTrend multiplier between your min and max.
SuperTrend core: the standard trailing-stop formula, flipping direction when price closes beyond the band.
Regime filter (Kaufman Efficiency Ratio): directional travel divided by total path = how trending vs choppy the market is. Signals are blocked in low-efficiency (range) conditions to cut false signals.
Momentum check: a flip is only taken when price is on the matching side of its momentum EMA.
Conviction Score: a weighted blend of trend efficiency, momentum agreement and trend-line slope (0–100).
Live stats: each signal is tracked sequentially — a “win” = price reaches TP1 (1R) before the stop — with no lookahead.
◆ HOW TO USE IT
Take BUY / SELL labels in the direction of the new trend; the SL and TP1/2/3 ladder give you the exact plan and risk/reward.
Favour signals with a high Conviction Score and a TRENDING regime; stand aside when the dashboard shows RANGE.
Manage the trade to TP1/TP2/TP3 or trail with the adaptive line.
Tune Min/Max multiplier for tighter or looser stops and Efficiency threshold for how strict the range filter is.
Combine with your own support/resistance, structure or higher-timeframe bias for confluence.
◆ SETTINGS
Adaptive Trend: ATR length, min/max multiplier, volatility window.
Regime Filter: on/off, efficiency length, trend threshold.
Momentum Check: on/off, momentum EMA.
Visuals: trend fill, glow, neon candles, Buy/Sell labels.
Trade Levels & Stats: auto TP/SL ladder, live signal stats.
Panel: show/hide, position, background, accent.
◆ ALERTS
Buy signal · Sell signal · Trend flip up · Trend flip down.
◆ ORIGINALITY
The SuperTrend trailing-stop formula is a standard, public technique, implemented here from scratch. The adaptive volatility-percentile multiplier, the regime filter integration, the Conviction Score, the R-based TP/SL ladder and the live win-rate engine are my own original work. No third-party or copied code is used.
◆ LIMITATIONS
This is a trend/volatility tool, not a complete system — always confirm with price action and risk management.
Like all trend-following tools, it can chop in tight ranges; the regime filter reduces but cannot eliminate this.
The fixed-R stop in the ladder is a planning aid (constant 1R), separate from the trailing adaptive line — they are different stops by design.
The live win-rate is the indicator’s own TP1-vs-stop estimate; if a single bar tags both the stop and TP1 it is counted as a win, so treat the stat as indicative, not exact.
Past performance and live stats do not guarantee future results.
◆ NON-REPAINTING
Trend, regime, signals and stats are computed from confirmed bar data with no security() lookahead. A signal printed on a closed bar stays. As with any live tool, the forming bar updates in real time and settles on close.
Adaptive SuperTrend is an educational analysis tool, not financial advice. Always do your own research and manage risk. © LunqFX. Indicator

Machine Learning Adaptive DMI Signals [AlgoAlpha]🟠 OVERVIEW
The Directional Movement Index (DMI) is commonly calculated using a fixed lookback length. But market conditions change over time, and a length that works well during one period may become less effective during another.
This script builds multiple DMI models across a user-defined range of lengths and continuously evaluates their past performance. Each DMI length acts as an independent expert. As new directional flips occur, the script measures how well each expert performed and updates its internal scoring system.
The result is an adaptive DMI that automatically shifts toward lengths that have recently produced better directional signals while reducing the influence of weaker performers.
🟠 CONCEPTS
Expert DMI — A DMI calculation running at a specific lookback length within the tested range.
Directional Flip — A change in trend state when +DI crosses above -DI or when -DI crosses above +DI.
Reward Score — A performance score assigned to each completed flip based on return, move quality, pullback behavior, or win rate.
Maximum Favorable Excursion (MFE) — The largest move in the trade's favor before the next directional flip.
Maximum Adverse Excursion (MAE) — The largest move against the trade before the next directional flip.
Recency Decay — A weighting system that gradually reduces the influence of older observations so recent market behavior has greater impact.
Softmax Weighting — A probability-style weighting process that gives greater influence to higher-scoring DMI lengths when estimating the adaptive length.
🟠 FEATURES
Adaptive +DI and -DI Lines — Displays directional movement using a dynamically selected DMI length that adjusts over time.
Directional Clouds — Color-filled regions between the DI lines help visualize which side currently has directional control.
Bullish and Bearish Flip Signals — ▲ and ▼ markers appear when the Adaptive +DI and -DI lines cross.
ADX Strength Display — Strength squares at the bottom of the pane become more visible as trend strength increases and fade as strength decreases.
Information Table — Displays the active adaptive length, selected scoring mode, memory count, and current bullish or bearish trend state in a customizable table.
🟠 HOW TO USE
Watch for bullish flips when Adaptive +DI crosses above Adaptive -DI to identify potential shifts toward upward directional control.
Watch for bearish flips when Adaptive -DI crosses above Adaptive +DI to identify potential shifts toward downward directional control.
Use the ADX strength squares to gauge whether directional movement is strengthening or weakening.
Increase the tested length range when evaluating a wider variety of market conditions.
Increase Memory and Forget Old Trades values for more stable adaptation and slower length changes.
Decrease Memory or lower the decay factor when faster adaptation to recent behavior is preferred.
Experiment with the available scoring methods to determine whether return, trend quality, or consistency is more important for your analysis.
🟠 CONCLUSION
Machine Learning Adaptive DMI combines traditional DMI calculations with a performance-driven adaptive length selection process. Instead of relying on a fixed lookback period, it continuously evaluates how different DMI lengths have behaved and adjusts accordingly. This provides a dynamic view of directional strength, trend bias, and signal quality that reflects recent market behavior. Indicator

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

Volatility Forecast [EXCAVO]Forward Projection of the Bollinger Envelope with Adaptive Horizon and Slope Clamp
The Volatility Forecast takes the classical Bollinger Bands and
projects the basis and the bands forward by a configurable number of bars.
Slopes of the basis, standard deviation and ATR are estimated from linear
regression over a lookback window, then extrapolated through a smooth
curve into the right side of the chart. Small orange dots mark band
reclaim events on confirmed closed bars.
The forecast horizon adapts to the chart timeframe so the projection
stays meaningful at every TF, and a slope clamp prevents the bands from
ballooning into unrealistic territory after sharp regime shifts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. The current Bollinger Bands are
plotted on the chart and a dashed envelope extends to the
right with the projected basis and bands.
Step 2 → Read the projection. The projected upper and lower
bands show the most likely volatility envelope over the
next bars under the current trend and volatility regime.
Wider end = expansion expected; narrower end = compression.
Step 3 → Use the reclaim dots. A small orange dot below a bar
marks a confirmed bull band reclaim (price tagged the lower
band and pulled back inside). A dot above a bar marks a
bear reclaim. These are context, not entries.
Step 4 → Check the dashboard. The top right panel reads the
projection mode, current width vs its rolling average,
band state, and the last reclaim.
Step 5 → Combine with structure. The envelope pairs well with
trend and structure tools. A breakout that aligns with an
expanding projected envelope tends to continue; one against
a contracting envelope tends to fade.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Bollinger Bands
Basis is a simple moving average of the source over Length (default 20).
Standard deviation is computed over the same window. Bands are basis plus
or minus Multiplier times standard deviation (default 2.0). These are the
solid plotted lines on the chart.
◆ Linear Regression Slopes
For the projection, the algorithm estimates per-bar slopes from a linear
regression of the basis, the standard deviation, and the ATR over the
Slope Lookback window (default 40). Slope is taken as the difference
between the linreg value at offset 0 and offset 1 - the per-bar drift
the regression expects to continue.
◆ Slope Clamp
Each slope is then clamped to a safety bound so that the cumulative
projected displacement stays sensible. End to end, the projected basis
cannot drift more than two current band-widths, and the projected
standard deviation or ATR cannot grow more than 50% of its current value.
Sign of the slope is preserved so trend direction is intact, only the
magnitude is bounded. This keeps the projection meaningful after sharp
regime shifts.
◆ Forward Projection
Three modes turn slopes into a projected envelope across the forecast
horizon:
Linear extends basis and width on a straight line using the
current slope at every step.
Smooth Curve (default) eases from the current value toward a
dynamic endpoint via a smoothstep curve so the projection has a
natural arc instead of a hard linear extrapolation.
Adaptive Volatility drives the projected width with ATR slope
instead of standard-deviation slope. Useful when volatility is
regime-dependent and the ATR captures it better than stdev.
A projection floor at 50% ensures the envelope never collapses to a
single point on declining-volatility regimes.
◆ Auto Timeframe Forecast
Forecast Bars defaults to Auto, which picks the horizon from the chart
timeframe: 40 bars on 4h and below, 20 on Daily, 10 on Weekly, 6 on
Monthly+. Manual override is available for operators who want a fixed
bar count regardless of timeframe.
◆ Band Reclaim Markers
A bull reclaim fires when the prior bar's low touched the lower band,
the current bar's low has pulled back above the lower band, and the
close sits below the basis. A bear reclaim is symmetric on the upper
band. Cooldown of Length bars prevents same-direction stacking. The
optional Trend MA filter keeps bull marks only above the MA and bear
marks only below. By default markers fire only on confirmed closed bars
(no repaint); Real-time Markers can be enabled if intra-bar feedback is
preferred.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Adaptive Horizon
The forecast horizon scales with the chart timeframe. The projection
shows a comparable arc on intraday, daily, weekly and monthly without
manual tuning per chart.
◆ Slope Clamp Safety Net
Linear-regression slopes can overshoot after sharp moves or on long
horizons. The clamp caps the cumulative displacement so the projection
cannot grow into unrealistic ranges, regardless of the underlying slope.
◆ Three Projection Modes
Linear, Smooth Curve and Adaptive Volatility cover the common shapes a
volatility envelope can take. Smooth Curve uses smoothstep easing for
a natural arc; Adaptive Volatility ignores stdev drift and tracks ATR
instead.
◆ Confirmed Reclaim Markers
Small orange dots above or below the bar mark band reclaim events. They
fire on confirmed closed bars by default (no repaint), with an optional
real-time mode for operators who prefer intra-bar feedback. A trend-MA
filter keeps the bias clean.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel with the current state read:
Mode - Linear / Smooth Curve / Adaptive Volatility
Width vs Avg - current band width relative to its rolling average
Band State - where price sits in the bands (Above Upper / Below Lower / Upper Half / Lower Half)
Last Marker - direction and bars since the last band reclaim
Legend table explains every on-chart element. Both panels toggle in the
Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Bollinger Bands
Source - close (price series used for basis and stdev)
Length - 20 (lookback for basis and stdev)
Multiplier - 2.0 (band width in stdev units)
Basis / Band / Fill Colors - default palette
Forecast Envelope
Forecast Bars Mode - Auto (adapts to chart TF) or Manual
Forecast Bars (Manual) - 40 (used when Mode = Manual)
Slope Lookback - 40 (linreg window for slope estimation)
Mode - Smooth Curve (Linear / Smooth Curve / Adaptive Volatility)
Projection Style / Width / Colors - dashed, default palette
Fill Projection - ON
Reclaim Markers
Show Markers - ON
Real-time Markers - OFF (no repaint by default; closed bars only)
Filter by Trend MA - ON
Trend MA Type - SMA (SMA / EMA / WMA / HMA)
Trend MA Length - 100
Marker Color - orange (#FF8C00)
Show Trend MA - OFF
Dashboard
Show Dashboard - ON
Dashboard Position - Top Right
Show Legend - ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
Two directional alertconditions are exposed:
Bull Band Reclaim - fires on a confirmed bull reclaim event
Bear Band Reclaim - fires on a confirmed bear reclaim event
Set the alert condition to "Once Per Bar Close" for clean, non-repainting
delivery. Trend-MA filter and cooldown apply to alerts the same way they
apply to the on-chart markers.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis
tool and does not constitute financial advice, investment recommendations,
or a guarantee of future results. Past indicator behavior does not
guarantee future performance. Always use proper risk management and your
own judgment.
Indicator

Ichimoku Cloud Calibrated & Multi-Timeframe# Ichimoku Cloud — Strength-Graded, Calibrated & Multi-Timeframe (ICHI ARC)
## What it is
The classic Ichimoku Kinko Hyo five-line system — Tenkan, Kijun, the Senkou A/B cloud (Kumo) and the Chikou span — drawn faithfully, but with the *reading* of it done by a modern engine instead of the eye.
A plain Ichimoku throws six signals at once with no synthesis, uses fixed periods designed for one market in the 1930s, and tells you nothing about whether its signals actually work.
ICHI ARC keeps the cloud exactly as the core, then fuses the whole signal cluster into **one 0–100 strength score per signal**, confirms it with market structure and volume, and **calibrates the score to what actually happened on this symbol**.
It runs on **any symbol, asset class, timeframe and market**. The raw data source and every optional feed are user-selectable; nothing is hard-coded to a market.
---
## Why these components are combined (mashup rationale)
A raw Ichimoku has four well-known weaknesses, and each added layer fixes exactly one of them and feeds the next — none is decorative:
### 1. Adaptive periods (fixes the "one-market settings" problem)
Optionally derive Tenkan/Kijun/Span-B from the measured **dominant cycle** so the cloud fits the instrument and timeframe instead of fixed 9/26/52. Classic mode is the default.
### 2. One strength score (fixes "six signals, no synthesis")
Price-vs-cloud (the master bias), Tenkan/Kijun, Chikou clearance, current cloud colour, the forward Kumo twist, Kijun slope and cloud thickness are weighted into a single 0–100 grade so you read one number, not six lines.
### 3. Market-structure confirmation, BOS / CHoCH (fixes false breakouts)
Swing-pivot structure independently checks whether a cloud breakout is a real structural shift: a same-direction Break of Structure strengthens the signal; a signal against the last Change of Character is vetoed.
This is price geometry, so it is orthogonal to the cloud and to volume.
### 4. Relative-volume confirmation (fixes dead-volume fakeouts)
Real breakouts carry volume; RVOL (volume vs its own average) boosts strong-volume signals and can veto dead-volume ones — a third, independent angle on the same failure mode.
### 5. Regime + multi-timeframe context (keeps it out of chop)
An efficiency-ratio / trend-strength / volatility-cluster classifier and three higher-timeframe clouds gate the signals, since Ichimoku breakouts fail in range-bound tape.
### 6. Conviction, vetoes and Kelly sizing
Everything resolves to one LONG / SHORT / FLAT verdict with hard vetoes, and the calibrated win-rate is turned into a fractional-Kelly position-size suggestion.
Remove any one layer and a specific Ichimoku failure returns (wrong fit, signal overload, false breakout, dead-volume breakout, chop). That is the justification for combining them.
---
## How it is original
ICHI ARC keeps a **self-calibrating quality engine**.
Every cloud-bias signal is checked a fixed window later for whether price actually ran a **favourable target (in ATR)** in the signal's direction — i.e. whether the trade *worked*, not merely whether the cloud held.
From that it reports, live, the **realised win-rate of past signals at each strength tier on this symbol** plus the average favourable move (in ATR), can **auto-learn the strength cutoff** worth acting on, and converts the win-rate into a **Kelly-based sizing suggestion**.
A stock Ichimoku tells you nothing about the quality of its own signals; this one is accountable to its own track record.
---
## What it plots
• The full classic Ichimoku: Tenkan, Kijun, the displaced Senkou A/B **cloud** (with opacity scaled by cloud thickness), the Chikou span, and marked forward **Kumo twists**.
• Strength-graded signal triangles with a score label (`72 S` / `55 M` / `31 w`), and small diamonds marking **Change-of-Character** structure flips.
• A compact **dashboard** featuring:
* Verdict
* Regime
* Price-vs-cloud
* Structure state
* Signal strength and realised win-rate
* Tenkan/Kijun status
* Chikou status
* MTF agreement
* Relative volume
* Calibration statistics
* Kelly / expectancy sizing reference
* Active veto status
---
## How to use it
### 1. Trade with the cloud
Long bias above the Kumo, short bias below, no-trade inside.
### 2. Focus on strength-graded signals
A high-strength signal that also has:
• Same-direction Break of Structure
• Higher-timeframe agreement
• Real volume confirmation
is the A+ setup.
Weak signals during chop regimes are generally the ones to skip.
### 3. Read the VERDICT / VETO rows
WEAK or VETO means stand aside (for example, a signal against structure, in chop, or on dead volume).
### 4. Use the RELIABILITY and KELLY rows
The **RELIABILITY** row shows how this symbol's signals at each strength tier have historically behaved.
The **KELLY** row suggests a risk percentage for journaling and trade review purposes.
The displayed size is a reference only and not an order recommendation.
### 5. Alerts
Alerts cover:
• Bullish cloud signals
• Bearish cloud signals
• Conviction verdict changes
• Kumo twists
---
## Settings (use on any asset / market)
### Raw data source
`close`, `hl2`, `hlc3`, `ohlc4`, or another indicator's plot.
The cloud's highs/lows always use chart high/low.
Works on any instrument.
### Periods
Classic (9/26/52/26) or Adaptive (dominant-cycle).
Displacement remains fixed.
### Structure
Swing pivot length and structure veto controls.
### Volume
RVOL length and minimum thresholds.
Optional low-volume veto.
### Calibration
Judging window and favourable ATR target defining a "good" signal.
Auto-learn cutoff and target win-rate settings.
### Advanced Controls
Regime, MTF, conviction weights, risk controls, Kelly fraction and maximum risk.
### Optional feeds (blank = off)
• Volatility-index symbol (spike veto)
• Cross-asset symbol (confluence)
Both are disabled by default, allowing fully self-contained operation on any market.
---
## Notes
• This is a **study / indicator**, not a strategy, and it places no orders.
• Signals are evaluated on bar close to avoid intrabar repainting.
• Structure uses confirmed pivots and higher-timeframe reads use confirmed values.
• The cloud and Chikou are displaced exactly as in classic Ichimoku.
• Relative-volume features require a symbol that reports volume (such as futures). On volume-less symbols they gracefully revert to neutral behaviour.
---
## Disclaimer
This script is provided for educational and informational purposes only. It is a technical-analysis study, not financial, investment, or trading advice, and not a recommendation or solicitation to buy or sell any instrument.
No indicator can predict markets; past behaviour and any historical statistics shown (including the signal win-rates and any Kelly-based sizing suggestion) do not guarantee future results.
Trading involves substantial risk of loss.
You are solely responsible for your own decisions — do your own research and consider consulting a licensed financial professional before trading.
The author accepts no liability for any loss arising from use of this script.
Indicator

Calibrated Supertrend Strength-Graded & Multi-Timeframe## Calibrated Supertrend — Confirmed, Strength-Graded & Multi-Timeframe (ST ARC)
### What it is
A Supertrend rebuilt to fix the three things that frustrate everyone who uses the
plain version, and to tell you **how trustworthy each trend flip is** before you act
on it. A classic Supertrend uses a **fixed ATR multiplier** (an arbitrary guess that
whipsaws in volatile markets and lags in calm ones), it **flips on noise** (every
marginal poke through the band reverses it), and it gives you **no sense of quality**
(a great flip and a junk flip look identical). ST ARC addresses all three, then
scores every flip 0–100 and — crucially — **calibrates that score to what actually
happened on this symbol**, so the number is accountable rather than decorative.
It runs on **any symbol, asset class, timeframe and market**. The raw data source
and every optional feed are user-selectable; nothing is hard-coded to a market.
### Why these components are combined (mashup rationale)
Each layer removes one specific, nameable failure of the plain Supertrend and feeds
the next — none is decorative:
1. **Adaptive multiplier** — the band width is no longer fixed. The ATR multiplier
becomes a series that scales with a **volatility rank** (how high current ATR
sits versus its own recent history): wider when volatility is high to cut
whipsaw, tighter when calm, and wider still when trend **efficiency** is low
(choppy tape). The ATR *length* can also adapt to the measured dominant cycle.
2. **Confirmation gate (de-whipsaw)** — a raw flip is only **confirmed** when the
close breaches the prior band by a minimum fraction of ATR *and* a minimum number
of bars have passed since the last flip, evaluated on closed bars
(non-repainting). This fixes the "flips on noise" problem.
3. **Regime classifier** — efficiency ratio + trend strength + a volatility-cluster
measure label the market Trend / Range / Volatile, so flips are trusted or
discounted by context.
4. **Multi-timeframe agreement** — three higher-timeframe Supertrends (multiples of
your chart timeframe) are read with no repainting and counted for agreement; a
signal that all higher timeframes oppose can be vetoed.
5. **Flip-strength score + conviction with hard vetoes** — at each flip a 0–100
strength is built from breach depth, trend strength, efficiency, MTF agreement,
regime alignment, volume thrust and volume delta, then gated by hard vetoes
(volatility spike, higher timeframes opposed, a fresh flip inside a chop regime,
cross-asset conflict). The output is one verdict plus a strength grade.
Remove any single layer and a specific Supertrend failure returns — that is the
justification for combining them.
### How it is original
ST ARC keeps a **self-calibrating quality engine**. It records every confirmed flip
and, a fixed window later, checks whether price actually ran a **favourable target
(measured in ATR)** in the flip's direction — i.e. whether the trade *worked*, not
merely whether the line avoided re-flipping. From that it reports, on the dashboard
and on each flip label, the **realized win-rate of past flips at each strength tier**
on this very symbol, plus the average favourable excursion. It can even **auto-learn
the strength threshold** at which flips have historically met a target win-rate and
use that as the action filter. A stock Supertrend tells you nothing about the quality
of its own signals; this one is accountable to its own track record.
### What it plots
- A single **Supertrend line** on price, green up / red down, with the flip triangle
**colour-graded by strength** (strong = solid, weak = faded) and a small
**strength label** on each flip (score + grade).
- An optional **second, slower Supertrend** (thinner line, contrasting colour,
diamond markers) for fast/slow confluence, with a DUAL agreement readout.
- A compact **dashboard**: verdict, regime, direction, the live adaptive multiplier
and ATR length, the flip state with its strength and that tier's realized
win-rate, MTF agreement, the calibration stat, dominant cycle, a risk-based size
reference and any active veto.
### How to use it
1. Trade with the line: long bias while it is below price (green), short while above
(red). The line is a natural trailing stop.
2. Act on **confirmed flips** (the triangles), not raw touches, and weight them by
the **strength score** — strong flips in a Trend regime with higher-timeframe
agreement are the high-quality ones; weak flips in a chop regime are the ones to
skip.
3. Use the **conviction / strength gates** and any active **veto** as a filter; the
optional **auto-learned strength cutoff** suppresses the verdict on flips weaker
than the level that has historically met your target win-rate.
4. The size shown is an ATR-based reference for journaling, not an order.
5. Alerts cover confirmed flips, the conviction verdict, raw flips and the secondary
Supertrend.
### Settings (use on any asset / market)
- **Raw data source** — `hl2`, `hlc3`, `close`, `ohlc4`, or point it at **another
indicator's plot**. This is what lets it work on any instrument or on your own
series.
- **Supertrend core** — ATR length (with optional dominant-cycle adaptive length)
and base multiplier.
- **Adaptive multiplier** — volatility-rank lookback, calm/volatile scaling and an
optional chop-widening term.
- **Confirmation** — minimum breach in ATR, minimum bars between flips, non-repaint
on close.
- **Calibration** — the judging window and the favourable target (in ATR) that
defines a "good" flip; the auto-learn cutoff and its target win-rate.
- **Regime / MTF / conviction weights / secondary Supertrend** — all exposed.
- **Optional feeds (blank = off):** a *volatility-index symbol* (spike veto) and a
*cross-asset symbol* (confluence). Both blank by default, so the script is fully
self-contained on any market.
### Notes
- It is a **study / indicator**, not a strategy, and it places no orders.
- Confirmed flips are evaluated on bar close to avoid intrabar repainting;
higher-timeframe reads use confirmed values.
---
### Disclaimer
This script is provided for educational and informational purposes only. It is a
technical-analysis study, not financial, investment, or trading advice, and not a
recommendation or solicitation to buy or sell any instrument. No indicator can
predict markets; past behaviour and any historical statistics shown (including the
flip win-rates) do not guarantee future results. Trading involves substantial risk of
loss. You are solely responsible for your own decisions — do your own research and
consider consulting a licensed financial professional before trading. The author
accepts no liability for any loss arising from use of this script.
Indicator
