OPEN-SOURCE SCRIPT
SMA Undervalue Buy Alerts

SMA Undervalue Buy Alerts
Free, open-source Pine v6 indicator for spotting undervalued ETF/stock entries
This simple yet powerful indicator plots two user-configurable Simple Moving Averages (default 100- and 200-day) on your chart and automatically marks any bar where price closes below those SMAs with an on-chart “BUY” triangle. It’s ideal for ETF traders who want a systematic, price-action-based signal whenever a major trend filter is breached to the downside—often a sign of short-term overselling in an otherwise up-trending market.
Key Features
Dual SMA Lines (default 100/200): Smooth out noise and highlight medium- and long-term trend backdrops
Automatic Buy Markers: Triangles appear beneath any candle that closes under your chosen SMA, so you never miss an overshoot
Built-in Alert Conditions: Four alert hooks—“Buy 100 SMA” and “Buy 200 SMA”—let you receive desktop, mobile or webhook notifications the moment a close beneath your SMAs occurs
Show/Hide Toggle: Quickly turn the SMA lines on or off without removing the script
100% Pine v6: Fast, lightweight, and compatible with all TradingView chart types
How to Use
Add to Chart: Copy & paste the Pine v6 code into TradingView’s Pine editor, then Save & Add to Chart.
Configure Inputs: Adjust “Short SMA Length” and “Long SMA Length” to your preferred look-back periods (e.g. 50/200, 20/50, etc.).
Create Alerts: In the Create Alert dialog, choose your indicator, then select “Buy 100 SMA” or “Buy 200 SMA” under Series. Set it to “Once Per Bar Close” for reliable signals.
Trade Management: Use the buy markers as entry triggers or confirm with volume, RSI, or other confluence tools before committing.
Best Practices
Trend Confirmation: Combine with a higher-TF trend filter (e.g. 200 SMA on weekly) to stay aligned with the broader market
Volume Check: Look for above-average volume on overshoot candles to validate institutional interest
Risk Control: Always define your stop (e.g. below the low of the signal bar) and position-size responsibly
Free, open-source Pine v6 indicator for spotting undervalued ETF/stock entries
This simple yet powerful indicator plots two user-configurable Simple Moving Averages (default 100- and 200-day) on your chart and automatically marks any bar where price closes below those SMAs with an on-chart “BUY” triangle. It’s ideal for ETF traders who want a systematic, price-action-based signal whenever a major trend filter is breached to the downside—often a sign of short-term overselling in an otherwise up-trending market.
Key Features
Dual SMA Lines (default 100/200): Smooth out noise and highlight medium- and long-term trend backdrops
Automatic Buy Markers: Triangles appear beneath any candle that closes under your chosen SMA, so you never miss an overshoot
Built-in Alert Conditions: Four alert hooks—“Buy 100 SMA” and “Buy 200 SMA”—let you receive desktop, mobile or webhook notifications the moment a close beneath your SMAs occurs
Show/Hide Toggle: Quickly turn the SMA lines on or off without removing the script
100% Pine v6: Fast, lightweight, and compatible with all TradingView chart types
How to Use
Add to Chart: Copy & paste the Pine v6 code into TradingView’s Pine editor, then Save & Add to Chart.
Configure Inputs: Adjust “Short SMA Length” and “Long SMA Length” to your preferred look-back periods (e.g. 50/200, 20/50, etc.).
Create Alerts: In the Create Alert dialog, choose your indicator, then select “Buy 100 SMA” or “Buy 200 SMA” under Series. Set it to “Once Per Bar Close” for reliable signals.
Trade Management: Use the buy markers as entry triggers or confirm with volume, RSI, or other confluence tools before committing.
Best Practices
Trend Confirmation: Combine with a higher-TF trend filter (e.g. 200 SMA on weekly) to stay aligned with the broader market
Volume Check: Look for above-average volume on overshoot candles to validate institutional interest
Risk Control: Always define your stop (e.g. below the low of the signal bar) and position-size responsibly
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.