OPEN-SOURCE SCRIPT
SMA Strategy with Re-Entry Signal (v6 Style)

*SMA Trend Strategy with Re-Entry Signal (v6 Edition)*
This indicator is based on a classic moving average trend-following system, enhanced with re-entry signals designed for medium to short-term traders.
---
### 📈 Key Features:
1. *Trend Detection Logic:*
- The 30-period SMA (SMA30) is used as the trend filter.
- When the closing price is above the SMA30, the market is considered to be in an uptrend.
2. *Re-Entry Signal:*
- While in an uptrend, if the closing price crosses above the SMA20, a re-entry (add position) signal is triggered.
- These signals are shown with green upward arrows below the bars.
3. *Background Highlighting:*
- Green background: indicates an uptrend.
- Red background: indicates a break below SMA30, suggesting weakening momentum.
4. *Multi-SMA Visualization:*
- Five SMAs are displayed: SMA10, SMA20, SMA30, SMA60, and SMA250.
- This helps visualize both short-term and long-term trend structures.
---
### 🔍 Usage Tips:
- Use this script directly on your main chart to monitor trend direction and wait for re-entry signals during pullbacks.
- Combine with other tools like volume, price action, or candlestick patterns to confirm entries.
---
### ⚠️ Disclaimer:
- This indicator is for educational and informational purposes only. It does not constitute financial advice or a buy/sell signal.
- Avoid relying solely on this script for trading decisions. Always manage your own risk.
---
👨💻 *Developer’s Note:*
This script is 100% manually developed, not copied or auto-generated. It is an original implementation based on my personal trading logic. Suggestions and feedback are welcome!
This indicator is based on a classic moving average trend-following system, enhanced with re-entry signals designed for medium to short-term traders.
---
### 📈 Key Features:
1. *Trend Detection Logic:*
- The 30-period SMA (SMA30) is used as the trend filter.
- When the closing price is above the SMA30, the market is considered to be in an uptrend.
2. *Re-Entry Signal:*
- While in an uptrend, if the closing price crosses above the SMA20, a re-entry (add position) signal is triggered.
- These signals are shown with green upward arrows below the bars.
3. *Background Highlighting:*
- Green background: indicates an uptrend.
- Red background: indicates a break below SMA30, suggesting weakening momentum.
4. *Multi-SMA Visualization:*
- Five SMAs are displayed: SMA10, SMA20, SMA30, SMA60, and SMA250.
- This helps visualize both short-term and long-term trend structures.
---
### 🔍 Usage Tips:
- Use this script directly on your main chart to monitor trend direction and wait for re-entry signals during pullbacks.
- Combine with other tools like volume, price action, or candlestick patterns to confirm entries.
---
### ⚠️ Disclaimer:
- This indicator is for educational and informational purposes only. It does not constitute financial advice or a buy/sell signal.
- Avoid relying solely on this script for trading decisions. Always manage your own risk.
---
👨💻 *Developer’s Note:*
This script is 100% manually developed, not copied or auto-generated. It is an original implementation based on my personal trading logic. Suggestions and feedback are welcome!
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.