This strategy is a trend-following system based on RSI and Supertrend indicators, combined with ATR volatility for risk management. The strategy determines entry timing through trend signals and overbought/oversold zones, using dynamic stop-loss and take-profit levels based on market volatility. It operates on a 15-minute timeframe with a default 15% capital allocation rule.
The strategy operates on several core elements:
This is a well-structured trend-following strategy with clear logic. By organically combining Supertrend, RSI, and ATR indicators, it achieves both trend capture and risk control. The strategy’s core strengths lie in its adaptability and risk management framework, though practical application requires appropriate parameter adjustment and optimization based on market conditions.
/*backtest start: 2023-12-02 00:00:00 end: 2024-11-28 08:00:00 period: 3d basePeriod: 3d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("ETH Signal 15m", overlay=true) // Backtest period start_time = input(timestamp("2024-08-01 00:00"), title="Backtest Start Time") end_time = input(timestamp("2054-01-01 00:00"), title="Backtest End Time") atrPeriod = input(12, "ATR Length") factor = input.float(2.76, "Factor", step=0.01) rsiLength = input(12, title="RSI Length") rsiOverbought = input(70, title="RSI Overbought Level") rsiOversold = input(30, title="RSI Oversold Level") [_, direction] = ta.supertrend(factor, atrPeriod) rsi = ta.rsi(close, rsiLength) // Ensure current time is within the backtest period in_date_range = true // Long condition: Supertrend buy signal and RSI not overbought if in_date_range and ta.change(direction) < 0 and rsi < rsiOverbought strategy.entry("Long", strategy.long) // Short condition: Supertrend sell signal and RSI not oversold if in_date_range and ta.change(direction) > 0 and rsi > rsiOversold strategy.entry("Short", strategy.short) // Optional: Add stop loss and take profit using ATR atr = ta.atr(atrPeriod) strategy.exit("Exit Long", "Long", stop=close - 4 * atr, limit=close + 2 * atr) strategy.exit("Exit Short", "Short", stop=close + 4 * atr, limit=close - 2.237 * atr)