OPEN-SOURCE SCRIPT
MAD Z Robust Burst [forexobroker]

MAD Z Robust Burst computes a Median Absolute Deviation z-score: MAD-Z = (close - median) / (1.4826 * MAD), where MAD = median(|x - median|). The 1.4826 factor makes MAD a consistent estimator of stdev under normality. Robust to outliers — a single price spike does not inflate the divisor like ordinary stdev does. Visual signature: outlined-only square markers (no fill), MAD bands.
🔶 ALGORITHM
1. window = last N closes.
2. med = median(window).
3. abs_dev[k] = |close[k] - med|.
4. MAD = median(abs_dev).
5. MAD-Z = (close - med) / (1.4826 * MAD).
6. Burst regime when |MAD-Z| > threshold.
7. Return-from-burst entry: signal fires when MAD-Z comes back below the return threshold from a burst.
🔶 SIGNAL LOGIC
- Buy: prior burst-down AND MAD-Z >= -return-threshold AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: prior burst-up AND MAD-Z <= +return-threshold.
- Position-lock state machine.
🔶 INPUTS
- MAD Window (default 40)
- Burst Z entry start (default 2.0)
- Return Z entry fire (default 1.0)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, MAD bands, outlined markers, buy / sell colors
🔶 ALERTS
MZB Buy, MZB Sell, MZB Any Signal, MZB Burst Up, MZB Burst Down, MZB Extreme, MZB Return Up, MZB Return Down, MZB Webhook JSON.
🔶 LIMITATIONS
- MAD is robust but slower-reacting than stdev; bursts may persist a bit longer before being detected.
- The 1.4826 normalisation assumes Gaussian-like distributions; for heavy-tailed assets the conversion is approximate.
- Outlined squares (no glow stack) is a deliberate visual choice — the indicator looks unique but has slightly lower visibility than filled markers.
- Return-from-burst entry is mean-reversion oriented; not for breakout players.
🔶 ALGORITHM
1. window = last N closes.
2. med = median(window).
3. abs_dev[k] = |close[k] - med|.
4. MAD = median(abs_dev).
5. MAD-Z = (close - med) / (1.4826 * MAD).
6. Burst regime when |MAD-Z| > threshold.
7. Return-from-burst entry: signal fires when MAD-Z comes back below the return threshold from a burst.
🔶 SIGNAL LOGIC
- Buy: prior burst-down AND MAD-Z >= -return-threshold AND not already long AND cooldown elapsed AND barstate.isconfirmed.
- Sell: prior burst-up AND MAD-Z <= +return-threshold.
- Position-lock state machine.
🔶 INPUTS
- MAD Window (default 40)
- Burst Z entry start (default 2.0)
- Return Z entry fire (default 1.0)
- Cooldown Bars (default 4)
- Visual: dashboard, glow, MAD bands, outlined markers, buy / sell colors
🔶 ALERTS
MZB Buy, MZB Sell, MZB Any Signal, MZB Burst Up, MZB Burst Down, MZB Extreme, MZB Return Up, MZB Return Down, MZB Webhook JSON.
🔶 LIMITATIONS
- MAD is robust but slower-reacting than stdev; bursts may persist a bit longer before being detected.
- The 1.4826 normalisation assumes Gaussian-like distributions; for heavy-tailed assets the conversion is approximate.
- Outlined squares (no glow stack) is a deliberate visual choice — the indicator looks unique but has slightly lower visibility than filled markers.
- Return-from-burst entry is mean-reversion oriented; not for breakout players.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
🔵Gain access to our powerful tools : forexobroker.com/tv
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
🔵Gain access to our powerful tools : forexobroker.com/tv
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/dominicwalsfxhtrader
All scripts & content provided by Forexobroker are for informational & educational purposes only.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.