
이 전략은 RSI (상대적으로 강한 지표) 를 기반으로 한 단선 거래 전략이다. RSI 지표를 사용하여 시장의 잠재적인 강한 약 상태를 식별하여 거래 결정을 보조한다.
이 전략은 5주기 RSI 지표를 사용하여 단선 가격 움직임을 포착합니다. RSI 곡선의 높음과 낮음에 따라 입점과 종료 시기를 판단합니다.
다단계 포지션에 들어가는 조건은: 이전 K선의 RSI 값이 50보다 낮고, 현재 K선의 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")