
이 전략은 RSI (대비적으로 강한 지표) 를 기반으로 한 트렌드 추적 거래 시스템으로, 1: 4의 위험 / 이익 비율을 결합하여 거래 성과를 최적화합니다. 이 전략은 RSI 지표의 고점과 저점으로 형성 된 트렌드 라인을 식별하여, 돌파 할 때 진입하고, 고정 된 위험 / 이익 비율을 사용하여 중지 및 중지 위치를 설정하여 체계화된 거래 관리를 구현합니다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
이 전략은 RSI 브레이크와 고정 위험 수익률을 결합하여 전체적인 트렌드 추적 거래 시스템을 구축한다. 전략의 장점은 체계화된 의사결정 과정과 엄격한 위험 통제에 있다. 그러나 실제 적용에서는 가짜 브레이크와 시장 환경의 영향을 주의해야 한다. 제안된 최적화 방향을 통해 전략은 다양한 시장 환경 하에서 더 안정적인 성과를 낼 것으로 보인다.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-17 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Sunnysun7771
//@version=6
//@version=5
strategy("RSI Breakout Strategy with RR 1:4", overlay=true)
// Input parameters
rsi_length = input(14, title="RSI Length")
rsi_overbought = input(70, title="RSI Overbought Level")
rsi_oversold = input(30, title="RSI Oversold Level")
// Calculate RSI
rsi_value = ta.rsi(close, rsi_length)
// Identify previous RSI highs and lows
var float rsi_prev_high = na
var float rsi_prev_low = na
// Update previous RSI high
if (rsi_value > rsi_value[1] and rsi_value[1] < rsi_value[2])
rsi_prev_high := rsi_value[1]
// Update previous RSI low
if (rsi_value < rsi_value[1] and rsi_value[1] > rsi_value[2])
rsi_prev_low := rsi_value[1]
// Conditions for entering a long position
long_condition = rsi_value > rsi_prev_high and not na(rsi_prev_high)
// Conditions for entering a short position
short_condition = rsi_value < rsi_prev_low and not na(rsi_prev_low)
// Calculate stop loss and take profit for long positions
long_stop_loss = low[1] // Previous candle's low
long_take_profit = close + (4 * (close - long_stop_loss)) // RR 1:4
// Enter long position if all conditions are met
if (long_condition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", from_entry="Long", stop=long_stop_loss, limit=long_take_profit)
// Calculate stop loss and take profit for short positions
short_stop_loss = high[1] // Previous candle's high
short_take_profit = close - (4 * (short_stop_loss - close)) // RR 1:4
// Enter short position if all conditions are met
if (short_condition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", from_entry="Short", stop=short_stop_loss, limit=short_take_profit)
// Plotting RSI for visualization
hline(rsi_overbought, "Overbought", color=color.red)
hline(rsi_oversold, "Oversold", color=color.green)
plot(rsi_value, color=color.purple, title="RSI")