OPEN-SOURCE SCRIPT
SunAlgo Wealth Builder | SMA20 + RSI20

Created by SunAlgo
This indicator is a swing trading strategy designed to help long-term investors and position traders grow wealth steadily by riding strong stock trends. It combines trend-following logic (SMA20) with a momentum confirmation filter (RSI20) to identify high-probability bullish entries and secure exits.
✅ Strategy Logic (Weekly Chart):
Entry Conditions:
Price crosses above the 20-week Simple Moving Average (SMA20) from below.
Then, RSI(20) crosses above 60, confirming bullish momentum.
A Buy signal is generated at the open of the candle where RSI > 60.
Exit Condition:
A Sell signal is triggered when the price closes below SMA20.
📈 Features:
Buy/Sell signals marked directly on the chart.
Labels display entry and exit prices, along with profit per share and % return.
Built specifically for weekly stock charts to avoid market noise and favor strong trends.
Plots the SMA20 for trend guidance and clarity.
💼 Ideal Use Case:
For stocks showing trend re-acceleration after pullbacks.
Works best on high-volume, fundamentally strong equities.
Suitable for long-term capital growth portfolios.
⚠️ Note:
This indicator is for educational and research purposes only. Always use proper risk management and trade with your own discretion.
🔗 Part of the growing SunAlgo Strategy Series — precision tools for disciplined wealth-building.
This indicator is a swing trading strategy designed to help long-term investors and position traders grow wealth steadily by riding strong stock trends. It combines trend-following logic (SMA20) with a momentum confirmation filter (RSI20) to identify high-probability bullish entries and secure exits.
✅ Strategy Logic (Weekly Chart):
Entry Conditions:
Price crosses above the 20-week Simple Moving Average (SMA20) from below.
Then, RSI(20) crosses above 60, confirming bullish momentum.
A Buy signal is generated at the open of the candle where RSI > 60.
Exit Condition:
A Sell signal is triggered when the price closes below SMA20.
📈 Features:
Buy/Sell signals marked directly on the chart.
Labels display entry and exit prices, along with profit per share and % return.
Built specifically for weekly stock charts to avoid market noise and favor strong trends.
Plots the SMA20 for trend guidance and clarity.
💼 Ideal Use Case:
For stocks showing trend re-acceleration after pullbacks.
Works best on high-volume, fundamentally strong equities.
Suitable for long-term capital growth portfolios.
⚠️ Note:
This indicator is for educational and research purposes only. Always use proper risk management and trade with your own discretion.
🔗 Part of the growing SunAlgo Strategy Series — precision tools for disciplined wealth-building.
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.