
이 전략은 EMA, 수요 지역 및 거래량을 결합한 고도로 적응 가능한 중개 전략이다. 이 전략은 여러 기술 지표의 교차 확인을 통해 시장 추세를 식별하고 핵심 수요 지역 인근에서 거래를 한다. 이 전략은 역동적인 정지 및 수익 목표를 채택하고 ATR 지표를 통해 시장 변동성에 적응한다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
구체적으로, 9주기 EMA가 3주기 연속으로 상승할 때, 15주기 EMA도 상승 경향을 보이고, 가격이 수요 영역 위에 있고, 20주기 거래량 평균선이 50주기 거래량 평균선보다 큰 경우, 시스템은 여러 신호를 발산한다. 공백 신호의 논리는 반대로 있다.
위험 관리 조치:
이것은 여러 가지 기술 분석 도구를 통합 한 완전한 거래 시스템이며, 여러 확인 메커니즘을 통해 거래의 신뢰성을 향상시킵니다. 전략의 장점은 자율성과 위험 관리 능력에 있습니다. 그러나 동시에 다양한 시장 환경에서 성능의 차이에 주의를 기울여야합니다. 제안 된 최적화 방향에 의해 전략은 더 향상 될 여지가 있습니다.
/*backtest
start: 2024-02-08 00:00:00
end: 2025-02-06 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Optimized Scalping Strategy with EMA & Supply/Demand Zones", overlay=true)
// Inputs
ema9_length = input(9, title="EMA 9 Length")
ema15_length = input(15, title="EMA 15 Length")
higher_tf = input.timeframe("15", title="Higher Timeframe for Zones")
atr_mult = input(1.5, title="ATR Multiplier for Stop Loss")
risk_reward = input.float(1.2, title="Risk-Reward Ratio", options=[1.2, 1.3, 1.4])
// Calculating EMAs
ema9 = ta.ema(close, ema9_length)
ema15 = ta.ema(close, ema15_length)
// Function to detect supply & demand zones
get_zone(tf) =>
high_tf_high = request.security(syminfo.tickerid, tf, ta.highest(high, 50))
high_tf_low = request.security(syminfo.tickerid, tf, ta.lowest(low, 50))
[high_tf_high, high_tf_low]
[supply_zone, demand_zone] = get_zone(higher_tf)
// ATR-based Stop Loss and Take Profit
atr = ta.atr(14)
long_sl = close - (atr * atr_mult)
long_tp = close + (atr * atr_mult * risk_reward)
short_sl = close + (atr * atr_mult)
short_tp = close - (atr * atr_mult * risk_reward)
// Entry conditions with volume and trend confirmation
longCondition = ta.rising(ema9, 3) and ta.rising(ema15, 3) and close > demand_zone and ta.sma(volume, 20) > ta.sma(volume, 50)
shortCondition = ta.falling(ema9, 3) and ta.falling(ema15, 3) and close < supply_zone and ta.sma(volume, 20) > ta.sma(volume, 50)
// Exit conditions using ATR-based SL/TP with additional trend confirmation
exitLong = (close >= long_tp or close <= long_sl) and ta.falling(ema9, 2)
exitShort = (close <= short_tp or close >= short_sl) and ta.rising(ema9, 2)
// Executing trades with improved risk management
if longCondition
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", from_entry="Long", stop=long_sl, limit=long_tp)
if shortCondition
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", from_entry="Short", stop=short_sl, limit=short_tp)
// Plotting
plot(ema9, color=color.blue, title="EMA 9")
plot(ema15, color=color.red, title="EMA 15")
plot(supply_zone, color=color.orange, title="Supply Zone")
plot(demand_zone, color=color.green, title="Demand Zone")