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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.