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
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。