3-TP RSI-ATR Strategy [4h] by wielkieef
By wielkieef
Performance Metrics
- Author: wielkieef
- Symbol: INDEX:BTCUSD
- Timeframe: 4 hours
- Net P&L: +211,567.19 USD (+2,115.67%)
- Win Rate: 62.5%
- Profit Factor: 1.761
- Max Drawdown: 44,127.99 USD (23.11%)
- Total Trades: 280
Description
A trend-following strategy for the 4H timeframe that combines RSI momentum, dual SMA trend filter, ATR-based stop loss, and a three-level take profit structure.HOW IT WORKS ?Entries combine three conditions — momentum, trend, and volatility context:- MOMENTUM (RSI 14) — enters long when RSI crosses above the overbought threshold (default 70), short when RSI drops below oversold (default 30). Contrary to classic mean-reversion, this script treats extreme RSI values as trend confirmation, not reversal signals.- TREND FILTER (SMA 100 and SMA 200) — longs only taken when SMA 100 is above SMA 200 (bullish regime). Shorts only when SMA 100 is below SMA 200 (bearish regime). This keeps the strategy aligned with higher-timeframe momentum and filters out most countertrend setups.- STOP LOSS (ATR 14 × 1.5) — volatility-adjusted stop placed below entry for longs (above for shorts). ATR scaling means wider stops in volatile markets and tighter stops in quiet ones, instead of a fixed percentage.THE 3-TP EXIT STRUCTURE Instead of closing the full position at one target, the strategy splits the exit across three levels:TP 1 — closes 25% of the position at +10% profitTP 2 — closes 50% of the position at +20% profitTP 3 — the remaining 25% runs until one of these triggers: Opposite RSI signal, ATR stop is hitThis structure locks in gains early while leaving a runner open to capture extended trends. It is the main reason the strategy remains profitable even with imperfect entries — partial profits cushion drawdowns, and the trailing exit captures occasional outsized winners.DEFAULTS AND TUNINGDefaults are tuned for BTCUSD 4H:RSI Length: 14Overbought / Oversold: 70 / 30SMA Trend: 100 / 200ATR Length: 14ATR Multiplier: 1.5TP 1 / TP 2: 10% / 20%Position sizing: 75% of equityCommission: 0.03% per sideSlippage: 2 ticksFor lower timeframes (1H, 30m), reduce SMA lengths and tighten TP levels. For higher timeframes (1D), widen the ATR multiplier to 2.0-2.5 since daily swings are larger.WHAT TO WATCH OUT FOR- This is a TREND-FOLLOWING script. It loses money in tight ranges where RSI whipsaws between 30 and 70 without directional follow-through. The SMA trend filter mitigates this but does not eliminate it.- Performance varies by asset. Works best on high-volatility crypto majors (BTC, ETH) and major forex pairs. On low-volume altcoins, ATR stops can be too wide and eat into the TP 1 profit.- Commission settings matter. Default 0.03% reflects Binance futures fee levels. Spot trading with 0.1% fees will reduce net performance — adjust and re-test.- No repaint. All signals and exits trigger on bar close.DISCLAIMERPast performance in backtests does not guarantee future results. This script is published for educational and research purposes. Always forward-test before risking real capital.Open source — read the code, fork it, improve it. Feedback welcome in the comments.Check my profile for other published scripts.