
동적 위험 관리 ATR 곱하기 교차 전략은 이동 평균 교차와 평균 실제 파도 (ATR) 을 기반으로 한 정량 거래 시스템이다. 이 전략은 단기 및 장기 간 간단한 이동 평균 (SMA) 의 교차로 입문 신호를 결정하며, ATR을 동적으로 사용하여 중지 손실, 중지 및 중지 손실 수준을 계산하여 위험 관리의 자동화 및 정밀화를 구현한다. 이 전략은 \(25,000의 초기 자금을 가진 계좌를 대상으로 설계되어 있으며, 매일 \)4,167의 수익률을 목표로 하고 있으며, 동적 포지션 컨트롤을 통해 이익과 위험을 균형을 맞추고 있다.
이 전략의 핵심 원칙은 기술 지표의 교차 신호와 동적 위험 관리 시스템을 결합하는 것입니다:
입력 신호 생성:
동적 위험 매개 변수 계산:
탈퇴 장치:
거래 실행 및 통지:
이 전략은 특히 위험과 이익의 비율에 초점을 맞추고, 3: 1의 이익과 위험 비율을 채택하고, 좋은 위험 관리 원칙을 따른다.
동적 위험 적응성:
명확한 출전규칙:
전체적인 위험 관리 프레임워크:
고도로 자동화:
시각적 도움말:
시장의 위조 신호:
ATR 변수 민감성:
추세 반전 위험:
재정 관리의 도전:
지점 리스크 실행:
진입 신호 최적화:
적응 변수 조정:
포지션 관리를 최적화:
시간 분기 정책 조정:
통합 시장 구조 분석:
동적 위험 관리 ATR 곱하기 교차 전략은 고전적인 기술 분석과 현대적 위험 관리를 결합한 정량 거래 시스템이다. 그것의 핵심 장점은 ATR을 통해 위험 매개 변수를 동적으로 조정하여 전략이 다른 시장 환경에 적응할 수 있도록 하는 것이다. 이 전략은 특히 변동성이 비교적 안정적이고 트렌드가 뚜렷한 시장에 적합하며, 간단한 이동 평균을 교차하여 거래 신호를 생성하면서 각 거래에 미리 정의된 위험 제어 매개 변수가 있는지 확인한다.
흔들림 시장의 잘못된 신호와 파라미터 민감성 등의 위험이 존재하지만, 추가 확인 지표, 적응 파라미터 조정 및 포지션 관리를 최적화하는 등의 조치를 통합하는 등 앞서 제시된 최적화 방향은 전략의 안정성과 적응력을 크게 향상시킬 수 있습니다. 궁극적으로, 이 전략은 간결성과 효과의 균형을 이루는 거래 프레임워크를 제공하며, 체계화된 거래의 기본 모델로 적합하며, 개인의 요구와 시장 특성에 따라 추가 조정 및 최적화를 할 수 있습니다.
/*backtest
start: 2024-07-17 00:00:00
end: 2025-07-15 08:00:00
period: 3d
basePeriod: 3d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":200000}]
*/
//@version=5
strategy("MYM Strategy for TradersPost", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === Inputs ===
atrLength = input.int(14, "ATR Length")
slMultiplier = input.float(1.5, "Stop Loss Multiplier")
tpMultiplier = input.float(3.0, "Take Profit Multiplier")
tsMultiplier = input.float(1.0, "Trailing Stop Multiplier")
// === ATR Calculation ===
atr = ta.atr(atrLength)
stopPts = atr * slMultiplier
takePts = atr * tpMultiplier
trailPts = atr * tsMultiplier
// === Example Entry Logic (crossover example) ===
shortSMA = ta.sma(close, 14)
longSMA = ta.sma(close, 28)
longCondition = ta.crossover(shortSMA, longSMA)
shortCondition = ta.crossunder(shortSMA, longSMA)
// === Example Exit Condition (optional close signal) ===
exitCondition = ta.cross(close, ta.sma(close, 10))
// === Entry & Alerts ===
if (longCondition)
// Build JSON message
stopVal = str.tostring(close - stopPts)
tpVal = str.tostring(close + takePts)
trailVal = str.tostring(trailPts)
longMessage = '{"action":"buy","symbol":"MYM","quantity":1,"order_type":"market","stop_loss":' + stopVal + ',"take_profit":' + tpVal + ',"trailing_stop":' + trailVal + ',"comment":"MYM Long Entry"}'
alert(longMessage, alert.freq_once_per_bar_close)
strategy.entry("Long", strategy.long)
if (shortCondition)
stopVal = str.tostring(close + stopPts)
tpVal = str.tostring(close - takePts)
trailVal = str.tostring(trailPts)
shortMessage = '{"action":"sell","symbol":"MYM","quantity":1,"order_type":"market","stop_loss":' + stopVal + ',"take_profit":' + tpVal + ',"trailing_stop":' + trailVal + ',"comment":"MYM Short Entry"}'
alert(shortMessage, alert.freq_once_per_bar_close)
strategy.entry("Short", strategy.short)
// === Optional Close Alert ===
if (exitCondition)
closeMessage = '{"action":"close_position","ticker":"MYM","comment":"MYM Close Position"}'
alert(closeMessage, alert.freq_once_per_bar_close)
strategy.close_all(comment="Exit Signal")
// === Visual aids ===
plot(shortSMA, color=color.orange)
plot(longSMA, color=color.blue)