MADTREND | TaQuant x NonyaXBT
MADTREND is a trend-state indicator that blends Kalman-filtered price, a signal EMA, and ATR-based dynamic bands to identify actionable shifts in market bias. It’s designed for clarity: a single trend line that changes color on regime flips, with optional flip highlights and up/down markers—no candle recolors or visual clutter.
How it works
Kalman Filter Smoothing: Denoises price to reduce whipsaw and sharpen signal quality.
Signal Engine: EMA of the Kalman series defines the baseline trend.
ATR Gates (Asymmetric):
Bullish trigger: close > EMA(Kalman) + (mult_up × ATR)
Bearish trigger: close < EMA(Kalman) – (mult_dn × ATR)
Separate up/down multipliers let you tune sensitivity to breakouts vs. breakdowns.
Visuals
- Single Trend Line: Green (up) or magenta (down) only when a regime is active; hidden in neutral.
- Flip Highlights: Soft background tint on the exact bar where the regime changes.
- Flip Markers: ▲ below bars for bullish flips, ▼ above bars for bearish flips.
Inputs (core)
ATR Length (default 21)
EMA Length (on Kalman) (default 25)
Multiplier (Up/Down) (1.5 / 1.1)
Kalman: price source, process noise, measurement noise, filter order
Colors: Up/Down trend colors


