이것은 RSI (비례 강도 지수) 지표에 기반한 단기 거래 전략입니다. 시장의 잠재적 인 강도와 약점을 식별하기 위해 RSI를 활용하여 거래 결정을 지원합니다.
이 전략은 5주기 RSI를 사용하여 단기 가격 동력을 파악합니다. RSI 곡선의 정점과 바닥을 기반으로 엔트리 및 스톱 로스 수준을 결정합니다.
긴 출입 조건: 이전 촛불의 RSI는 50보다 낮고 현재 촛불의 RSI는 60보다 높습니다.
출구 조건: RSI 곡선이 약화 추세를 나타내는 낮은 최저치를 기록하면 긴 포지션을 닫습니다.
최적화:
이 전략은 명확한 긴 엔트리 및 스톱 로스 규칙을 설정하기 위해 RSI 정점과 바닥의 반전 패턴을 활용합니다. 논리는 간단하고 실용적이지만 약간의 불안감을 가지고 있습니다. 매개 변수 최적화 및 지표 조합을 통해 전략 안정성이 향상 될 수 있습니다.
/*backtest start: 2024-01-14 00:00:00 end: 2024-01-21 00:00:00 period: 30m basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("*RSI 5 - Long only- Daily charts & above*", overlay = false) // Define inputs rsi_length = input(5, "RSI Length") // Calculate indicators rsi = ta.rsi(close, rsi_length) // Entry conditions long = rsi[1] < 50 and rsi > 60 // Exit conditions longExit = rsi < rsi[1] // Execute trade with adjusted position size if (long) strategy.entry("Long", strategy.long) if (longExit) strategy.close("LongExit") // Close long position if long exit condition is met if (longExit) strategy.close("Long", comment="Long exit") rsiPlot = plot(rsi, "RSI", color=#7E57C2) rsiUpperBand = hline(60, "RSI Upper Band", color=#787B86) midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50)) rsiLowerBand = hline(40, "RSI Lower Band", color=#787B86) fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")