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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。