
이 전략은 기술적 분석과 가격 행동을 결합한 트렌드 추적 시스템이다. 전략의 핵심은 9주기 및 15주기 지수 이동 평균 ((EMA) 을 트렌드 방향 지표로 사용하고, 동시에 전체 엔티티 그래프 ((Marubozu) 를 동력 확인 신호로 결합하여, 완전한 거래 의사 결정 시스템을 형성한다. 평행선의 교차와 가격 움직임의 분석을 통해, 전략은 시장의 주요 트렌드 변화를 포착하고 적절한 시간에 거래를 할 수 있다.
이 전략은 트레이딩 신호를 확인하기 위해 이중 필터링 메커니즘을 사용합니다. 첫째, 9주기 및 15주기 EMA를 사용하여 시장의 경향 방향을 결정합니다. 둘째, 동력 확인 신호로 가득 차있는 개체 그래프 형식을 식별합니다. 두 개의 EMA 위에 닫힌 개체 다중 이있을 때 시스템은 구매 신호를 생성합니다.
이 전략은 평형 시스템과 전체 실물 신호를 결합하여 안정적인 트렌드 추적 거래 시스템을 구축한다. 전략 설계는 트렌드 확인과 동력 확인의 두 차원을 충분히 고려하고 있으며, 우수한 신뢰성과 실용성을 가지고 있다. 합리적인 최적화 및 위험 제어 조치를 통해 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 수 있다. 전체적으로 논리적으로 엄격하고 실용적인 거래 전략 시스템이다.
/*backtest
start: 2024-10-25 00:00:00
end: 2024-11-24 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("9 & 15 EMA with Full Body Candle Strategy", overlay=true)
// Input parameters for EMAs
ema9Length = input.int(9, title="9-period EMA")
ema15Length = input.int(15, title="15-period EMA")
// Calculate the 9-period and 15-period EMAs
ema9 = ta.ema(close, ema9Length)
ema15 = ta.ema(close, ema15Length)
// Define full body (marubozu) candle conditions
fullBodyBullishCandle = (close > open) and (close - open >= (high - low) * 0.75)
fullBodyBearishCandle = (close < open) and (open - close >= (high - low) * 0.75)
// Buy condition: Full body candle closes above both EMAs
buySignal = fullBodyBullishCandle and close > ema9 and close > ema15
// Sell condition: Full body candle closes below both EMAs
sellSignal = fullBodyBearishCandle and close < ema9 and close < ema15
// Plot the EMAs on the chart
plot(ema9, color=color.blue, linewidth=2, title="9-period EMA")
plot(ema15, color=color.orange, linewidth=2, title="15-period EMA")
// Plot buy and sell signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small)
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small)
// Execute buy and sell strategy
if (buySignal)
strategy.entry("Buy", strategy.long)
if (sellSignal)
strategy.entry("Sell", strategy.short)
// Close buy position on sell signal
if (sellSignal)
strategy.close("Buy")
// Close sell position on buy signal
if (buySignal)
strategy.close("Sell")