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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.