OPEN-SOURCE SCRIPT

MAD Supertrend ~ C H I P A

311
MAD Supertrend ~ C H I P A is a custom trend-following system that replaces the standard deviation core of a classic Supertrend with Median Absolute Deviation (MAD) — a robust volatility measure that ignores outlier wicks instead of inflating on them. The result is a trail that holds steady through shakeout spikes where stdev-based bands blow out and go blind.
It uses:
A user-selectable source and MAD length
A choice of MAD estimator — true Median-of-deviations for maximum robustness, or Mean for a slightly smoother read
Independent upper and lower MAD multipliers for asymmetric band control
A selectable centerline engine: raw Source for zero lag, Single Median, or a Double Median smoother that kills staircase artefacts without adding meaningful delay
A PSAR-style exit acceleration module — each new closing extreme in the trend tightens the exit trail by a configurable step, down to a user-defined floor
Supertrend ratchet logic with persistent trend state and clean flip detection
The exit acceleration is the key behavioural difference from a standard Supertrend: fresh trends begin at full band width, giving early moves room to survive shakeouts, while mature trends that keep printing new extremes are trailed progressively tighter — so extended runs are exited far closer to their peak. The trail only ever tightens mid-trend and fully resets on each flip.
Alerts fire on confirmed trend flips in both directions.
Note: MAD Supertrend is provided "as is" without formal robustness or optimization testing. Past performance is not indicative of future results; use in live trading only after sufficient back-testing and validation.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.