다이나믹 스톱로스 다중 다중 기간 RSI 추세 추적 전략

RSI EMA ATR
생성 날짜: 2024-12-05 16:25:17 마지막으로 수정됨: 2024-12-05 16:25:17
복사: 0 클릭수: 432
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

다이나믹 스톱로스 다중 다중 기간 RSI 추세 추적 전략

개요

이 전략은 1.5%의 위험 통제를 적용하고 수익을 증대하기 위해 레버리지를 결합합니다. 이 전략의 핵심은 여러 기술적 지표의 조합을 통해 트렌드를 확인하는 것과 동시에 동적 스톱 손실을 사용하여 자금을 보호하는 것입니다. 전략 설계는 소규모 자본 계좌의 특성을 충분히 고려하여 신속하고 빈번한 거래에 적합합니다.

전략 원칙

이 전략은 세 가지 주요 기술 지표를 사용한다: RSI ((상대적으로 강한 지표), EMA ((지수 이동 평균) 및 ATR ((평균 실제 파도) ᅳ 입문 신호는 단기 EMA ((9주기) 와 장기 EMA ((21주기) 의 교차 확인을 받으며, 동시에 RSI가 합리적인 범위 내에서 요구된다 ((다중 RSI <70, 공수 RSI> ᅳ30) 이 전략은 ATR 기반의 동적 중지 손실 방식을 채택하고, 중지 위치는 손실의 4배입니다. 이 설정은 수익을 보장하면서 위험을 제어 할 수 있습니다.

전략적 이점

  1. 엄격한 위험 관리: 일정한 비율의 위험 관리, 거래 당 1.5%의 위험 제한
  2. 다이내믹 스톱 디자인: ATR 기반의 다이내믹 스톱은 시장의 변동에 더 잘 적응할 수 있습니다.
  3. 다중 신호 확인: EMA 교차 협력 RSI 필터링, 신호 신뢰성을 향상
  4. 리스크/이익 비율 최적화: 4배의 스톱로스트로 더 나은 기대수익을 얻을 수 있다
  5. 소액 투자에 적합함: 소액 계좌의 특성을 고려하여 적당한 레버리지를 사용하여 수익 잠재력을 높이는 방법
  6. 높은 자동화: 모든 매개 변수가 조정되어 시장 상황에 따라 최적화됩니다.

전략적 위험

  1. 시장 변동 위험: 급격한 변동 시장에서 빈번한 단지를 유발할 수 있습니다.
  2. 리버리지 위험: 2배 리버리지로 손실이 커질 수 있다
  3. 가짜 침입 위험: EMA 교차로에서 가짜 신호가 발생할 수 있다
  4. 슬라이드 포인트 위험: 빠른 시장에서 큰 슬라이드 포인트가 발생할 수 있습니다.
  5. 자금 관리 위험: 지분 규모를 합리적으로 통제해야 한다

전략 최적화 방향

  1. 트렌드 필터를 추가: 더 긴 주기의 트렌드 판단을 추가할 수 있습니다.
  2. 진입 시점을 최적화: 통행량 지표를 결합하여 진입 지점을 개선할 수 있다.
  3. 동적 조정 파라미터: 변동률에 따라 ATR 배수를 자동으로 조정
  4. 시장 감정 지표를 도입: 감정 지표를 추가하여 고위험 시장 환경을 필터링하십시오.
  5. 자금 관리를 개선: 역동적인 포지션 관리 메커니즘을 추가

요약하다

이것은 합리적인 트렌드 추적 전략을 설계하여 여러 기술 지표의 조합을 통해 거래의 성공률을 높입니다. 전략의 위험 제어 메커니즘은 완벽하며 소액 계좌에 적합합니다. 그러나 실물 거래에서는 시장 환경의 변화에 주의를 기울이고 다른 시장 상태에 적응하기 위해 적절한 시기에 매개 변수를 조정해야합니다. 실물 이전에 충분한 재검토를 수행하고 작은 위치 아래 전략 특성을 단계적으로 적용하는 것이 좋습니다.

전략 소스 코드
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-04 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Aggressive Scalper Strategy", overlay=true)

// Parameters
account_balance = input.float(28.37, title="Account Balance", tooltip="Update this with your balance")
risk_per_trade = input.float(0.015, title="Risk per Trade", tooltip="1.5% risk")
leverage = input.int(2, title="Leverage", minval=1)
stop_loss_percentage = input.float(0.015, title="Stop Loss Percentage", tooltip="1.5% stop loss")
take_profit_multiplier = input.float(4, title="Take Profit Multiplier", tooltip="Take Profit is 4x Stop Loss")
stop_loss_multiplier = input.float(2, title="Stop Loss Multiplier", tooltip="Dynamic Stop Loss Multiplier")

// Trade Size Calculation
position_size = account_balance * risk_per_trade / (stop_loss_percentage / leverage)
trade_qty = position_size / close // This gives you the qty in terms of contracts

// Indicators
rsiLength = input.int(14, title="RSI Length")
emaShort = input.int(9, title="Short-term EMA Length")
emaLong = input.int(21, title="Long-term EMA Length")
rsi = ta.rsi(close, rsiLength)
emaShortLine = ta.ema(close, emaShort)
emaLongLine = ta.ema(close, emaLong)

// Entry Conditions
longCondition = ta.crossover(emaShortLine, emaLongLine) and rsi < 70
shortCondition = ta.crossunder(emaShortLine, emaLongLine) and rsi > 30

// ATR for dynamic stop loss and take profit levels
atrLength = input.int(14, title="ATR Length")
atrMultiplier = input.float(1.5, title="ATR Multiplier")
atr = ta.atr(atrLength)

// Dynamic Take Profit and Stop Loss Levels
longTakeProfitLevel = close + (atr * take_profit_multiplier)
longStopLossLevel = close - (atr * stop_loss_multiplier)
shortTakeProfitLevel = close - (atr * take_profit_multiplier)
shortStopLossLevel = close + (atr * stop_loss_multiplier)

// Strategy Execution
if (longCondition)
    strategy.entry("Long", strategy.long, qty=trade_qty)
    strategy.exit("Take Profit/Stop Loss", from_entry="Long", limit=longTakeProfitLevel, stop=longStopLossLevel)

if (shortCondition)
    strategy.entry("Short", strategy.short, qty=trade_qty)
    strategy.exit("Take Profit/Stop Loss", from_entry="Short", limit=shortTakeProfitLevel, stop=shortStopLossLevel)

// Alert Conditions
alertcondition(longCondition, title="Buy Signal", message="Long position entry signal detected.")
alertcondition(shortCondition, title="Sell Signal", message="Short position entry signal detected.")

// Display Information on Chart
var table_info = table.new(position.top_right, 2, 2, frame_color=color.blue, frame_width=1)
if (bar_index == na)
    table.cell(table_info, 0, 0, text="Aggressive Scalper", bgcolor=color.blue)
    table.cell(table_info, 1, 0, text="Account Balance: $" + str.tostring(account_balance), text_color=color.white)
    table.cell(table_info, 1, 1, text="Risk per Trade: " + str.tostring(risk_per_trade * 100) + "%", text_color=color.white)
    table.cell(table_info, 0, 1, text="Leverage: " + str.tostring(leverage) + "x", text_color=color.white)