OPEN-SOURCE SCRIPT

MAD Trend Detector ~ C H I P A

1 089
MAD Trend Detector ~ C H I P A is a custom trend detection tool designed to identify meaningful price deviations using Median Absolute Deviation (MAD) logic layered over a smoothed price baseline.

It uses:

A user-selectable source (Close, High, Low, etc.)

A configurable EMA or SMA as the core smoothing layer

Median Absolute Deviation (MAD) to measure typical price dispersion

A user-adjustable MAD multiplier to fine-tune trend sensitivity

Trend bands that expand dynamically based on local volatility

This setup highlights breakout conditions when price detaches meaningfully from its typical behavior — helping traders detect trend acceleration, volatility breakouts, and directional shifts with minimal lag and reduced noise.

Candle coloring responds directly to trend status, with electric blue and red visuals for clear on-chart recognition.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.