
이 전략은 다기간 이동평균과 거래량 가중평균가격(VWAP)을 결합한 추세추종 시스템입니다. 이 전략은 9개 기간, 50개 기간 및 200개 기간의 3개 단순 이동 평균(SMA)의 교차를 통해 추세 방향을 파악하고, VWAP를 가격 강도 확인 지표로 결합하여 다차원 거래 신호 확인 메커니즘을 구현합니다. 이 전략은 일중 거래(1분 차트)와 단기 거래(1시간 차트) 모두에 적합합니다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
동시에 긴 진입 조건을 충족해야 합니다.
단기 진입 조건은 동시에 충족되어야 합니다.
위험 관리 제안:
이는 다중 기간 이동 평균과 VWAP를 결합한 완전한 거래 시스템으로, 다중 확인 메커니즘을 통해 보다 신뢰할 수 있는 거래 신호를 제공합니다. 이 전략의 장점은 논리가 명확하고, 실행이 쉽고, 위험 관리 능력이 뛰어나다는 것입니다. 히스테리시스와 매개변수 민감성에는 특정 위험이 있지만, 추천되는 최적화 방향을 통해 전략의 안정성과 적응성을 더욱 개선할 수 있습니다. 이 전략은 기본 프레임워크로 적합하며, 트레이더는 자신의 트레이딩 스타일과 시장 환경에 맞게 이를 개인화할 수 있습니다.
/*backtest
start: 2024-12-06 00:00:00
end: 2025-01-05 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("SMA Crossover Strategy with VWAP", overlay=true)
// Input lengths for SMAs
sma9Length = 9
sma50Length = 50
sma200Length = 200
// Calculate SMAs
sma9 = ta.sma(close, sma9Length) // 9-period SMA
sma50 = ta.sma(close, sma50Length) // 50-period SMA
sma200 = ta.sma(close, sma200Length) // 200-period SMA
// Calculate VWAP
vwapValue = ta.vwap(close)
// Long entry condition: SMA 9 crosses above SMA 50 and SMA 200 is less than SMA 50, and close is above VWAP
longCondition = ta.crossover(sma9, sma50) and (sma200 < sma50) and (close > vwapValue)
if (longCondition)
strategy.entry("Long", strategy.long)
// Exit condition for long: SMA 9 crosses below SMA 50
longExitCondition = ta.crossunder(sma9, sma50)
if (longExitCondition)
strategy.close("Long")
// Short entry condition: SMA 9 crosses below SMA 50 and SMA 200 is greater than SMA 50, and close is below VWAP
shortCondition = ta.crossunder(sma9, sma50) and (sma200 > sma50) and (close < vwapValue)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Exit condition for short: SMA 9 crosses above SMA 50
shortExitCondition = ta.crossover(sma9, sma50)
if (shortExitCondition)
strategy.close("Short")
// Plotting the indicators on the chart
plot(sma9, color=color.blue, title="SMA 9")
plot(sma50, color=color.orange, title="SMA 50")
plot(sma200, color=color.red, title="SMA 200")
plot(vwapValue, color=color.green, title="VWAP")