
이 전략은 상대적으로 약한 지표 (RSI) 를 기반으로 한 자기 적응 거래 시스템입니다. 전략은 M5 시간 주기에서 작동하며, RSI 지표의 초과 구매 초과 판매 수준을 모니터링하여 잠재적인 거래 기회를 식별합니다. 시스템은 고정된 중지 및 중지 비율을 설정하고 특정 거래 시간 내에 실행하도록 제한합니다. 전략은 자본의 비율 관리 방식을 채택하고, 각 거래에 총 자본의 10%를 투입합니다.
이 전략의 핵심은 RSI 지표의 14주기 내의 변동적 특성을 활용하여 거래하는 것입니다. RSI가 30의 초과 판매 수준보다 낮을 때, 시스템은 다중 신호를 냅니다. RSI가 70의 초과 판매 수준보다 높을 때, 시스템은 빈 신호를 냅니다. 거래는 시장의 큰 변동이있는 시기를 피하는 데 도움이되는 6:00-17:00 시간 창 내에서만 수행됩니다.
이것은 합리적이고 논리적으로 명확하게 설계된 거래 전략이다. RSI 지표를 통해 시장의 과매매 기회를 포착하고, 엄격한 위험 제어와 시간 관리를 결합하여 실전 응용 가치가 있다. 전략의 주요 장점은 시스템의 완전성과 동작의 명확성에 있다. 그러나 실장 거래에서는 여전히 시장 환경이 전략에 미치는 영향에 주의를 기울이고 실제 상황에 따라 적절한 매개 변수를 최적화해야합니다.
/*backtest
start: 2025-01-20 00:00:00
end: 2025-01-26 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("Gold Trading RSI", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Input parameters configuration
rsi_length = input.int(14, title="RSI Period") // RSI period
rsi_overbought = input.int(70, title="RSI Overbought Level") // Overbought level
rsi_oversold = input.int(30, title="RSI Oversold Level") // Oversold level
sl_percent = input.float(1.0, title="Stop Loss (%)") / 100 // Stop loss percentage
tp_percent = input.float(2.0, title="Take Profit (%)") / 100 // Take profit percentage
capital = strategy.equity // Current equity
// Calculate RSI on the 5-minute timeframe
rsi_m5 = ta.rsi(close, rsi_length)
// Get the current hour based on the chart's timezone
current_hour = hour(time)
// Limit trading to the hours between 6:00 AM and 5:00 PM
is_trading_time = current_hour >= 6 and current_hour < 17
// Entry conditions
long_condition = is_trading_time and rsi_m5 < rsi_oversold
short_condition = is_trading_time and rsi_m5 > rsi_overbought
// Calculate Stop Loss and Take Profit levels
sl_long = close * (1 - sl_percent)
tp_long = close * (1 + tp_percent)
sl_short = close * (1 + sl_percent)
tp_short = close * (1 - tp_percent)
// Enter trade
if (long_condition)
strategy.entry("Buy", strategy.long)
strategy.exit("Exit Buy", from_entry="Buy", stop=sl_long, limit=tp_long)
if (short_condition)
strategy.entry("Sell", strategy.short)
strategy.exit("Exit Sell", from_entry="Sell", stop=sl_short, limit=tp_short)