OPEN-SOURCE SCRIPT
Momentum Swing 1–3 Weeks

✅ Entry (LONG) Conditions
Price above EMA9 and SMA20
SMA20 > SMA50 (trend confirmation)
MACD above the signal line
RSI between 50–65 (healthy momentum)
Volume at least 20% above the 20-day average
When all conditions align, a LONG signal is generated.
✅ Exit (SELL) Conditions
Price closes below EMA9
MACD gives a bearish crossover
Or TP/SL levels are hit
Position is closed.
✅ Multi-Stage Take Profit
TP1: ATR × 1.5 → closes 50% of the position
TP2: ATR × 3.0 → closes remaining 50%
✅ Stop Loss
ATR × 1.5 dynamic SL
✅ What This Strategy Aims For
Catching early trend continuation signals
Filtering weak / low-volume breakouts
Exiting when momentum fades
Eliminating emotional decision-making through rules
📌 Note
Backtest performance may vary by symbol and volatility. Proper risk management is strongly recommended.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.