Adaptive Velocity Oscillator [UAlgo]Adaptive Velocity Oscillator is a momentum and reversal framework built around the rate of change of an Adaptive Moving Average. Instead of using a fixed smoothing engine, the script first creates a Kaufman style adaptive average whose responsiveness changes according to market efficiency, then measures how fast that adaptive baseline is moving from one bar to the next. That velocity becomes the core oscillator.
The main idea is straightforward. When the adaptive average starts accelerating upward, the oscillator rises above zero. When the adaptive average starts decelerating or turning lower, the oscillator falls below zero. This gives the user a direct view of directional pressure, but in a way that remains sensitive to changing market conditions because the underlying average itself is adaptive rather than static.
To make the oscillator more practical, the script surrounds the velocity with dynamic filter bands derived from the standard deviation of the AMA series. These bands act like a contextual noise threshold. Small fluctuations inside the band are treated as less important, while stronger moves through the band can be interpreted as meaningful directional expansion or reversal activity.
The script also supports two signal styles. Standard mode reacts to velocity transitions through the regular filter band. Extreme Reversal mode requires a deeper stretch into an expanded threshold before signaling a reversal style response. Optional price confirmation can then require bullish candle structure for buy signals and bearish candle structure for sell signals. A cooldown filter is added on top so the same type of signal cannot repeat too rapidly.
The result is an oscillator that can be used for trend context, reversal spotting, and momentum transition analysis. It is especially useful for traders who want something more adaptive than a traditional moving average crossover or a simple rate of change calculation.
🔹 Features
🔸 Adaptive AMA Core
The script uses an adaptive moving average whose smoothing constant changes according to the Efficiency Ratio. When price is moving efficiently in one direction, the average becomes more responsive. When price is noisy and directionless, the average becomes slower and more stable.
🔸 Velocity Based Oscillator
The oscillator is not built from price directly. It is built from the bar to bar change of the adaptive average. This means the indicator measures how quickly the smoothed baseline itself is moving, which creates a cleaner momentum signal than raw price change alone.
🔸 Dynamic Filter Bands
A statistical filter band is calculated from the standard deviation of the AMA series and then scaled by the user selected gamma value. This creates a noise threshold that expands and contracts with market conditions.
🔸 Standard and Extreme Reversal Modes
In Standard mode, signals are generated when velocity crosses back through the regular filter threshold. In Extreme Reversal mode, the script requires a deeper stretch using an expanded band before a signal can trigger. This gives the user a choice between more responsive and more selective behavior.
🔸 Optional Price Confirmation
Signals can require candle confirmation. Bullish signals may be restricted to bars where close is above open, and bearish signals may be restricted to bars where close is below open. This can help reduce signals that appear without supportive candle structure.
🔸 Cooldown Protection
A built in cooldown logic prevents repeated same side signals from firing too close together. This helps reduce clustering during noisy or oscillatory phases.
🔸 Trend State From Zero Crosses
The script also tracks velocity crosses through zero. These zero transitions can be interpreted as broader positive or negative momentum regime shifts.
🔸 Visual Context Through Color and Bands
The histogram and line coloring change according to whether velocity is strongly positive, strongly negative, or neutral relative to the filter zone. This makes the oscillator easy to read at a glance.
🔸 Signal Labels and Alerts
The indicator places buy and sell labels around qualifying signal bars and includes alert conditions for bullish signals, bearish signals, positive trend shifts, and negative trend shifts.
🔹 Calculations
1) AMA State Container
type AMACalculator
float value = na
float value_prev = na
float velocity = 0.0
float filterBand = 0.0
This object stores the internal state of the adaptive average engine.
value holds the latest AMA value.
value_prev stores the previous AMA value.
velocity stores the bar to bar change of that AMA.
filterBand stores the active dynamic threshold used later for signal filtering.
So before any signal logic begins, the script already has a dedicated structure for the adaptive average, its momentum, and its statistical band.
2) Efficiency Ratio Calculation
float change = math.abs(src - src )
float volatility = math.sum(math.abs(src - src ), lengthER)
float ER = volatility == 0 ? 0 : change / volatility
This is the first major step inside the AMA calculation.
The script compares two quantities.
change measures the net directional move from the current price back to the price lengthER bars ago.
volatility measures the total path traveled during that same interval by summing all absolute bar to bar changes.
The Efficiency Ratio is then:
ER = change / volatility
If price moved smoothly in one direction, net change will be large relative to total movement, and ER will be high. If price moved in a noisy back and forth way, total movement will be large but net change will be smaller, so ER will be low.
This ratio tells the AMA how efficiently price has been moving, which directly controls how responsive the adaptive average should become.
3) Building the Adaptive Smoothing Constant
float fastest = 2.0 / (fastLen + 1)
float slowest = 2.0 / (slowLen + 1)
float sc = math.pow(ER * (fastest - slowest) + slowest, 2)
This block converts the Efficiency Ratio into a smoothing constant.
First, the script computes the EMA style constants for the chosen fast and slow lengths. Then it blends between them using ER. When ER is high, the result moves closer to the fast setting. When ER is low, the result stays closer to the slow setting.
Finally, the blended value is squared. This is a classic AMA technique that makes the adaptive response more sensitive to efficiency changes.
So the smoothing constant automatically shifts between fast and slow behavior depending on market structure.
4) Updating the Adaptive Moving Average
this.value_prev := this.value
float prevAma = na(this.value_prev) ? src : this.value_prev
this.value := prevAma + sc * (src - prevAma)
This is the actual AMA update formula.
The script first stores the previous AMA value. If no previous value exists yet, it uses the current source as the starting point.
Then it updates the average using:
new AMA = previous AMA + smoothing constant × (source minus previous AMA)
So the adaptive average moves toward price, but the speed of that movement depends entirely on the previously calculated smoothing constant.
When the market is efficient, the average reacts more quickly. When the market is noisy, it reacts more slowly.
5) Computing Velocity
this.velocity := this.value - prevAma
This single line is the core of the oscillator.
Velocity here is simply the difference between the current AMA value and the previous AMA value.
If the adaptive average is rising, velocity is positive.
If the adaptive average is falling, velocity is negative.
If the adaptive average is barely moving, velocity stays close to zero.
So the oscillator is not measuring price change directly. It is measuring the momentum of the adaptive baseline itself.
6) Creating the Dynamic Filter Band
float amaGlobalSeries = amaObj.value
float sigma = ta.stdev(amaGlobalSeries, n)
amaObj.filterBand := gamma * sigma
After the AMA is calculated, the script builds a dynamic filter threshold from its standard deviation.
sigma measures how much the AMA has been varying over the selected period.
That value is then scaled by gamma to create the final filter band.
So the band expands when the adaptive average becomes more variable and contracts when the average becomes quieter.
This creates a context aware threshold that helps separate meaningful momentum movement from smaller background fluctuations.
7) Regular Band and Extreme Band
float currentVelocity = amaObj.velocity
float currentFilter = amaObj.filterBand
float extremeBand = currentFilter * extMulti
This block prepares the two signal thresholds used later.
currentFilter is the normal band.
extremeBand is a larger band created by multiplying the normal band by the user selected extreme multiplier.
So the script supports two layers of selectivity:
a regular threshold for Standard mode,
and a deeper threshold for Extreme Reversal mode.
8) Raw Signal Logic
bool rawBullSignal = sigMode == "Standard" ? ta.crossover(currentVelocity, -currentFilter) : ta.crossover(currentVelocity, -extremeBand)
bool rawBearSignal = sigMode == "Standard" ? ta.crossunder(currentVelocity, currentFilter) : ta.crossunder(currentVelocity, extremeBand)
This is the primary signal engine.
In Standard mode:
a bullish signal appears when velocity crosses upward through the negative regular filter level.
a bearish signal appears when velocity crosses downward through the positive regular filter level.
In Extreme Reversal mode:
a bullish signal requires velocity to recover upward through the deeper negative extreme band.
a bearish signal requires velocity to fall downward through the deeper positive extreme band.
The important idea is that signals are not based on zero line crosses alone. They are based on velocity reentering from stretched territory. That makes the logic more reversal oriented than a simple trend flip model.
9) Optional Price Confirmation
if reqPriceConf
rawBullSignal := rawBullSignal and close > open
rawBearSignal := rawBearSignal and close < open
This block adds an extra candle structure filter.
If price confirmation is enabled:
bullish signals are only allowed when the bar closes above its open.
bearish signals are only allowed when the bar closes below its open.
This can help reduce signals that occur mathematically in the oscillator but do not have supportive price behavior on the actual candle.
So the oscillator can be used either in pure indicator form or with a stricter candle aligned confirmation layer.
10) Cooldown Filter Logic
method filterSignal(array arr, bool cond, int waitBars) =>
bool isValid = false
if cond
int lastSignalBar = arr.size() > 0 ? arr.get(0) : -waitBars - 1
if (bar_index - lastSignalBar) >= waitBars
isValid := true
arr.unshift(bar_index)
if arr.size() > 2
arr.pop()
isValid
This method prevents signals from firing too frequently.
When a new raw signal appears, the script looks at the most recent stored signal bar for that direction. If enough bars have passed since the previous signal, the new one is accepted. Otherwise it is ignored.
The accepted signal bar index is then stored at the front of the array. Only a small recent history is kept.
So this method acts as a timing gate that stops repetitive same side signals during choppy conditions.
11) Final Signal Construction
var array lastBull = array.new()
var array lastBear = array.new()
bool finalBullSignal = lastBull.filterSignal(rawBullSignal, cooldown)
bool finalBearSignal = lastBear.filterSignal(rawBearSignal, cooldown)
This is where raw signals become final trade style signals.
Bullish signals are passed through the bullish cooldown array.
Bearish signals are passed through the bearish cooldown array.
That means buy and sell signals are filtered independently. A recent bullish signal only blocks another bullish signal, and a recent bearish signal only blocks another bearish signal.
So the script maintains clean directional spacing for both sides.
12) Histogram Coloring Logic
color histColor = currentVelocity > currentFilter ? color.new(colorUp, 20) :
currentVelocity < -currentFilter ? color.new(colorDn, 20) :
currentVelocity > 0 ? color.new(colorUp, 70) :
color.new(colorDn, 70)
This block assigns visual meaning to oscillator strength.
If velocity is above the upper regular filter, the histogram uses a stronger bullish color.
If velocity is below the lower regular filter, it uses a stronger bearish color.
If velocity is still positive but inside the filter region, it uses a softer bullish color.
If velocity is negative but inside the filter region, it uses a softer bearish color.
So the color logic tells the user both direction and intensity at the same time.
13) Drawing the Filter Bands
plot(currentFilter, "Upper Filter Band", color=color.new(colorDn, 40), linewidth=1, style=plot.style_line)
plot(-currentFilter, "Lower Filter Band", color=color.new(colorUp, 40), linewidth=1, style=plot.style_line)
plot(extremeBand, "Upper Extreme Band", color=color.new(colorDn, 60), linewidth=1, style=plot.style_line, display=sigMode == "Extreme Reversal" ? display.all : display.none)
plot(-extremeBand, "Lower Extreme Band", color=color.new(colorUp, 60), linewidth=1, style=plot.style_line, display=sigMode == "Extreme Reversal" ? display.all : display.none)
These plots create the visual threshold system.
The regular upper and lower filter bands are always shown.
The wider extreme bands are shown only when Extreme Reversal mode is selected.
This makes it easy to see whether current velocity is operating inside the neutral zone, beyond the regular band, or at deeper stretch levels.
14) Filling the Neutral Filter Region
p_upper = plot(currentFilter, display=display.none)
p_lower = plot(-currentFilter, display=display.none)
fill(p_upper, p_lower, color=color.new(colorNeu, 95), title="Filter Band Fill")
This block shades the area between the upper and lower regular filter bands.
The filled zone visually represents the neutral or lower conviction region. When velocity remains inside this zone, momentum is more muted relative to recent adaptive average behavior.
So the fill acts as a quick background cue for whether velocity is still inside normal fluctuation territory.
15) Plotting Velocity as Histogram and Line
plot(currentVelocity, "AMA Velocity", color=histColor, style=plot.style_columns)
plot(currentVelocity, "Velocity Line", color=histColor, linewidth=2)
The same velocity value is drawn in two forms.
The column plot gives a strong histogram style momentum read.
The line plot overlays the same data as a smoother continuous path.
Using both together makes the oscillator easier to read because the columns highlight amplitude while the line emphasizes turning points and transitions.
16) Signal Label Placement
if finalBullSignal
label.new(x=bar_index, y=math.min(0, currentVelocity) - math.abs(sigMode == "Extreme Reversal" ? extremeBand : currentFilter) - (math.abs(currentFilter) * 1.5),
text="▲ BUY",
color=color.new(color.white, 100),
textcolor=colorUp,
style=label.style_none,
size=size.small)
if finalBearSignal
label.new(x=bar_index, y=math.max(0, currentVelocity) + math.abs(sigMode == "Extreme Reversal" ? extremeBand : currentFilter) + (math.abs(currentFilter) * 1.5),
text="SELL ▼",
color=color.new(color.white, 100),
textcolor=colorDn,
style=label.style_none,
size=size.small)
These blocks place the signal labels outside the oscillator body rather than directly on top of the bars.
For bullish signals, the label is positioned below the relevant lower threshold area.
For bearish signals, the label is positioned above the relevant upper threshold area.
This helps keep the chart readable and visually separates the signal from the oscillator itself.
17) Alert Conditions
alertcondition(finalBullSignal, "Buy Signal", "AMA Velocity Buy Signal")
alertcondition(finalBearSignal, "Sell Signal", "AMA Velocity Sell Signal")
bool posTrend = ta.crossover(currentVelocity, 0)
bool negTrend = ta.crossunder(currentVelocity, 0)
alertcondition(posTrend, "Positive Trend", "AMA Velocity crossed above zero")
alertcondition(negTrend, "Negative Trend", "AMA Velocity crossed below zero")
The script provides four alert types.
The first two alert on final buy and sell signals after all filters and cooldown checks are applied.
The second two alert when velocity crosses the zero line, which can be interpreted as broader momentum regime shifts.
So the indicator supports both reversal style event monitoring and general trend transition monitoring. Indicator

Fractal Retracement [Jamallo](2025)
Intro
FRAMA is a moving average that adapts its speed based on fractal geometry — specifically, the fractal dimension (D) of recent price action. When price is trending strongly (low fractal dimension), it moves fast. When price is choppy/ranging (high fractal dimension), it slows down. This makes it far more responsive than a standard EMA or SMA.
Breakdown:
The indicator wraps this with a continuous range logic layer: the filtered line = k only moves if price breaks beyond the FRAMA ± ATR-based range, creating a stepped/ratcheting effect that filters out noise.
Two sets of bands are plotted around the filtered line, scaled by ATR multiplied by user-defined multipliers (tight at 0.5×, medium at 1.0×). They're smoothed with a short EMA to reduce jitter, and filled with gradient colors for visual clarity.
Direction is simply determined by whether k is rising or falling, and colors everything green (uptrend) or pink/red (downtrend).
END
In short, it's a noise-filtered trend indicator useful for identifying trend direction, dynamic support/resistance , and gauging how far price has retraced from the trend baseline. Indicator

Indicator

Indicator

Indicator

Adaptive Quasimodo + Confluence Engine - PhenLabs📊Quasimodo Pattern (QM) Detector - PhenLabs
Recognizing reversal patterns like the Quasimodo can be challenging and time-consuming, requiring a keen eye for specific market structures. Missing a key swing point or misinterpreting a retracement can lead to missed opportunities or false signals. This indicator automates the precise identification of Quasimodo patterns, providing clear, actionable signals directly on your chart, so you can focus on execution.
🚨OVERVIEW🚨
The Quasimodo Pattern (QM) Detector is an advanced, non-repainting indicator designed to automatically spot high-probability bullish and bearish Quasimodo reversal patterns. It integrates customizable swing point detection, confluence filters (Higher Timeframe trend and volume confirmation), and precise entry, stop-loss, and take-profit calculations directly from the pattern’s structure. Get automated alerts and a real-time dashboard to enhance your pattern-based trading strategy.
🔷 WHAT IS A QUASIMODO (QM) PATTERN?
The Quasimodo pattern is a powerful reversal formation characterized by a specific sequence of price action:
Bearish QM: A Higher High (HH) is followed by a Lower Low (LL), then a Higher High (HH), and finally a Lower Low (LL). The pattern suggests a reversal from an uptrend to a downtrend, often at the level of the previous Higher High.
Bullish QM: A Lower Low (LL) is followed by a Higher High (HH), then a Lower Low (LL), and finally a Higher High (HH). This suggests a reversal from a downtrend to an uptrend, often at the level of the previous Lower Low.
It’s a cousin to the Head & Shoulders pattern but with a distinct structure focused on specific swing points.
🔶 KEY FEATURES
Automated QM Detection: Accurately identifies both bullish and bearish Quasimodo patterns as they form on any timeframe.
Customizable Swing Points: Define how swing highs and lows are detected, choosing between using wick extremes or candle bodies.
Confluence Filters: Incorporates a Higher Timeframe (HTF) Trend filter to confirm pattern alignment using a non-repainting EMA, and a Volume Confirmation filter to validate patterns with significant volume spikes at key structural points.
Dynamic Trade Planning: Automatically calculates suggested Entry, Stop Loss, and Take Profit levels based on the detected QM structure and your desired Risk-to-Reward ratio.
Non-Repainting Logic: All detected patterns and signals are permanent and do not shift or disappear on subsequent bars.
Informative Dashboard: Provides a real-time summary of HTF trend, volume confirmation, and the last detected QM.
Visual Clarity: Plots QM lines, potential entry/SL/TP zones, and clear labels for pattern identification.
Alerts: Customizable alerts for new QM patterns and when price enters the suggested entry zone.
⚙️ SETTINGS GUIDE
Pattern Recognition: Adjust settings like Use Wick As Extremes (for swing points), Swing Lookback (how many bars to scan for swings), Min Head Height/Right Shoulder Depth Factor (magnitude requirements), Strict Higher/Lower High/Low (stricter swing definitions), and Max RSL/RSH Bars (time limit for right shoulder formation).
Trade Management: Configure Entry/SL/TP Offset % to fine-tune entry, stop-loss, and take-profit levels as a percentage buffer, and set your Desired Risk:Reward ratio for calculating Take Profit.
Confluence Filters: Enable or disable Use HTF Confirmation and Use Volume Confirmation . For HTF, set HTF Timeframe and EMA Length . For Volume, adjust Volume Lookback and Multiplier .
Visual Settings: Toggles are available for showing QM lines, entry/SL/TP zones, alerts, and dashboard position.
📈 TRADING WORKFLOW
Identify: Wait for a Bullish or Bearish QM pattern to be detected and labeled on your chart.
Confirm: Check the dashboard and pattern details. Ensure the HTF trend and Volume confirmation are aligned with the pattern’s direction (e.g., Bullish QM + Bullish HTF).
Enter: Wait for price to retest the suggested entry zone. The indicator plots these zones for you.
Manage: Use the automatically calculated Stop Loss and Take Profit levels, adjusting them as needed based on market context and your risk management strategy.
Alerts: Set up alerts to be notified immediately when a QM pattern is found or when price enters an entry zone.
⚠️ RISK DISCLAIMER
Trading involves substantial risk, and past performance is not indicative of future results. The Quasimodo Pattern Detector is a tool to assist in identifying potential trade setups but does not guarantee profitability. Always conduct your own analysis and implement proper risk management.
Does it repaint?
No. This indicator is coded with non-repainting logic. Once a pattern is confirmed and a signal is generated on a closed bar, it will remain on your chart permanently. The Higher Timeframe trend filter also uses a non-repainting method. Indicator

Machine Learning PSAR [BOSWaves]Machine Learning PSAR - Adaptive Parabolic Stop and Reverse with K-Means Regime Detection and KNN Signal Validation
Overview
Machine Learning PSAR is a regime-aware trend reversal system that tracks directional price movement through an adaptive Parabolic SAR, where acceleration parameters dynamically adjust based on market regime classification and each reversal signal is validated against historically similar setups using a K-Nearest Neighbors scoring model.
Instead of relying on fixed acceleration factors or unfiltered SAR flips, trend state, parameter scaling, and signal confidence are determined through K-Means flip-frequency clustering, KNN outcome weighting, and Kalman-filtered output smoothing that maintains visual clarity without sacrificing reversal responsiveness.
This creates a SAR system that reflects actual market conditions rather than applying the same parameters regardless of context - tightening in trending environments where acceleration should build quickly, relaxing in choppy conditions where early flips are noise, and scoring every reversal against the historical record so confidence is quantified rather than assumed.
Price is therefore evaluated relative to a SAR that adapts to regime dynamics and historically validated reversal patterns rather than conventional fixed-parameter parabolic logic.
Conceptual Framework
Machine Learning PSAR is founded on the principle that meaningful reversal signals emerge when the SAR acceleration factor is calibrated to current market conditions, and when each flip is cross-referenced against similar historical flips to assess its probability of success.
Traditional PSAR implementations use fixed start, increment, and maximum AF values that ignore whether the market is trending or ranging. This framework replaces static acceleration logic with regime-driven parameter adaptation informed by flip frequency clustering, then layers a KNN validation pass on top to score each signal before it is presented.
Three core principles guide the design:
Acceleration factor behavior should adapt to the detected market regime, becoming more aggressive during trending conditions and more conservative during choppy ones.
Every SAR flip should be scored against historically similar setups so confidence is expressed as a quantified probability rather than a binary signal.
The displayed SAR line should be smooth enough for clean visual interpretation while remaining responsive enough that reversals are never delayed.
This shifts SAR analysis from a fixed-parameter trailing stop into an adaptive, regime-anchored reversal system with integrated signal confidence measurement.
Theoretical Foundation
The indicator combines classical Parabolic SAR logic, K-Means-inspired regime classification, K-Nearest Neighbors outcome scoring, exponential AF smoothing, and Kalman filter output processing.
Flip frequency over a configurable training period provides the feature for regime classification, with centroid distances determining whether the market is trending, neutral, or choppy. KNN validation uses a five-dimensional feature vector at each flip — prior trend duration, bars since last flip, AF at flip, flip frequency, and EP progress — to find the most similar historical flips and weight their outcomes by proximity. The Kalman filter then smooths the final SAR output while snapping to new values instantly on every reversal.
Four internal systems operate in tandem:
Adaptive PSAR Engine : Computes classical parabolic SAR with optional AF smoothing and minimum bars filter to suppress whipsaw flips.
K-Means Regime Classifier : Measures flip frequency relative to its historical range, assigns the current bar to the nearest of three regime centroids, and adjusts AF start, increment, and maximum accordingly.
KNN Signal Validator : On each flip, searches historical flips for the k most similar setups by Euclidean distance, computes an inverse-distance-weighted confidence score, and filters low-confidence signals from high-confidence alerts.
Kalman Smoothing Layer : Applies a recursive Kalman filter to the SAR output for display, balancing smoothness with responsiveness and resetting on every reversal so flips are never visually delayed.
This design allows reversal signals to reflect actual market behavior and historical precedent rather than reacting mechanically to fixed acceleration rules.
How It Works
Machine Learning PSAR evaluates price through a sequence of regime-aware and historically-validated processes:
PSAR Initialization : Classical parabolic SAR begins with base AF start value, tracking EP and advancing the stop in the trend direction.
AF Smoothing : Instead of stepping AF in discrete increments, exponential smoothing ramps it gradually toward the target, producing a more fluid SAR trajectory.
Minimum Bars Filter : Trend must persist for a configurable minimum number of bars before a flip is allowed, preventing immediate whipsaw reversals.
Flip Detection : Price crossing the SAR triggers a raw flip, resetting AF, capturing the new EP, and recording trend duration and context features.
Flip Frequency Measurement : Rolling count of flips over the training period, normalized to its historical range, provides the regime classification feature.
Regime Assignment : Flip frequency is compared against three percentile-anchored centroids; the nearest centroid determines whether the market is choppy, neutral, or trending.
Parameter Adaptation : Regime assignment scales AF start, increment, and maximum — reducing them in choppy conditions to slow the SAR, increasing them in trending conditions to accelerate it.
KNN Feature Construction : At each flip, a five-dimensional vector is built from current context and compared against all historical flips of the same direction within the lookback window.
Neighbor Scoring : The k closest historical flips by Euclidean distance are retrieved; each is weighted by inverse distance and its five-bar forward outcome determines a weighted success rate.
Confidence Assignment : Weighted success rate expressed as a 0–100% confidence score, with flips below the minimum threshold classified as low-confidence.
Kalman Filtering : SAR value is passed through a Kalman filter for display smoothing, with process and measurement noise configurable; filter snaps to new SAR position on every flip.
Confidence Fill : Fill opacity between SAR and price anchor reflects current confidence score — denser fill indicates higher conviction in the active trend.
Together, these elements form a continuously updating reversal framework anchored in regime awareness and historically validated signal quality.
Interpretation
Machine Learning PSAR should be interpreted as a confidence-weighted trend reversal system with regime-adaptive sensitivity:
Bullish State (Blue) : Established when price closes above the SAR after a validated bullish flip, with SAR acting as a dynamic trailing support level below price.
Bearish State (Red) : Established when price closes below the SAR after a validated bearish flip, with SAR acting as a dynamic trailing resistance level above price.
Confidence Fill : Gradient zone between SAR and price reflects KNN confidence — vivid, dense fill indicates high historical precedent for the current flip; faint fill indicates low confidence.
Confidence Score Labels : Percentage label at each flip displays the KNN confidence score. Green (70%+) indicates strong historical backing; orange (50–69%) indicates moderate backing; red (below 50%) indicates low historical support.
Regime Labels : Numbers displayed alongside the SAR indicate current market regime — 3 for trending, 2 for neutral, 1 for choppy — reflecting the K-Means classifier output in real time.
High-Confidence Flips : Flips meeting or exceeding the minimum confidence threshold trigger alerts and represent the primary actionable signals.
Low-Confidence Flips : Flips below the confidence threshold are still displayed but excluded from high-confidence alerts, flagging setups with weak historical precedent.
Regime classification, KNN confidence, and Kalman-smoothed SAR position together outweigh any isolated price movement against the stop.
Signal Logic & Visual Cues
Machine Learning PSAR presents two primary signal categories:
High-Confidence Flip : SAR reversal with KNN score at or above the minimum confidence threshold. These represent setups where historically similar conditions produced successful reversals at a statistically meaningful rate and form the basis for alert-driven systematic monitoring.
Low-Confidence Flip : SAR reversal with KNN score below the minimum confidence threshold. The signal is displayed for awareness but is not included in high-confidence alert conditions, reflecting limited historical precedent.
Regime labels provide continuous market context between flips, allowing real-time awareness of whether the K-Means system is operating in a trending, neutral, or choppy environment. Confidence fill intensity provides a passive, non-disruptive view of trend conviction without requiring active label reading.
Alert generation covers high-confidence bullish and bearish flips, separately triggerable 70%+ confidence signals, and regime transition events for systematic monitoring of market state changes.
Strategy Integration
Machine Learning PSAR fits within adaptive trend-following and signal-quality-filtered reversal approaches:
Confidence-Gated Entries : Enter reversals only on high-confidence flips, using the minimum confidence threshold as a quality gate that filters historically weak setups.
Regime-Aware Sizing : Increase position sizing during trending regime (label 3) where the K-Means system detects low flip frequency and sustained directional conviction.
Choppy Market Avoidance : Reduce or pause activity during choppy regime (label 1) where frequent flips indicate low directional conviction and elevated whipsaw risk.
SAR as Stop Placement : Use the Kalman-smoothed SAR as a trailing stop reference — exit longs when price closes below the bullish SAR, exit shorts when price closes above the bearish SAR.
Confidence Fill Monitoring : Use fill intensity as a passive conviction gauge — fading fill during an active trend may indicate the next flip is likely to be lower confidence.
Multi-Timeframe Regime Alignment : Apply higher-timeframe regime label as a directional filter, entering signals only when the regime aligns across timeframes.
Alert-Based Systematic Monitoring : Configure high-confidence and regime-change alerts for systematic notification without requiring active chart monitoring.
Technical Implementation Details
Core Engine : Classical Parabolic SAR with configurable base AF start, increment, and maximum, optional exponential AF smoothing, and minimum bars flip filter
Regime Model : Flip frequency normalized to training-period range with three percentile-anchored centroids (choppy, neutral, trending) and nearest-centroid assignment
KNN Validator : Five-dimensional feature vector with configurable k and lookback, inverse-distance weighting, and five-bar forward outcome labeling
Smoothing Layer : Kalman filter with configurable process and measurement noise, hard snap to SAR on every flip to preserve reversal timing
Visualization : Dual-plot SAR circles with confidence-opacity fill, percentage confidence labels, every-other-bar regime labels
Signal Logic : High/low confidence classification with configurable minimum threshold, raw flip detection decoupled from display
Performance Profile : Optimized for real-time execution across all timeframes with efficient array-based KNN search and FIFO distance sorting
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Scalping with tighter AF values, shorter KNN lookback, and lower minimum confidence threshold
15 - 60 min : Intraday trend following with balanced regime sensitivity and moderate confidence filtering
4H - Daily : Swing and position trading with wider AF maximum, longer training period, and higher confidence threshold
Suggested Baseline Configuration:
Base AF Start : 0.02
Base AF Increment : 0.02
Base AF Maximum : 0.10
Training Data Period : 100
Choppy Regime Percentile : 0.75
Trending Regime Percentile : 0.25
K - Number of Neighbors : 8
Historical Lookback Period : 200
Minimum Confidence Filter : 15%
AF Smoothing Factor : 0.01
Kalman Process Noise : 0.015
Kalman Measurement Noise : 0.5
Minimum Bars Before Flip : 3
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, trending characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too many flips in ranging markets : Increase Minimum Bars Before Flip to require longer trend duration before a reversal is allowed, or increase Base AF Maximum to widen the SAR distance.
SAR too slow to reverse : Decrease Base AF Start and increase Base AF Increment so the acceleration factor builds more quickly during new trends.
Excessive low-confidence signals : Increase Minimum Confidence Filter to raise the threshold for high-confidence classification, focusing only on the strongest historical precedents.
KNN scores feel unstable : Increase K - Number of Neighbors to average over more historical examples, smoothing out per-flip score variance.
Regime changing too rapidly : Increase Training Data Period to smooth regime classification over a longer flip-frequency history.
Regime too slow to update : Decrease Training Data Period for more responsive regime detection that reacts faster to market character shifts.
SAR line too jumpy visually : Increase Kalman Measurement Noise for more aggressive smoothing, or decrease Kalman Process Noise to make the filter trust its own estimate more.
Kalman lagging reversals : Decrease Kalman Measurement Noise or increase Kalman Process Noise to make the filter more responsive to SAR changes between flips.
AF ramping too abruptly : Decrease AF Smoothing Factor toward 0.01 for a more gradual exponential ramp from start to target AF on each new trend.
Adjustments should be incremental and evaluated across multiple market sessions rather than isolated conditions.
Performance Characteristics
High Effectiveness:
Trending markets with sustained directional conviction where flip frequency remains low and regime classification stabilizes at label 3
Instruments with consistent volatility where ATR-normalized KNN features generalize well across historical flips
Momentum continuation strategies using SAR as a trailing stop with confidence-filtered entries at reversals
Systematic approaches benefiting from quantified signal confidence and regime-based parameter adaptation
Multi-timeframe frameworks where regime labels provide higher-timeframe directional context for lower-timeframe entries
Reduced Effectiveness:
Choppy, range-bound markets with high flip frequency causing frequent low-confidence signals and regime label 1 classification
Extremely thin historical data environments where the KNN lookback contains insufficient comparable flips for reliable scoring
News-driven or gapped markets where discrete price discontinuities bypass SAR logic and invalidate ATR-normalized tension features
Very low volatility instruments where ATR scaling compresses feature vectors and reduces KNN discriminative power
Consolidation phases where mean-reversion dominance causes repeated SAR whipsaws regardless of minimum bars filtering
Integration Guidelines
Confluence : Combine with BOSWaves volume analysis, structure detection, or supply and demand zone identification for multi-factor confirmation
SAR Respect : Honor the trailing SAR as the primary risk boundary — avoid holding positions against the active stop regardless of confidence score
Confidence Awareness : Treat confidence scores as probabilistic context, not certainty — high scores improve odds but do not guarantee outcome
Regime Discipline : Reduce activity during persistent choppy regime classification rather than fighting repeated low-confidence flips
Alert Utilization : Configure high-confidence and regime-change alerts to enable systematic monitoring without requiring active chart observation
Lookback Sufficiency : Ensure sufficient historical bars are loaded for the KNN lookback period before relying on confidence scores, particularly on shorter timeframes
Multi-Timeframe Alignment : Use higher timeframe regime label and trend direction as a filter for lower timeframe flip entries to ensure directional confluence
Disclaimer
Machine Learning PSAR is a professional-grade adaptive reversal and trend-following tool. It uses K-Means regime classification and KNN signal validation to adapt classical Parabolic SAR behavior to current market conditions but does not predict future price movements. Results depend on market conditions, volatility characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management. Indicator

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

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

Mean Deviation Trend [BackQuant]Mean Deviation Trend
Overview
Mean Deviation Trend is a structure-based trend and regime indicator that measures directional pressure as the market’s sustained deviation from a moving “mean,” then uses that pressure to drive an adaptive band , dynamic coloring, and a level engine that marks deviation peak extremes after momentum fades.
Most trend tools start with direction, for example slope or MA cross, then try to estimate strength later. This script does the reverse:
It first quantifies how far price is displaced from a central mean in volatility-adjusted units .
It then smooths and accumulates that deviation to determine trend direction and conviction .
Finally it converts conviction into a band that tightens when pressure is strong and widens when pressure is weak.
The result is a single framework that blends:
A mean anchor (EMA).
A signed deviation engine normalized by ATR.
A conviction score based on sustained deviation.
An adaptive band that behaves like dynamic support/resistance.
A “deviation peak” level system that plants levels at extremes after the push fades.
Optional glow, fills, candle coloring, and flip markers.
Core concept: deviation from mean as trend fuel
A trend is not just “price up” or “price down.” A trend is a persistent imbalance where price spends time displaced from fair value and keeps re-asserting that displacement. This indicator treats the mean as a moving fair value proxy, and it measures how aggressively price is departing from it.
Key idea:
If price stays above the mean and that displacement is sustained, bullish pressure is dominant.
If price stays below the mean and that displacement is sustained, bearish pressure is dominant.
If price keeps snapping back and deviation cannot sustain, regime is weak and uncertainty is high.
This is why the script doesn’t rely on a single moment like a cross. It cares about persistence .
Mean anchor (the “center of gravity”)
The mean is defined as an EMA of close:
mean = EMA(close, meanLen)
Why EMA:
It responds faster than SMA to regime changes.
It provides a stable anchor without overreacting to single bars.
The mean line is not just a moving average here, it is the reference line that deviation is measured against. Everything downstream depends on the mean being a consistent “center.”
Volatility normalization (why ATR is essential here)
Raw distance from mean is meaningless across volatility regimes. A $200 deviation on BTC might be noise one week and huge another week. To fix this, the script normalizes deviation by ATR:
atr = ATR(14)
rawDev = (close - mean) / atr
Interpretation:
rawDev is “how many ATR units price is away from the mean.”
This makes deviation comparable across timeframes and volatility states.
This is critical because it turns the indicator into a dimensionless pressure metric rather than a price-distance tool.
Deviation smoothing (instantaneous pressure vs noisy pressure)
Instantaneous deviation can spike on one candle and mean nothing. So the script applies EMA smoothing to raw deviation:
devSmooth = EMA(rawDev, devLen)
What this does:
Reduces single-bar spikes.
Keeps the sign and general magnitude of displacement.
Creates a cleaner “pressure line” that responds but does not jitter.
This is the first stage of filtering: “Are we meaningfully deviating, or just wicking?”
Deviation accumulation (turning pressure into conviction)
This is the part that makes the indicator behave like a trend conviction model rather than a simple oscillator.
The script computes:
cumDev = SMA(devSmooth, devAccum)
Even though it’s coded as an SMA, conceptually it behaves like a rolling accumulation of the deviation signal:
If devSmooth stays positive for multiple bars, cumDev rises and stays positive.
If devSmooth stays negative for multiple bars, cumDev drops and stays negative.
If devSmooth flips sign repeatedly, cumDev compresses toward zero.
This is the key “persistence detector.” It converts short-term deviation into a medium-term conviction read.
Trend direction and flips
Trend direction is derived purely from the sign of cumulative deviation:
tDir = cumDev > 0 ? +1 : -1
flip = tDir != tDir
Interpretation:
Bull regime means the market’s sustained deviation is above the mean (pressure up).
Bear regime means sustained deviation is below the mean (pressure down).
A flip marks a regime transition where the sustained bias changes sign.
This is intentionally simple because all the complexity is in how cumDev is built.
Measuring conviction: devNorm (adaptive strength scale)
The script measures absolute conviction:
devAbs = abs(cumDev)
Then it normalizes it relative to a rolling peak:
devHigh = highest(devAbs, 80)
devNorm = devHigh > 0 ? min(devAbs / devHigh, 1) : 0
Meaning:
devNorm is a 0..1 strength scale.
0 means current conviction is tiny relative to recent extremes.
1 means conviction is at the strongest level seen in the last ~80 bars.
This is not a z-score, it’s a “relative-to-recent-peak” normalization. That matters because it makes the band behavior adapt to each instrument’s recent character, not a fixed threshold system.
Adaptive band logic (tight when confident, wide when uncertain)
The band is built to behave differently depending on conviction. When conviction is strong, the band should hug price and act like a close structural guide. When conviction is weak, the band should widen and stop pretending it is precise.
This is done by interpolating between two ATR multipliers:
bandTight = ATR multiplier when devNorm is high
bandWide = ATR multiplier when devNorm is low
bandMult = bandWide - devNorm * (bandWide - bandTight)
bandW = atr * bandMult
Interpretation:
devNorm near 1 → bandMult approaches bandTight → band width shrinks.
devNorm near 0 → bandMult approaches bandWide → band width expands.
So the band width is not arbitrary. It is a direct function of trend conviction.
Active band placement (trend-aware support/resistance)
The “active band” is placed on the opposite side of the mean depending on direction:
If bullish: activeBand = mean - bandW
If bearish: activeBand = mean + bandW
So in bullish regimes, the band behaves like a dynamic support zone beneath the mean. In bearish regimes, it behaves like dynamic resistance above the mean.
Then it is smoothed:
activeBand = EMA(activeBand, 3)
This prevents the band from stepping too harshly when ATR shifts.
Outer band (secondary structure reference)
A second band is created at half width on the opposite side:
bull: outerBand = mean + bandW * 0.5
bear: outerBand = mean - bandW * 0.5
Then smoothed again. This outer line is not the main “stop band,” it is more of an additional structure marker to show where the mean plus/minus partial deviation zone sits. It can help visually gauge whether price is extended relative to the mean structure while still in the same regime.
Color system (strength-aware gradient)
The trend color is not binary. It is strength-weighted:
If bullish, devNorm drives a gradient from a faint bull tint to full bull.
If bearish, devNorm drives a gradient from a faint bear tint to full bear.
This gives you an immediate read:
Bright strong color = conviction high.
Faded color = conviction low, regime fragile.
It also ties into the glow and fill so the whole visual language matches the same underlying “pressure” variable.
Deviation peak level engine (how the script plants levels)
This indicator includes a separate mechanism that marks important extremes after a strong deviation push fades. The idea is:
When trend pressure peaks and then collapses, the extreme price printed at peak deviation often becomes a reaction level later.
This is similar in spirit to:
exhaustion extremes,
climactic deviation points,
distribution/accumulation turning zones,
but the script formalizes it using the deviation engine.
1) Track the strongest deviation peak
The script stores a running peak:
peakDev: maximum devAbs seen since last reset
peakPrice: the extreme price at that peak (high for bull, low for bear)
peakDir: direction at peak
peakBar: bar index of peak
When devAbs prints a new high, it updates those values.
2) Define “fade” (momentum has cooled)
A fade event triggers when:
peakDev is meaningfully large (peakDev > 0.3)
current devAbs drops below a fraction of the peak: devAbs < peakDev * fadeThr
fadeThr is the key user control. Lower fadeThr requires a deeper drop from peak before planting a level.
What “fade” means in practice:
A strong push happened (deviation expanded).
That push is no longer active (deviation contracted).
So the extreme created during the push is now “locked in” as a candidate level.
3) Plant a level at the extreme
When faded:
A dashed horizontal line is created at peakPrice.
The line is projected forward (bar_index + 60).
It is stored in an array with direction and retest state.
It also respects maxLvls by deleting the oldest levels to avoid clutter.
4) Maintain levels and delete invalid ones
Each bar, levels are checked:
If price breaks far beyond the level (by about 2 ATR in the wrong direction), the level is deleted.
That “broken” rule is a pragmatic invalidation filter. If price rips through a former deviation extreme by a large margin, the level is no longer acting like a meaningful reaction zone.
5) Detect retests and mark them
A retest is detected when:
close is within ~0.25 ATR of the level,
and two bars ago price was not near it (distance > 0.5 ATR),
and the level hasn’t already been marked as retested.
When that happens:
A diamond marker is printed (◆) above or below depending on approach.
The level is flagged as retested so it won’t spam markers.
So levels are not just static drawings. They have state: naked vs retested, and they get culled if invalidated.
Glow system (volatility-scaled aesthetic, strength-scaled intensity)
Glow is not random decoration here. Its width scales with devNorm:
glowMult = 0.4 + devNorm * 1.2
glowW = atr * 0.08 * glowMult
So in strong trends:
Glow band expands.
The mean core visually “radiates” more.
In weak trends:
Glow shrinks and becomes less prominent.
The glow is built using multiple invisible plots above and below the mean, then layered fills with different transparencies. It creates a soft gradient aura around the mean that encodes strength.
Band fill and line break behavior
The active band is plotted with plot.style_linebr and forced to break on flips:
bandBrk = flip ? na : activeBand
This prevents the band from drawing a misleading connecting line across a regime change. It visually resets when direction flips, which matters because the band swaps sides of the mean when regime changes.
Fill is drawn between:
the active band line
and hl2 (mid-price reference)
So you get a shaded zone that reflects the current regime color and strength.
Candles and flip labels
Candles can be colored by the same strength-weighted regime color, which makes the entire chart consistent.
On flips:
Bull flip prints ▲ at the low.
Bear flip prints ▼ at the high.
These are regime markers, not “entry signals” by default. They simply identify when the cumulative deviation sign changed.
How to read this indicator in practice
1) Regime and conviction
Direction comes from cumDev sign.
Conviction comes from devNorm intensity.
Bright color + stable band on one side means strong sustained pressure.
Faded color + widening band means weak sustained pressure and higher uncertainty.
2) Using the active band as structure
In a bullish regime, activeBand is below mean and can behave like:
dynamic support,
risk boundary,
trend “line in the sand.”
In bearish regime, it flips above mean and acts like dynamic resistance.
Because the band widens when conviction is low, it naturally tells you “do not treat this as a tight stop zone when the trend is weak.”
3) Using deviation peak levels
Peak levels represent exhaustion extremes after a strong deviation impulse faded:
If price returns to a naked level, that area can act as a reaction zone.
Once retested, the script marks it and treats it as less “special.”
If price breaks it by a wide margin, the script removes it as invalid.
This level engine is best viewed as “structural memory of deviation events,” not generic support/resistance.
4) Extreme deviation alert
devNorm > 0.85 means the current sustained deviation is near the strongest seen recently. That’s useful for:
identifying trend climax states,
detecting when continuation is strong but risk of snapback rises,
flagging conditions where mean reversion pressure is building.
It does not guarantee reversal, it flags “stretch.”
Inputs and what they actually change
Mean Length (meanLen)
Controls the anchor responsiveness:
Lower = mean follows price more closely, deviation shrinks, more frequent flips.
Higher = mean is slower, deviation grows, trend regimes last longer.
Deviation Smoothing (devLen)
Controls how noisy the deviation signal is:
Lower = faster response, more jitter.
Higher = smoother pressure, slower flips.
Deviation Accumulation (devAccum)
Controls persistence requirement:
Lower = trend conviction reacts quickly but can whipsaw.
Higher = requires sustained deviation, fewer flips, more confirmation.
Band Tight / Band Wide
These define the band behavior range:
bandTight: how close the band gets when conviction is strong.
bandWide: how far it drifts when conviction is weak.
If you want the band to behave more like a stop guide, reduce bandWide. If you want it to act more like a regime boundary, increase bandWide.
Fade Threshold + Max Levels
These shape the level engine:
fadeThr lower = requires bigger cooling before planting levels (fewer, more meaningful).
fadeThr higher = plants levels earlier (more levels, more noise).
maxLvls controls clutter and historical depth.
Alerts (what they represent)
Dev Bull / Dev Bear: regime flips, cumulative deviation changed sign.
Dev Faded: a deviation peak cooled enough to plant a level.
Extreme Dev: sustained deviation is near local maximum, stretch condition.
Summary
Mean Deviation Trend models trend as sustained, volatility-normalized displacement from a mean rather than simple direction. It smooths and accumulates signed deviation to extract regime and conviction, then converts that conviction into an adaptive ATR band that tightens when pressure is strong and widens when pressure is weak. On top of that, it tracks deviation peak extremes and plants forward levels only after deviation fades, creating a structured map of “where trend impulses peaked” and how price reacts when those zones are revisited. Indicator

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

VTS Strategy [Quision]Overview
This strategy is built on top of BackQuant's Volatility Trend Score indicator , an open-source tool that quantifies trend persistence through a volatility-adjusted trailing structure and a rolling comparison score.
The original indicator answers a critical question: "Is the market trending with conviction, or is it chopping?" - by scoring how consistently an ATR-based trailing level advances over a configurable lookback window. This strategy wraps that core logic into a fully tradeable system with proper risk management, flexible exit modes, and session filtering.
All credit for the core indicator logic goes to BackQuant. This publication adds only the strategy execution layer.
What This Strategy Adds
1. ATR-Based Stop Loss
A dedicated ATR stop loss (independent of the indicator's core ATR) protects every trade with a volatility-scaled risk level. The SL ATR period and multiplier are fully configurable, allowing you to tune risk independently from the signal generation.
2. Risk:Reward Take Profit
The take profit is calculated as a multiple of the stop loss distance.
3. Three Exit Modes
The strategy offers three distinct exit modes to match different trading styles:
- Signal Flip Only, Exits only when the VTS score flips to the opposite regime. No SL/TP. Pure trend-following.
- SL/TP Only, Exits only when the stop loss or take profit is hit. Ignores signal flips. Pure risk management.
- Signal Flip + SL/TP, Both mechanisms are active. Maximum flexibility.
4. Optional Trailing Stop
When enabled, the trailing stop progressively tightens the stop loss as the trade moves in your favor. It only activates after the position is in profit.
5. Session Filter
Restrict trading to specific hours. Configurable timezone support (Exchange, UTC, Europe/Rome, America/New_York, Europe/London, Asia/Tokyo).
Recommended Usage
This strategy works best on instruments with clear trending behavior and sufficient volatility. The VTS core logic excels at filtering out choppy conditions, making it particularly effective on:
Crypto pairs (BTC, ETH)
Gold (XAUUSD)
Major forex pairs
Index futures
Suggested starting settings:
ATR Period: 35, Factor: 1.2
Loop: 1–45 (default)
Long Threshold: 40, Short Threshold: -10 (default)
SL ATR Period: 14, SL Multiplier: 3.0
TP R:R: 6.0
Session: adjust to your instrument's active hours
Important Notes
The core indicator logic is entirely BackQuant's work. Please refer to the original publication for detailed documentation on the scoring mechanism, tuning guidelines, and theoretical foundations.
Strategy

Indicator

Stochastic Adaptive %D [LuxAlgo]The Stochastic Adaptive %D Difference Oscillator indicator provides a sophisticated alternative to classic momentum oscillators, prioritizing a balance between high-grade smoothing and adaptive reactivity. By calculating the divergence between a pre-smoothed Stochastic %D and a specialized Adaptive %D signal line, this tool highlights momentum shifts with significantly reduced noise while maintaining the ability to react quickly to trend accelerations.
🔶 USAGE
This indicator is designed for traders who require the clarity of a smooth oscillator without the lag typically associated with heavy filtering. The "Difference Oscillator" component serves as the primary visual guide, representing the spread between momentum and its adaptive average.
🔹 Signal Generation
The indicator features three main visual components:
Standard %D Line: A dual-smoothed stochastic calculation that acts as the core momentum measure, plotted as a dotted line.
Adaptive %D Line: A reactive signal line that adjusts its smoothing alpha based on market intensity, plotted as a dashed line.
Difference Oscillator: A histogram-style fill centered at the 50 midline. This represents the momentum "delta"—when price velocity accelerates away from the adaptive baseline, the oscillator expands, providing earlier warning of trend strength or exhaustion.
When the Standard %D leads the Adaptive %D, the oscillator fills green, suggesting bullish momentum. When it lags, it fills red, suggesting bearish momentum. The expansion and contraction of this fill help identify whether a trend is gaining or losing "torque" relative to its adaptive mean.
🔶 DETAILS
The script achieves its unique balance through a specialized architectural approach that focuses on conserving smoothness while remaining reactive to volatile shifts.
🔹 Smoothness Conservation
To eliminate the "jaggedness" often found in standard Stochastics, the indicator applies a pre-smoothing filter (SMA) to the High, Low, and Close sources. This ensures that the foundation of the calculation is filtered for noise before the Stochastic formula is even applied, resulting in much cleaner oscillations.
🔹 Adaptive Reactivity
The Adaptive %D signal line employs a variable alpha smoothing mechanism. The "speed" of the signal line is dynamically linked to the position of the %D relative to the 50 midline.
Trend Extremes: As momentum reaches overbought (80) or oversold (20) zones, the alpha increases. This allows the signal line to track the %D more aggressively, capturing the peak of the move.
Mean Reversion/Ranging: Near the 50 midline, the alpha decreases, making the signal line more "stubborn" and less prone to whipsaws during low-conviction market phases.
🔶 SETTINGS
🔹 Stochastic Settings
Stochastic Length: The lookback period used for the raw stochastic range calculation.
%K Smoothing: Determines the internal smoothing applied to produce the standard %D line.
Price Pre-Smoothing: The length of the SMA applied to price sources before the oscillator is calculated to ensure foundational smoothness.
🔹 Adaptive Smoothing Settings
Attenuation Factor: A sensitivity multiplier that controls the reactivity of the Adaptive %D. Higher values increase the "inertia" of the adaptive calculation, making the signal line more conservative.
🔹 Colors
Standard %D Color: Sets the color for the core momentum dotted line.
Adaptive %D Color: Sets the color for the reactive signal dashed line.
Bullish/Bearish Color: Defines the colors used for the Difference Oscillator's gradient fill.
Indicator

Adaptive Bounds RSI [LuxAlgo]The Adaptive Bounds RSI indicator utilizes online 1D K-Means clustering to dynamically adapt RSI overbought and oversold bounds based on evolving market conditions. Unlike traditional RSI thresholds (70/30) that remain static, this tool identifies five shifting clusters to better categorize price action into regimes ranging from deep discount to extreme premium.
🔶 USAGE
The indicator provides a more responsive way to identify overextended market conditions by learning from recent RSI distributions. Instead of relying on fixed levels that may be irrelevant in strong trends, the adaptive bounds expand and contract based on the volatility and momentum of the asset.
🔹 Regime Classification
The tool classifies the market into five distinct regimes based on five internal centroids (clusters):
Extreme Premium (Upper Bound): Represents highly overextended bullish conditions.
Bullish: The zone between the center and the upper bound.
Neutral: The area surrounding the 50-level midline.
Bearish: The zone between the center and the lower bound.
Deep Discount (Lower Bound): Represents highly overextended bearish conditions.
🔹 Signal Markers
The indicator plots circular markers directly on the RSI line when the oscillator crosses the adaptive bounds:
A Bullish Marker appears when the RSI crosses below the adaptive lower bound (Deep Discount).
A Bearish Marker appears when the RSI crosses above the adaptive upper bound (Extreme Premium).
To prevent signal clutter, these markers only reappear once the RSI has returned to cross the 50-level midline, ensuring the market has "reset" before a new overextended signal is generated.
🔶 DETAILS
The core of this indicator is an Online 1D K-Means algorithm. Unlike standard clustering which requires a full dataset, this online version updates its centroids bar-by-bar.
When a new RSI value is calculated, the algorithm determines which of the five centroids is closest to that value. It then shifts that "winning" centroid toward the RSI value by a factor determined by the Learning Rate. This allows the boundaries to "breathe" with the market; in a persistent uptrend, the upper bound will naturally migrate higher to avoid premature overbought signals.
🔶 SETTINGS
🔹 Oscillator Settings
RSI Length: Determines the lookback period for the underlying Relative Strength Index calculation.
🔹 K-Means Settings
Learning Rate (K-Means): Controls how quickly the adaptive bounds react to new data. A higher value makes the bounds move faster, while a lower value provides more stable, "sticky" boundaries.
🔹 Visuals
Lower Bound Color: Sets the color for the lower adaptive boundary and bullish signals.
Upper Bound Color: Sets the color for the upper adaptive boundary and bearish signals.
Auto RSI Color: When enabled, the RSI line matches the chart's foreground color.
RSI Color: Sets the color of the RSI line when "Auto RSI Color" is disabled.
🔶 ALERTS
Regime Flip: Triggers when the market transitions from a Neutral state into a trending cluster (Bullish or Bearish).
Lower Bound Cross: Triggers when the RSI crosses into the Deep Discount zone.
Upper Bound Cross: Triggers when the RSI crosses into the Extreme Premium zone.
Indicator

Adaptive Volatility Trend Breakout (4H+ Strategy)Adaptive Volatility Trend Breakout (4H+ Strategy)
Overview
This strategy is a robust, trend-following system specifically engineered for higher timeframes ( 4H, Daily, and Weekly ). It aims to capture significant market moves by using dynamic, self-adjusting volatility bands based on Standard Deviation rather than fixed percentages.
The strategy is designed to identify and ride major trends while remaining "neutral" during choppy, sideways price action.
Core Logic
The system revolves around three main components:
Baseline (MA): Uses a Moving Average to define the core value area of the asset.
Dynamic Volatility Bands: The script calculates the real-time percentage change of price over a historical lookback period. It then applies a Standard Deviation Multiplier to create a "Neutral Zone."
Trend State Memory: A built-in filtering logic ensures the strategy only enters a trade when a definitive breakout occurs and stays in that trend until a reversal is confirmed by the opposite band.
Key Features
Optimized for 4H & Higher: Specifically tuned to ignore "intra-day noise," making it ideal for swing traders and trend followers.
Minimal Parameter Risk: With only three main inputs (MA Length, Lookback, and Multiplier), the strategy is built to be simple and robust, reducing the risk of over-optimization.
Volatility-Aware: The bands automatically expand during high-volatility events and contract during consolidation, helping to protect capital from premature entries during market "noise."
Set-and-Forget Design: Built for long-term consistency, this strategy requires minimal manual intervention once the parameters are set for a specific asset.
How to Use
Timeframe: Apply the strategy to 4H charts or higher.
Calibration: Adjust the Multiplier (StdDev) to fit the specific volatility of the asset you are trading.
Execution: Entry occurs on a candle close outside the band. Exit occurs when the price crosses and closes beyond the opposite boundary.
Strategy

Adaptive Centric Moving Average [LuxAlgo]The Adaptive Centric Moving Average indicator provides a dynamic smoothing tool that adjusts its reactivity based on where the price sits relative to its recent trading range midpoint.
🔶 USAGE
The Adaptive Centric Moving Average (AMA) is designed to filter out noise during periods of consolidation while remaining highly responsive during trending moves. When the price is near the center of its recent high-low range, the indicator becomes flatter and less prone to "whipsaws." As price moves toward the extremes of its range, the indicator accelerates to catch the emerging trend.
Users can utilize the AMA for trend identification and trailing stop-loss levels. The visual gradient fill between the source price and the AMA line helps traders quickly identify the current trend strength and the distance between price and the smoothed average.
🔶 DETAILS
The core logic of the script relies on a normalized relative position (similar to a Stochastic calculation) to determine how far the price is from its range midpoint.
🔹 Adaptive Smoothing Logic
The indicator calculates a smoothing factor (alpha) based on the absolute distance from the 50% level of the range.
When price is at the midpoint (50%), the alpha is zero, causing the moving average to stay flat.
As price moves toward the upper or lower boundaries (0% or 100%), the alpha increases, making the average more reactive.
🔹 The Centric Calculation
Unlike standard moving averages that track the source price directly, this indicator centers its target around the range midpoint. The Attenuation Factor scales the distance between the source and the midpoint, while the Power Factor applies an exponent to the smoothing factor, allowing for non-linear reactivity.
🔶 SETTINGS
🔹 Price Settings
Source: The price series used for calculations (default is Close).
Length: The window size used for pre-smoothing the source and determining the highest highs and lowest lows for the range.
🔹 Adaptive Settings
Attenuation Factor: Controls the intensity of the price input relative to the midpoint. Lower values increase reactivity, while higher values provide a more stable, base smoothing speed.
Power Factor: Exponents the smoothing factor. Higher values make the moving average significantly flatter when the price is near the range midpoint, requiring stronger moves to trigger a reaction.
🔹 Colors
AMA Color: The color of the main Adaptive Centric Moving Average line.
Bullish Fill: The color used for the gradient fill when the price is above the AMA.
Bearish Fill: The color used for the gradient fill when the price is below the AMA.
Indicator

LOWESS Adaptive Envelope [BackQuant]LOWESS Adaptive Envelope
Overview
LOWESS Adaptive Envelope is a nonparametric trend-fit and volatility envelope tool built around LOWESS (Locally Weighted Scatterplot Smoothing). Instead of smoothing price with a fixed-form moving average, this indicator performs a rolling set of local weighted linear regressions across a chosen historical window and stitches those local fits into a single smooth curve that adapts to changing market structure.
On top of the fitted curve, the script builds an adaptive envelope whose width is driven by the local magnitude of the model’s residuals (how far price deviates from the fit). That means the envelope automatically expands when the market is noisy or trending aggressively, and contracts when price is stable or mean-reverting cleanly.
The output is a complete “structure map”:
A LOWESS fitted centerline (trend estimate).
Upper and lower adaptive bands derived from smoothed residual spread.
A filled region that changes color based on where price sits relative to the fit.
Optional extrapolation of the fit and envelope into the future using last slope, with widening uncertainty.
An info label showing fit quality (R²), position inside the envelope, and direction.
Where LOWESS comes from (and why it is different from moving averages)
LOWESS (also written LOESS) is a classic statistical smoothing technique used in exploratory data analysis and robust curve fitting. It became popular because it can approximate complex shapes without assuming a single global model. Instead of forcing the entire window to follow one equation (like a single linear regression or a single moving average kernel), LOWESS fits many small local regressions , each one tailored to its neighborhood.
Key distinction:
A moving average is a fixed smoother, it applies the same weighting rule everywhere, regardless of whether the market is trending, chopping, or accelerating.
LOWESS is a locally re-fitted model, it re-estimates slope and intercept at each point based on nearby data.
In price terms:
LOWESS is better at “hugging structure” when the market curves or transitions.
It can follow gradual regime shifts without the same lag profile as long-window MAs.
It does not assume the trend is constant across the whole lookback, it assumes trend can vary locally.
What the indicator is modeling
Think of the lookback window as a dataset of points:
x = bar index (0..length-1 inside the window)
y = price
For every point i inside that window, the indicator estimates the best local line:
y ≈ a + b * x
But it does this using only nearby points, and it weights them by distance from i. So the fitted value at i is a locally weighted regression prediction.
The final fitted curve is the collection of those predictions across i = 0..length-1.
Core mechanics: local weighted linear regression
1) Neighborhood size (bandwidth)
The “locality” is controlled by a bandwidth parameter. In this script:
h = max(bandwidth * length / 2, 2)
Interpretation:
h acts like a radius measured in bars inside the fitting window.
Lower bandwidth → smaller h → more local fit (more responsive, can track curvature, more sensitive to noise).
Higher bandwidth → larger h → more global fit (smoother, more stable, more lag in transitions).
So bandwidth controls the bias-variance tradeoff:
Small bandwidth: low bias, high variance.
Large bandwidth: higher bias, lower variance.
2) Tricube kernel weighting
LOWESS requires a weight function that decays smoothly with distance. This script uses the classic tricube kernel :
For each candidate point j around target i:
u = |i - j| / h
If u < 1:
- w = (1 - u³)³
If u ≥ 1:
- w = 0
Why tricube:
Weights go to zero smoothly at the boundary (no sharp cutoff artifacts).
Nearby points dominate the fit, distant points contribute little or nothing.
It is a standard LOWESS choice because it produces stable smooth curves.
3) Weighted least squares fit
For each i, the script accumulates weighted sums over j in the neighborhood:
sumW, sumWX, sumWY, sumWXX, sumWXY
These correspond to the normal equations for weighted linear regression. From those, it computes:
denom = sumW * sumWXX - sumWX²
a and b derived from sums (intercept and slope)
fitted = a + b * i
If denom is too small (numerical instability, insufficient variation), it falls back to the raw price at that i.
This entire process is repeated for every i in the window, which is why it is done only on the last bar (performance).
Why it fits inside the window rather than a single line
A single regression across 200 bars assumes one slope b explains the whole move. Markets rarely do that. LOWESS allows the slope to drift through time, which is exactly what “trend structure” actually does in real price.
Residuals: turning model error into volatility structure
Once the LOWESS fitted curve is computed, the script measures the residual at each point:
res = price - fitted
Residuals are the model’s error. In trading terms, residual magnitude is a proxy for:
Local noise level.
Deviations from trend structure (overextension/underextension).
Regime instability (trend is less “explanatory”).
The script takes absolute residuals:
absRes = |res |
This is important because envelope width should reflect spread size regardless of direction.
R²: fit quality and regime information
The indicator also computes R² over the window:
ssRes = Σ(res²)
ssTot = Σ((price - meanPrice)²)
R² = 1 - ssRes/ssTot
Interpretation:
Higher R² means the LOWESS fit explains more of the variation inside the window.
Lower R² means price is behaving in a way the smooth trend model cannot explain well (chop, shocks, irregular volatility).
In markets, R² can be read as “how trend-like vs how noisy” the recent environment is, but remember it depends on your chosen length and bandwidth.
Adaptive envelope construction (what makes it “adaptive”)
A normal envelope uses a constant width (like ±k*ATR or ±k*stdev). This script does something different: it estimates a local envelope width based on smoothed residual magnitude.
1) Smooth residual magnitude locally
It computes a residual averaging window:
rWin = max(3, int(h * 0.8))
So the residual smoothing window is linked to the LOWESS locality. If the fit is local, the envelope adapts locally. If the fit is global, the envelope adapts more slowly.
Then for each i:
envW = mean(absRes over ) * envMult
Interpretation:
The envelope width is proportional to how much price typically deviates from the fit around that region.
envMult is your “how many spreads” multiplier.
This creates an envelope that expands and contracts along the curve, not a single constant band.
2) Upper and lower envelopes
For each i:
upper = fitted + envW
lower = fitted - envW
This is a model-driven channel. It is not ATR-based directly, it is “error-based.” That makes it very effective at responding to the actual behavior of the market relative to the fitted structure.
How to interpret the envelope
The centerline is the best local structural estimate. The envelope is the expected deviation range around that structure.
Typical readings:
Price near centerline: balanced relative to structure.
Price riding upper band: strong bullish pressure, trend continuation or overextension depending on context.
Price riding lower band: strong bearish pressure, continuation or overextension.
Repeated band rejections: mean-reversion regime around the structural fit.
Envelope widening: instability rising, volatility expanding, structure less reliable.
Envelope tightening: compression, cleaner trend or coiling behavior.
Because the band width is based on residuals, widening often coincides with “trend breaks” and regime transitions, not just higher ATR.
Color logic and visual encoding
The envelope fill color is based on price relative to the most recent fitted value:
If close > fitted , bullish color.
Else bearish color.
So color is a regime/bias cue, not a volatility cue. The bands themselves are drawn with translucent versions of the same regime color, while the fit line is a subtle white.
The fill polygon is constructed by:
Walking forward through upper points.
Then walking backward through lower points.
So the shape is closed and can be filled cleanly using polyline fills.
Extrapolation: forward projection with widening uncertainty
This script can project the fitted line into future bars. This is not forecasting in a statistical sense, it is a deterministic extension based on the current slope.
How it extrapolates
It takes:
slope = fitted - fitted
lastFit = fitted
Then for i = 1..extrapBars:
futureFit = lastFit + slope * i
This is a linear continuation of the most recent fit direction. It is meant as a visual guide for “if the current local trend continues.”
Why the forward envelope widens
The script also grows the envelope slightly with each projected bar:
envGrow = lastEnv * 0.01
futureEnv = lastEnv + envGrow * i
This is a simple uncertainty widening mechanism. As you move further into the future, you should assume less confidence. The envelope expansion encodes that visually without claiming statistical rigor.
Info label: what it reports and how to read it
When enabled, the label shows:
1) Direction arrow
It computes a slope over the last few fitted points:
recentSlope = fitted - fitted (or closest valid index)
▲ if slope >= 0
▼ if slope < 0
This gives a slightly more stable direction read than one-bar slope.
2) R²
Displayed as R²: 0.xxx, representing how well the LOWESS curve explains window variation.
3) Envelope Position (Env Pos)
It measures where the current close sits inside the latest envelope:
0% = at lower band
50% = at centerline
100% = at upper band
This is extremely useful as a normalized “over/under extension” metric because it is scaled by the adaptive band width, not raw price units.
How to use it properly
Trend structure and regime filtering
Use the fit line as structural trend direction.
Use the fill color as quick bias context.
Use R² as a “trend quality” read: high R² tends to mean cleaner structure, low R² tends to mean chop or instability.
Mean reversion vs continuation
This tool can support both styles, but interpretation differs:
Mean reversion framing
If market repeatedly returns to the fit line, the fit is acting like value.
Upper band touches can be “overbought relative to structure.”
Lower band touches can be “oversold relative to structure.”
Envelope position becomes your normalized stretch gauge.
Trend continuation framing
In strong trends, price can ride a band rather than revert to centerline.
Band riding plus rising fit slope suggests persistence.
A sudden failure to hold the band plus falling R² can flag transition risk.
Breakdown/transition identification
Because the envelope width is residual-driven:
If price starts producing large residuals, the envelope expands.
That expansion is often a signature of regime change, not just volatility.
Combine expansion with slope flattening to identify trend exhaustion.
Parameter tuning (what each input really does)
Length
Defines how much historical data is used for the full fit. Larger length:
More stable curve.
More computational load.
Tends to represent macro structure.
Bandwidth
Controls locality:
Low bandwidth (0.10–0.25): more reactive, tracks curvature and micro-structure, more sensitive to noise.
Higher bandwidth (0.30–0.50+): smoother, more stable, more lag in fast turns.
Envelope Width (envMult)
Scales how wide the adaptive band is relative to the local residual spread:
Lower values create a tighter channel, more band interactions.
Higher values create a wider channel, fewer touches, better for regime filtering.
Extrapolation Bars
Purely visual. More bars gives a longer projected structure line and uncertainty region.
Limitations and correct expectations
LOWESS is powerful, but it is not a magic predictor.
LOWESS is descriptive, it fits what happened, then projects linearly if extrapolation is enabled.
In sudden shocks or gaps, the fit will update only after the new data is inside the window.
Very small bandwidth can overfit local noise, producing misleading curvature.
Very large bandwidth can underfit, behaving like a slow regression and missing turning points.
R² is window-dependent, a low value does not mean “bad indicator,” it often means “market is not smooth right now.”
Summary
LOWESS Adaptive Envelope applies locally weighted linear regression (LOWESS) with a tricube kernel to build a smooth, structure-following fitted price curve that adapts to regime changes without relying on a fixed moving-average form. It then converts the model’s local residual spread into a dynamic envelope that expands and contracts with real deviation behavior, provides fit quality via R², normalizes price position inside the band, and optionally extrapolates the latest structural slope forward with widening uncertainty. The result is a robust trend-structure and deviation framework that is equally useful for regime filtering, mean-reversion context, and trend persistence assessment. Indicator

Ehlers Super Smoother Trend Score [BackQuant]Ehlers Super Smoother Trend Score
Overview
Ehlers Super Smoother Trend Score is a regime and trend-strength indicator built on a signal-processing filter created by John F. Ehlers. Instead of smoothing price with a standard moving average (which is mathematically crude and prone to noise and aliasing), this indicator applies the Ehlers Super Smoother, a Butterworth-style low-pass filter designed specifically for market data. The filtered series is then scored for directional persistence across a configurable lookback window, producing an oscillator-like trend score that measures how consistently the smoothed trend is advancing or deteriorating.
This is not a simple “MA slope” tool. It is:
A proper low-pass filter (Super Smoother) to reduce noise while preserving structure.
A persistence score that converts the filtered trend into a quantitative regime signal.
A threshold framework that turns the score into long/short regime transitions with clean state logic.
Where the filter comes from (and why it matters)
John F. Ehlers is known for applying digital signal processing (DSP) techniques to technical analysis. Traditional moving averages are not designed as proper frequency-selective filters. They blur price, lag heavily, and can introduce distortions, especially when the market contains high-frequency components (noise) near the Nyquist limit (the maximum representable frequency in sampled data).
The Super Smoother is derived from a Butterworth low-pass filter design. Butterworth filters are engineered to have a maximally flat passband, meaning they smooth without introducing ripples in the filtered output. In trading terms:
Less “wavy” smoothing artifacts than many MA variants.
Better suppression of high-frequency noise.
Cleaner trend structure for downstream logic.
This script implements Ehlers’ recursive coefficient form, giving you a 2-pole (classic) or 3-pole (heavier) filter.
What “Super Smoother” actually is
The Super Smoother is a recursive IIR filter (Infinite Impulse Response). Unlike an SMA which averages a fixed window of past values, an IIR filter uses feedback from its own prior output values. That matters because it can achieve strong smoothing with less lag for a given “smoothness target.”
Conceptually:
Input: price series.
Output: filtered estimate of the “low-frequency” component (trend structure).
Mechanism: combine current input (or pre-filtered input) with previous filter outputs using coefficients derived from a chosen cutoff period.
The coefficients (c1–c4) are not arbitrary, they are computed from exponential decay and cosine terms based on the cutoff period. This is what makes it a real DSP filter rather than “just another MA.”
2-pole vs 3-pole behavior
2-pole (classic)
A standard Ehlers Super Smoother configuration. It offers a strong improvement over typical MAs in smoothness vs lag balance.
3-pole
Adds an additional feedback term (one more prior filtered state). This increases smoothing and noise rejection, but introduces slightly more lag. The advantage is a cleaner structural line, which often improves regime stability when the market is noisy or mean-reverting.
Anti-aliasing pre-filter step
Before applying the recursive formula, the script averages the current and previous price:
avg = (src + src ) / 2
This is a simple but important pre-filter that reduces high-frequency components that can alias into lower frequencies in sampled data. In practice, it helps stop “one-bar spikes” from contaminating the filter output as much.
Inputs and what they really control
Super Smoother Period (ssPeriod)
This is the cutoff period used in the coefficient derivation. It is not the same as “MA length,” but it behaves similarly in that:
Lower period = faster response, less smoothing, more sensitivity to noise.
Higher period = smoother output, better noise rejection, more lag.
Poles
Selects filter order:
2 poles = balanced default.
3 poles = smoother, more conservative.
Score Lookback Start/End
Defines the persistence scoring window. The script compares the current filtered value to many prior filtered values across that range. A longer range makes the score more “confidence-based” and slower to change, while a shorter range makes it more reactive.
Thresholds (Long/Short)
Turns the score into a regime classification:
Long threshold defines when bullish persistence is strong enough to be considered a trend regime.
Short threshold defines when persistence has deteriorated enough to signal a bearish transition.
How the trend score is computed
After filtering, the indicator computes a directional persistence score on the filtered series (not raw price). That distinction matters because you are scoring structure, not noise.
Mechanically:
For each i in the scoring window:
- If filt_now > filt , add +1
- Else add -1
Sum across the window to produce the score.
Interpretation:
High positive score means the filtered trend is consistently higher than many past points, persistent bullish structure.
Low or negative score means the filtered trend is not advancing, or is consistently below prior points, bearish structure.
Scores near the middle mean the filtered series is oscillating without clear persistence, chop or transition.
This is a persistence metric, not a slope metric. It does not care about one-bar direction, it cares about consistency relative to history.
Signal and state logic (why it stays clean)
The indicator uses state logic to prevent constant flip-flopping:
Long condition: score > long threshold.
Short condition: score crosses below short threshold (uses prevScore and current score).
That short logic is event-based, it triggers only on the breakdown transition, not on every bar below the threshold. Once a regime is set, it remains until a real threshold event forces change.
Signals are plotted only on regime flips:
Long marker when signal becomes +1 and prior was -1.
Short marker when signal becomes -1 and prior was +1.
This is designed for alerts and for clean backtesting interpretation.
Visual layers
The indicator can be used purely as a panel oscillator or as a structure overlay.
Pane
Trend Score line, colored by active regime.
Optional reference lines at long/short thresholds for fast regime reading.
On-chart (optional)
Super Smoother line plotted over price, colored by regime.
Optional candle painting and background shading to reflect active regime.
This lets you treat the filter as a dynamic trend structure line while using the score as the regime classifier.
How to interpret it properly
1) The Super Smoother line
This is the cleaned trend structure estimate:
When price respects the smoother line, trend structure is intact.
When price repeatedly chops through it, structure is weak or range-bound.
2) The score
This is the quantified persistence of that structure:
Rising score implies strengthening trend persistence.
Falling score implies deterioration, transition risk, or mean reversion.
Score compression often shows consolidation before a regime shift.
3) Threshold regimes
Above long threshold: bullish persistence regime, trend-following conditions.
Below short threshold: bearish regime transition, defensive or short-biased conditions.
Between thresholds: neutral/transition zone, where chop and fakeouts are common.
Practical use cases
Trend filter
Only take long setups when score is above the long threshold.
Reduce exposure or avoid trend trades in the neutral band.
Treat a breakdown through the short threshold as regime invalidation.
Trend quality assessment
High score = continuation environment.
Moderate score = trend exists but is fragile.
Low/negative score = distribution, downtrend, or unstable structure.
Trade management
Use the Super Smoother line as a structure reference for trailing risk.
Use score deterioration as an early warning before full regime flips.
Use regime flips as hard exits or bias changes.
Tuning guidelines
If you want fewer signals and cleaner regimes
Increase ssPeriod.
Use 3 poles.
Increase scoreEnd (longer scoring window).
If you want faster reaction
Decrease ssPeriod.
Use 2 poles.
Reduce the scoring window length.
Keep in mind: faster settings increase sensitivity to chop. The filter is good, but no filter removes the reality of mean reversion.
What makes this different from “just a smoothed MA score”
The difference is the filter quality. The Super Smoother is a proper low-pass filter with coefficients derived from DSP principles, designed to suppress high-frequency noise and avoid common smoothing artifacts. Scoring that filtered structure gives you a regime metric that is more stable and more meaningful than scoring raw price or scoring a basic MA that still carries a lot of aliasing and distortion.
Summary
Ehlers Super Smoother Trend Score combines a DSP-derived Butterworth-style Super Smoother filter with a directional persistence scoring model. The filter provides a clean, low-noise trend structure series, and the score quantifies how consistently that structure is advancing or deteriorating across a defined window. Threshold-based regime logic converts the score into clean trend states and alerts, making it a practical tool for trend filtering, regime detection, and structure-aware trade management. Indicator

Pulse Mean AcceleratorPulse Mean Accelerator (PMA) | MisinkoMaster
Pulse Mean Accelerator (PMA) is a high-speed adaptive trend engine designed to dynamically accelerate or stabilize its behavior depending on how aggressively price moves relative to its underlying structure. Instead of acting like a traditional moving average that simply lags behind price, PMA attempts to anticipate momentum expansion by accelerating when price pulses strengthen and stabilizing when market movement slows.
The result is a responsive yet smooth trend-following tool that adapts to both trending and consolidating markets. PMA is particularly useful for traders who want earlier participation in expanding trends without sacrificing structural clarity.
By combining adaptive acceleration, volatility awareness, and layered smoothing, PMA balances speed and stability to help traders remain aligned with developing momentum.
Key Features
Adaptive acceleration that reacts when price movement intensifies
Automatically slows down during consolidation to reduce noise
Multiple moving average types supported for flexibility
Volatility-aware responsiveness adjustment
Optional confirmation logic to filter weak signals
Multiple smoothing modes for balancing speed vs stability
Dynamic candle coloring reflecting active trend state
Automatic Long and Short markers when direction changes
Works across fast intraday and slower swing environments
Designed to reduce lag while preserving structure
How It Works
Pulse Mean Accelerator begins with a moving average structure but enhances it by measuring how aggressively price moves relative to that baseline. When price starts moving faster than the average, acceleration increases, allowing the indicator to catch up quickly.
When price slows or becomes erratic, acceleration reduces, preventing excessive reaction to noise.
Volatility measurements are incorporated to scale this acceleration, ensuring that responsiveness adapts naturally to current market conditions. Strong moves result in quicker adaptation, while quiet markets lead to smoother, calmer behavior.
Additional smoothing layers can then be applied, allowing traders to choose between faster responsiveness or more stable structure depending on their trading style.
Optional confirmation logic ensures that signals are not triggered solely by temporary price spikes, helping filter weaker moves.
The outcome is a moving average framework that behaves more like a dynamic trend engine rather than a static lagging indicator.
Trend Detection Logic
Trend direction is determined by how price behaves relative to the accelerated mean structure.
Bullish phases occur when price maintains strength above the adaptive mean while momentum confirms upward pressure. Bearish phases occur when price weakens below the structure and downward momentum dominates.
Signals appear when participation shifts strongly enough to confirm directional change, helping traders detect transitions from consolidation to expansion phases.
Acceleration Behavior
A defining characteristic of PMA is its pulse acceleration mechanism.
• Strong price pulses increase responsiveness
• Weak or slow price movement reduces acceleration
• Volatility conditions influence adaptation speed
• Structure remains smooth when momentum is weak
This dynamic adjustment helps traders enter trends earlier while avoiding excessive reactions during sideways markets.
Smoothing Modes
PMA includes multiple smoothing options so users can tune responsiveness:
• Raw acceleration for fastest reaction
• Exponential stabilization for balanced behavior
• Additional smoothing layers for structural clarity
• Double smoothing for maximum noise reduction
This flexibility allows PMA to be tailored for scalping, intraday trading, or higher-timeframe trend following.
Visual Signals
The indicator provides several visual cues for ease of interpretation:
• Candle coloring reflects active trend direction
• Adaptive mean and accelerated mean are plotted together
• Long and Short markers appear when trend shifts occur
• Filled areas highlight separation between price and structure
These features help traders read market structure quickly without relying on numerical interpretation.
Inputs Overview
Users can customize behavior through adjustable components including:
• Price source selection used in calculations
• Moving average type controlling base structure
• Length settings affecting responsiveness
• Acceleration sensitivity determining reaction speed
• Volatility measurement type influencing adaptation
• Smoothing mode selection for stability control
• Optional confirmation filtering for signal validation
These controls allow the tool to be tuned for both aggressive and conservative trading approaches.
Usage Notes
Ideal for traders needing faster adaptation to momentum expansion
Helps detect early stages of trend acceleration
Useful for filtering sideways noise while remaining reactive to breakouts
Works well in volatile assets where traditional averages lag
Can be combined with support/resistance or volume tools for confirmation
Higher smoothing settings suit swing traders, lower smoothing benefits intraday traders
Confirmation mode reduces false signals in choppy markets
Parameter tuning improves performance across different assets
Best Use Scenarios
Pulse Mean Accelerator performs particularly well in:
• Momentum expansion phases
• Breakouts from consolidation ranges
• Trend continuation environments
• High-volatility market conditions
• Assets showing periodic acceleration bursts
• Markets transitioning from low to high volatility
It is especially effective where traditional moving averages react too slowly to developing moves.
Summary
Pulse Mean Accelerator transforms traditional moving average logic into an adaptive trend engine capable of accelerating when price momentum expands and stabilizing during calm conditions. By blending acceleration, volatility awareness, and flexible smoothing, it provides traders with a faster yet structured view of market direction.
PMA is best suited for traders seeking earlier trend participation while maintaining smooth, readable structure across both fast-moving and consolidating markets. Indicator

Length Adaptive MA SuperTrendLength Adaptive MA SuperTrend
Length Adaptive MA SuperTrend is a third-generation evolution of the SuperTrend concept, designed to improve signal accuracy while maintaining high responsiveness across different market conditions. The indicator dynamically adjusts its moving-average length to better match current market activity, allowing it to react quickly in fast markets while remaining stable during slower phases.
This adaptive behavior helps traders and investors visualize trend direction more clearly while reducing unnecessary noise, making the tool suitable for both beginners and advanced users seeking a responsive trend overlay.
🔍 How It Works
The indicator uses a moving average as the foundation for a SuperTrend-style structure, but instead of keeping the moving-average length fixed, it continuously adapts to changing market environments.
The script compares average activity levels across three horizons:
• Long-term period
• Medium-term period (half length)
• Short-term period (square-root length)
Activity is measured using one of three selectable drivers:
• ATR (volatility)
• Volume
• Standard deviation
Whichever period shows the strongest average activity becomes the active length used for calculating the moving-average base. This allows the indicator to automatically shift between faster and slower behavior depending on market conditions.
After selecting the active length, the result is slightly smoothed using the chosen moving-average type to produce a cleaner and more stable trend structure.
ATR-based bands are then applied around the adaptive base, and trend direction changes when price crosses these bands.
⚙️ Key Features
• Adaptive moving-average length selection
• Automatic adjustment between short, medium, and long market conditions
• Multiple smoothing types (SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, EWMA)
• ATR-based SuperTrend structure
• Trend transition markers
• Optional candle coloring based on active trend
🧩 Inputs Overview
• Moving-average smoothing type
• Base length and price source
• ATR length and multiplier
• Adaptive driver selection (ATR, Volume, or Standard Deviation)
📌 Usage Notes
• Helps visualize prevailing market trends across changing environments.
• Automatically adapts speed for trending and consolidating markets.
• Signals may change intrabar on lower timeframes.
• Best used with confirmation tools and proper risk management.
• Intended as an analytical tool, not financial advice. Indicator

Indicator

Adaptive AI SuperTrend [AlgoPoint]🚀 Adaptive AI SuperTrend
Adaptive AI SuperTrend is a high-performance trading terminal that redefines trend-following by integrating Machine Learning (ML) principles with advanced market regime detection. Unlike static indicators, this system dynamically recalibrates its internal parameters to match the ever-changing volatility of the financial markets.
Equipped with a custom "Wizard Engine," it filters out market noise during consolidation and identifies high-probability trend continuation points, making it an essential tool for scalpers, day traders, and swing traders alike.
🧠 What Makes it "AI"?
While traditional indicators use fixed rules, Adaptive AI SuperTrend utilizes Algorithmic Intelligence to make real-time decisions:
KNN-Inspired Adaptation: The engine analyzes the last 150 bars of volatility and trend strength to automatically adjust its sensitivity.
Market Regime Intelligence: It distinguishes between "Trending" and "Ranging" states using a sophisticated Squeeze Momentum module, preventing "whipsaws" during low-volume periods.
Self-Backtesting Logic: The indicator continuously calculates its own historical Win-Rate. If the probability of success falls below a certain threshold, it suppresses lower-quality signals.
🛠 Key Features
Dynamic Consolidation Boxes: Automatically identifies and wraps "choppy" price action in professional gray boxes. It waits for 3+ bars of consolidation before marking the zone, helping you spot breakout opportunities early.
Multi-Strategy Aggression:
- Conservative: Filtered signals for long-term trend following.
- Balanced: Optimized for daily volatility.
- Aggressive: High-frequency signals for capturing micro-trends.
Dual-Exit Risk Management:
- ATR TP-SL Mode: Sets mathematical targets based on market volatility with persistent on-screen lines.
- Smart Trailing Mode: Rides the trend to its exhaustion point. Includes intelligent labeling (🎯 TP or 🛑 SL) based on the trade's net profitability.
- RSI Pullback Confirmation: Beyond simple trend flips, it detects "buy the dip" or "sell the rip" opportunities within an existing trend using RSI 50-level crossovers.
📊 Real-Time Analytics Dashboard
The integrated AlgoPoint Dashboard provides a surgical view of the market:
- Market State: Instant "Trending" vs. "Ranging" (Consolidation) detection.
- Trend Strength: ADX-based momentum tracking.
- Strategy Status: Real-time feedback on your active aggression and exit modes.
🎨 Clean Charting & Customization
Built for professional clarity, you have total control over the UI:
Toggle Consolidation Boxes on/off.
Toggle ATR Target Lines and Exit Labels.
Customize background filters and dashboard visibility. Indicator
