UHL Adaptive MA
By LuxAlgoJun 1, 2026
UHL Adaptive MA plots Andreas Uhl's corrected moving average: a baseline that holds perfectly flat until price moves further than its own recent variance justifies, then steps toward the simple average by a re-derived fraction. This build gives the concept its clean, complete form — the slow Corrected MA plus a fast Trend-Step Line made by applying the same variance gate directly to the raw source — and adds a dashboard reporting the trend state, the gate's hold-or-step status, the correction factor, and how long the line has held flat.
How to Trade the UHL Adaptive MA?
- Stepping up or down: a slope turn out of a hold means movement has outrun the recent noise — the start of a statistically meaningful move, covered by the step alerts.
- Holding flat: price is back inside the variance band; congestion, and the natural stand-aside state.
- Two-line crossings: the Trend-Step Line crossing the corrected baseline defines the bullish and bearish states; triangle markers are optional and the crossover alerts work regardless.
UHL Adaptive MA Settings
- Source (default close): series the variance-gated correction is applied to.
- Lookback Length (default 100): sets the noise estimate and the moving-average target together — longer widens the noise band for flatter lines with later, larger steps.
- Show Trend-Step Line (default enabled): plots the fast corrected line whose crossings define the two-line states.
- Show Dashboard (default enabled): the state panel; position and text size are adjustable.
- Style toggles: Slope Coloring and Adaptivity Gradient (both default enabled) color the line by step direction and saturate it by correction strength; Trend Gradient Fill (default enabled), Crossover Markers (default disabled), Line Width (default 2).
Frequently Asked Questions
Why does the line go completely flat?
When the gap between the average and its target stays inside the lookback variance, the correction factor is exactly zero and the previous value carries forward unchanged. That hard zero is the design's point — sideways noise produces no slope at all.
How is this different from VIDYA?
VIDYA also adapts its speed, but continuously — its smoothing constant is recomputed on every bar, so the line always creeps. The UHL correction is gated: it either holds exactly still or jumps a computed fraction toward the target, which is why its holds and steps read as discrete events.
Is there a best Lookback Length?
No universal setting exists — longer lookbacks step less often, shorter ones more frequently. The default 100 suits swing horizons; scale it to your intended holding period.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
