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