
동적 위치 관리 RSI 오버 바이 역전 전략은 기술 지표와 동적 위치 관리를 결합한 단선 거래 전략이다. 이 전략은 주로 상대적으로 강한 지표 ((RSI) 와 간단한 이동 평균 ((SMA) 을 사용하여 잠재적인 오버 바이 상태와 역전 기회를 식별하고, 분량으로 포지션을 구축하는 방식으로 위험 수익률을 최적화한다. 전략의 핵심 아이디어는 자산 가격이 장기적인 하향 추세에 있고 단기간에 오버 바이가 발생했을 때 자리를 비우고, 시장에서 오버 판매 또는 추세 전환 신호가 발생했을 때 포지션을 평정하는 것이다.
이 전략의 작동 원리는 다음과 같은 몇 가지 핵심 단계를 포함한다:
동적 포지션 관리 RSI 오버 바이 역전 전략은 기술 분석과 위험 관리를 결합한 단선 거래 전략이다. 이 전략은 RSI 오버 바이 신호와 SMA 트렌드 판단을 활용하여 시장의 잠재적인 역전 기회를 포착하는 것을 목표로 한다. 그것의 분산된 포지션 구축과 동적 탈퇴 메커니즘은 리스크 수익률을 최적화하는 데 도움이 된다. 그러나, 투자자는 이 전략을 사용할 때 시장 위험과 기술 지표의 한계에 주의를 기울이고 실제 거래 환경에 따라 전략의 매개 변수와 논리를 지속적으로 최적화해야 한다.
/*backtest
start: 2024-08-26 00:00:00
end: 2024-09-24 08:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("TPS Short Strategy by Larry Conners", overlay=true)
// Define parameters as inputs
sma_length_200 = input.int(200, title="200-Day SMA Length")
rsi_length_2 = input.int(2, title="2-Period RSI Length")
sma_length_10 = input.int(10, title="10-Day SMA Length")
sma_length_30 = input.int(30, title="30-Day SMA Length")
// Define colors as RGB values
color_sma_200 = input.color(color.rgb(0, 0, 255), title="200-Day SMA Color") // Blue
color_sma_10 = input.color(color.rgb(255, 0, 0), title="10-Day SMA Color") // Red
color_sma_30 = input.color(color.rgb(0, 255, 0), title="30-Day SMA Color") // Green
// Calculate indicators
sma_200 = ta.sma(close, sma_length_200)
rsi_2 = ta.rsi(close, rsi_length_2)
sma_10 = ta.sma(close, sma_length_10)
sma_30 = ta.sma(close, sma_length_30)
// Define conditions
below_sma_200 = close < sma_200
rsi_2_above_75_two_days = rsi_2[1] > 75 and rsi_2 > 75
price_higher_than_entry = na(strategy.opentrades.entry_price(0)) ? false : close > strategy.opentrades.entry_price(0)
// Entry conditions
if (below_sma_200 and rsi_2_above_75_two_days and na(strategy.opentrades.entry_price(0)))
strategy.entry("Short", strategy.short, qty=1) // Short 10% of the position
// Scaling in conditions
if (price_higher_than_entry)
strategy.entry("Short2", strategy.short, qty=2) // Short 20% more of the position
if (price_higher_than_entry)
strategy.entry("Short3", strategy.short, qty=3) // Short 30% more of the position
if (price_higher_than_entry)
strategy.entry("Short4", strategy.short, qty=4) // Short 40% more of the position
// Exit conditions
exit_condition_rsi_below_30 = rsi_2 < 30
exit_condition_sma_cross = ta.crossover(sma_10, sma_30)
if (exit_condition_rsi_below_30 or exit_condition_sma_cross)
strategy.close_all() // Close all positions
// Plot indicators
plot(sma_200, color=color_sma_200, title="200-Day SMA")
plot(sma_10, color=color_sma_10, title="10-Day SMA")
plot(sma_30, color=color_sma_30, title="30-Day SMA")