OPEN-SOURCE SCRIPT
+25% DMA200

+25% DMA200 highlights daily over-extension by printing a ⚠️ marker on every daily candle where price is more than X% above the Daily 200 DMA (200-period SMA calculated on the Daily timeframe). It also plots the Daily DMA200 line on the chart. Recommended usage in GOLD, GLD, etc.
How it works
Computes DMA200 using Daily data
Measures extension: (Close − DMA200) / DMA200
If extension is above the threshold (default 0.25 = 25%), it places a ⚠️ above that candle (one per qualifying daily candle).
Optional alert triggers only when extension crosses above the threshold (entry into the over-extended zone).
Inputs
DMA Length (Daily): Moving average length (default 200).
Threshold: Over-extension level (0.25 = 25%).
Run ONLY on 1D chart: If enabled, marks/alerts only on Daily charts.
Pad above high: Vertical spacing for the marker above the candle’s high.
Keep last N markers: Limits how many markers are kept to avoid chart clutter.
Note
This is not a buy/sell signal—it’s a risk/extension detector to help identify when price is stretched far above its long-term daily mean.
How it works
Computes DMA200 using Daily data
Measures extension: (Close − DMA200) / DMA200
If extension is above the threshold (default 0.25 = 25%), it places a ⚠️ above that candle (one per qualifying daily candle).
Optional alert triggers only when extension crosses above the threshold (entry into the over-extended zone).
Inputs
DMA Length (Daily): Moving average length (default 200).
Threshold: Over-extension level (0.25 = 25%).
Run ONLY on 1D chart: If enabled, marks/alerts only on Daily charts.
Pad above high: Vertical spacing for the marker above the candle’s high.
Keep last N markers: Limits how many markers are kept to avoid chart clutter.
Note
This is not a buy/sell signal—it’s a risk/extension detector to help identify when price is stretched far above its long-term daily mean.
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.
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.
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.