OPEN-SOURCE SCRIPT
ATR Trend + RSI Pullback Strategy [Profit-Focused]

This strategy is designed to catch high-probability pullbacks during strong trends using a combination of ATR-based volatility filters, RSI exhaustion levels, and a trend-following entry model.
Strategy Logic
Rather than relying on lagging crossovers, this model waits for RSI to dip into oversold zones (below 40) while price remains above a long-term EMA (default: 200). This setup captures pullbacks in strong uptrends, allowing traders to enter early in a move while controlling risk dynamically.
To avoid entries during low-volatility conditions or sideways price action, it applies a minimum ATR filter. The ATR also defines both the stop-loss and take-profit levels, allowing the model to adapt to changing market conditions.
Exit logic includes:
Technical Details
Backtest Settings
This model is tuned for positive P&L across trending environments and volatile markets.
Educational Use Only
This strategy is for educational purposes only and should not be considered financial advice. Past performance does not guarantee future results. Always validate performance on multiple markets and timeframes before using it in live trading.
Strategy Logic
Rather than relying on lagging crossovers, this model waits for RSI to dip into oversold zones (below 40) while price remains above a long-term EMA (default: 200). This setup captures pullbacks in strong uptrends, allowing traders to enter early in a move while controlling risk dynamically.
To avoid entries during low-volatility conditions or sideways price action, it applies a minimum ATR filter. The ATR also defines both the stop-loss and take-profit levels, allowing the model to adapt to changing market conditions.
Exit logic includes:
- A take-profit at 3× the ATR distance
- A stop-loss at 1.5× the ATR distance
- An optional early exit if RSI crosses above 70, signaling overbought conditions
Technical Details
- Trend Filter: 200 EMA – must be rising and price must be above it
- Entry Signal: RSI dips below 40 during an uptrend
- Volatility Filter: ATR must be above a user-defined minimum threshold
- Stop-Loss: 1.5× ATR below entry price
- Take-Profit: 3.0× ATR above entry price
- Exit on Overbought: RSI > 70 (optional early exit)
Backtest Settings
- Initial Capital: $10,000
- Position Sizing: 5% of equity per trade
- Slippage: 1 tick
- Commission: 0.075% per trade
- Trade Direction: Long only
- Timeframes Tested: 15m, 1H, and 30m on trending assets like BTCUSD, NAS100, ETHUSD
This model is tuned for positive P&L across trending environments and volatile markets.
Educational Use Only
This strategy is for educational purposes only and should not be considered financial advice. Past performance does not guarantee future results. Always validate performance on multiple markets and timeframes before using it in live trading.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.