
이 전략은 쌍평균선 ((빠른 EMA와 느린 EMA) 을 기반으로 한 동적 지역 트렌드 추적 시스템이다. 가격과 쌍평균선 사이의 위치 관계에 대해 서로 다른 거래 지역을 구분하여, 동적 색상 지시 시스템과 결합하여 거래자에게 명확한 매매 신호를 제공한다. 전략은 고전적인 평평선 교차 이론을 채택하고, 지역 분할의 혁신적인 방법을 통해 전통적인 쌍평균선 시스템의 작동성을 향상시킨다.
이 전략의 핵심은 빠른 EMA (기본 12주기) 와 느린 EMA (기본 26주기) 의 교차 관계를 통해 가격 위치와 결합하여 시장 상태를 여섯 가지 다른 영역으로 나누는 것입니다. 빠른 선이 느린 선 위에 있을 때, 시장은 다중 트렌드에 있다고 간주되며, 반대로 공백 트렌드로 간주됩니다. 이 두 평행 선에 대한 가격의 위치는 구체적인 거래 영역을 더욱 세분화합니다.
이 전략은 전통적인 쌍방향 시스템과 현대적인 구역화 개념을 결합한 트렌드 추적 전략이다. 직관적인 시각적 피드백과 명확한 거래 규칙으로 거래자에게 신뢰할 수있는 거래 프레임 워크를 제공합니다. 일률적인 시스템의 고유한 지연 문제가 있음에도 불구하고, 합리적인 파라미터 최적화 및 위험 관리를 통해 이 전략은 트렌드 시장에서 안정적인 성능을 얻을 수 있습니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-27 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("NUTJP CDC ActionZone 2024", overlay=true, precision=6, commission_value=0.1, slippage=3)
//****************************************************************************//
// CDC Action Zone is based on a simple EMA crossover
// between [default] EMA12 and EMA26
//****************************************************************************//
// Define User Input Variables
xsrc = input.source(title='Source Data', defval=close)
xprd1 = input.int(title='Fast EMA period', defval=12)
xprd2 = input.int(title='Slow EMA period', defval=26)
xsmooth = input.int(title='Smoothing period (1 = no smoothing)', defval=1)
fillSW = input.bool(title='Paint Bar Colors', defval=true)
fastSW = input.bool(title='Show fast moving average line', defval=true)
slowSW = input.bool(title='Show slow moving average line', defval=true)
xfixtf = input.bool(title='** Use Fixed time frame Mode (advanced) **', defval=false)
xtf = input.timeframe(title='** Fix chart to which time frame? **', defval='D')
startDate = input(timestamp("2018-01-01 00:00"), title="Start Date")
endDate = input(timestamp("2069-12-31 23:59"), title="End Date")
//****************************************************************************//
// Calculate Indicators
f_secureSecurity(_symbol, _res, _src) => request.security(_symbol, _res, _src[1], lookahead=barmerge.lookahead_on)
xPrice = ta.ema(xsrc, xsmooth)
FastMA = xfixtf ? ta.ema(f_secureSecurity(syminfo.tickerid, xtf, ta.ema(xsrc, xprd1)), xsmooth) : ta.ema(xPrice, xprd1)
SlowMA = xfixtf ? ta.ema(f_secureSecurity(syminfo.tickerid, xtf, ta.ema(xsrc, xprd2)), xsmooth) : ta.ema(xPrice, xprd2)
Bull = FastMA > SlowMA
Bear = FastMA < SlowMA
// Define Color Zones
Green = Bull and xPrice > FastMA
Red = Bear and xPrice < FastMA
// Buy and Sell Conditions
buycond = Green and not Green[1]
sellcond = Red and not Red[1]
inDateRange = true
if inDateRange
if buycond
strategy.entry("Long", strategy.long, qty=1)
if sellcond
strategy.close("Long")
//****************************************************************************//
// Display color on chart
bColor = Green ? color.green :
Red ? color.red :
color.black
barcolor(color=fillSW ? bColor : na)
// Display MA lines
FastL = plot(fastSW ? FastMA : na, "Fast EMA", color=color.new(color.red, 0), style=xfixtf ? plot.style_stepline : plot.style_line)
SlowL = plot(slowSW ? SlowMA : na, "Slow EMA", color=color.new(color.blue, 0), style=xfixtf ? plot.style_stepline : plot.style_line)
fill(FastL, SlowL, Bull ? color.new(color.green, 90) : (Bear ? color.new(color.red, 90) : na))