
이 전략은 여러 가지 기술 분석 지표가 결합된 혼합 거래 시스템이다. 그것은 주로 평균선 시스템 (EMA) 을 기반으로 시장의 추세를 판단하고, 지원 저항 (SR) 수준을 입력 신호로 결합하고, 실제 변동의 폭 (ATR) 을 사용하여 위험을 제어한다. 전략은 동적인 중지 손실 설정을 채택하여 시장의 변동성에 따라 중지 손실 위치를 조정할 수 있다.
이 전략은 다음과 같은 핵심 구성 요소를 기반으로 운영됩니다.
신호 필터링 최적화
포지션 관리 최적화
손해 방지 최적화
이 전략은 여러 정교한 기술적 분석 방법을 결합하여 완전한 거래 시스템을 구축한다. 그것의 핵심 장점은 시스템의 적응성과 위험 제어 능력에 있다. 지속적인 최적화와 개선으로, 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 것으로 보인다.
/*backtest
start: 2024-02-18 00:00:00
end: 2025-02-16 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Multi-Strategy Trader v1 by SUNNY GUHA +91 9836021040 / www.oiesu.com", overlay=true)
// Basic Inputs
supResLookback = input.int(9, "Support/Resistance Lookback")
atrPeriod = input.int(14, "ATR Period")
stopMultiplier = input.float(10.0, "Stop Loss ATR Multiplier")
// Technical Indicators
atr = ta.atr(atrPeriod)
highestHigh = ta.highest(high, supResLookback)
lowestLow = ta.lowest(low, supResLookback)
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
// Basic Strategy Rules
isTrending = math.abs(ema20 - ema50) > atr
longSignal = close > highestHigh[1] or (isTrending and ema20 > ema50 and close > ema20)
shortSignal = close < lowestLow[1] or (isTrending and ema20 < ema50 and close < ema20)
// Entry Logic
if longSignal and strategy.position_size <= 0
strategy.entry("Long", strategy.long)
if shortSignal and strategy.position_size >= 0
strategy.entry("Short", strategy.short)
// Stop Loss Logic
longStopPrice = close - (atr * stopMultiplier)
shortStopPrice = close + (atr * stopMultiplier)
// Exit Logic
if strategy.position_size > 0
strategy.exit("Long Exit", "Long", stop=longStopPrice)
if strategy.position_size < 0
strategy.exit("Short Exit", "Short", stop=shortStopPrice)
// Basic Plotting
plot(ema20, "EMA 20", color.blue)
plot(ema50, "EMA 50", color.red)