삼중 드래곤 시스템

저자:차오장, 날짜: 2023-12-21 11:56:31
태그:

img

전반적인 설명

트리플 드래곤 시스템 (Triple Dragon System) 은 확장된 가격량 트렌드 (EPVT) 지표, 돈치안 채널 지표 및 파라볼리 SAR 지표를 결합한 복합 기술 거래 전략이다. 이 전략은 시장 트렌드 방향과 잠재적 인 구매 및 판매 신호를 식별하기 위해 세 가지 지표의 보완적인 강점을 활용합니다.

전략 원칙

이 전략은 먼저 EPVT와 돈치안 채널을 사용하여 시장 트렌드 방향을 결정합니다. EPVT가 기본 라인 이상이고 가격이 상부 돈치안 채널 이상일 때 상승 추세를 나타냅니다. 반대로 EPVT가 기본 라인 아래에 있고 가격이 하부 돈치안 채널 아래에있을 때 하락 추세를 나타냅니다.

트렌드 방향을 파악한 후, 이 전략은 특정 입점과 출구 지점을 식별하기 위해 파라볼릭 SAR 지표를 도입합니다. 파라볼릭 SAR가 가격 아래를 넘으면 구매 신호를 생성합니다. 파라볼릭 SAR가 가격 위로 넘으면 판매 신호를 생성합니다.

신호를 더욱 검증하기 위해, 이 전략은 또한 높은 변동성 기간 동안 시장에 진입하는 것을 피하기 위해 여러 시간 프레임에 걸쳐 트렌드 방향을 확인합니다. 또한, 여러 가지 수익 레벨이 수익을 차단하고 위험을 제어하도록 설정됩니다.

이점 분석

트리플 드래곤 시스템의 가장 큰 장점은 시장 트렌드를 보다 포괄적이고 정확하게 결정하기 위해 매우 보완적인 지표의 세 가지 다른 유형을 결합하여 사용하는 것입니다. 구체적으로 주요 장점은 다음과 같습니다.

  1. EPVT는 좋은 기본값으로 트렌드 변화점과 트렌드 강도를 정확하게 식별할 수 있습니다.
  2. 돈치안 채널은 트렌드 방향을 명확히 파악하고 트렌드를 잘 파악할 수 있습니다.
  3. 패러볼 SAR는 트렌드 지표와 결합하면 입구와 출구 지점을 더 정확하게 식별 할 수 있습니다.

지표를 유기적으로 결합함으로써 트리플 드래곤 시스템은 각 지표의 장점을 최대한 활용할 수 있으며, 이는 장기, 중장기 및 장기적인 경향을 판단하는 데 높은 정확성, 입문점과 출구점의 더 정확한 식별 및 우수한 위험/이익 비율을 초래합니다.

위험 분석

지표 포트폴리오 전략으로서 트리플 드래곤 시스템은 전반적으로 통제 가능한 위험을 가지고 있지만 여전히 몇 가지 위험을 주목해야 합니다.

  1. EPVT는 가짜 유출을 잘못 판단하고 큰 반전을 일으킬 위험이 있습니다.
  2. 치안 채널은 옆으로 통합되는 동안 좁아질 수 있으며 오류 신호의 확률을 증가시킵니다.
  3. 부적절한 Parabolic SAR 매개 변수 설정도 어느 정도 구매/판매 포인트 식별에 영향을 줄 수 있습니다.

위의 위험을 해결하기 위해, 우리는 표시기 매개 변수 설정을 적절히 조정하고 단일 표시기 실패의 가능성을 줄이기 위해 추가 판단을 위해 다른 표시기를 사용하는 것을 권장합니다. 또한, 올바른 스톱 로스 및 포지션 사이징은 전체 전략 위험 통제에 중요합니다.

전략 최적화

트리플 드래곤 시스템을 더 이상 최적화 할 수 있습니다.

  1. 자동화된 매개 변수 최적화를 위해 기계 학습 알고리즘을 도입할 수 있습니다.
  2. 변동성 지표는 안정성을 강화하는 것으로 간주 될 수 있습니다.
  3. 감정 지표는 대중의 감정 변동을 결정하기 위해 포함될 수 있습니다.

알고리즘 매개 변수 최적화, 다중 지표 조합 판단 및 행동 정량 분석을 통해 트리플 드래곤 시스템의 수익성 및 안정성을 더욱 향상시킬 가능성이 있습니다. 우리는 전략 시스템을 지속적으로 최적화하고 정비하기 위해 최첨단 산업 발전에 발맞추어 유지 할 것입니다.

결론

트리플 드래곤 시스템 (Triple Dragon System) 은 기술 지표 포트폴리오 전략으로 EPVT, 돈치안 채널 및 파라볼릭 SAR의 보완적인 강점을 활용하여 시장 트렌드를 결정하고 거래 기회를 식별합니다. 이 전략은 정확한 판단, 제어 가능한 위험, 여러 계층의 검증이 있으며 중장기 투자자에게 적합한 효과적인 시스템입니다. 우리는 우수한 위험 보상 비율을 위해 트리플 드래곤 시스템을 계속 최적화 할 것입니다.


/*backtest
start: 2023-11-20 00:00:00
end: 2023-12-20 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy(title="TRIPLE DRAGON SYSTEM", overlay=true,default_qty_type = strategy.percent_of_equity,default_qty_value=100,initial_capital=1000,pyramiding=0,commission_value=0.01)
/////////////// DRAG-ON ///// EMA'S /////////////// 
emar = ta.ema(close,5)
plot(emar, color=color.blue, title="S-Fast EMA")
//EMAlengthTRF = input.int(200, minval=1,title = "EMA Filter")
//ematrf = ta.ema(close,EMAlengthTRF)
//plot(ematrf, "EMA-TREND FILTER", color=color.red,linewidth = 4)
/////////////// 1-DRAG-ON /////EXTENDED PRICE VOLUME TREND /////////////// 
lenght = input(200,"EPVT - Trend Lenght")   
var cumVol = 0.
cumVol += nz(volume)
if barstate.islast and cumVol == 0
    runtime.error("No volume is provided by the data vendor.")
src = close

vt = ta.cum(ta.change(src)/src[1]*volume)
upx = ta.highest(vt,lenght)
downx = ta.lowest(vt,lenght)
basex = (upx +downx)/2
VTX = vt - basex

/////////////// 2-DRAG-ON ///// DON TREND /////////////// 

length = input.int(200, minval=1, title = "Donchian Lenght")
lower = ta.lowest(length)
upper = ta.highest(length)
basis = math.avg(upper, lower)

updiff = upper - close
downdiff = lower - close
dontrend = -(updiff + downdiff)   

xupx = ta.highest(dontrend,length) >0 ? ta.highest(dontrend,length) : 0 

xdownx = ta.lowest(dontrend,length) < 0 ?ta.lowest(dontrend,length) :0 
xxbasisxx = math.avg(xdownx, xupx)

inversedragup = xupx[1]  
inversedragdown = xdownx[1]  
inversedragon = (inversedragup+inversedragdown)/2

/////////////// 3-DRAG-ON ///// SUPER SAR-X /////////////// 
start = input(0.02)
increment = input(0.02)
maximum = input(0.8)
entry_bars = input(1, title='Entry on Nth trend bar')

atr = ta.atr(14)

atr := na(atr) ? ta.tr : atr

psar = 0.0  // PSAR
af = 0.0  // Acceleration Factor
trend_dir = 0  // Current direction of PSAR
ep = 0.0  // Extreme point
trend_bars = 0

sar_long_to_short = trend_dir[1] == 1 and close <= psar[1]  // PSAR switches from long to short
sar_short_to_long = trend_dir[1] == -1 and close >= psar[1]  // PSAR switches from short to long

trend_change = barstate.isfirst[1] or sar_long_to_short or sar_short_to_long

// Calculate trend direction
trend_dir := barstate.isfirst[1] and close[1] > open[1] ? 1 : barstate.isfirst[1] and close[1] <= open[1] ? -1 : sar_long_to_short ? -1 : sar_short_to_long ? 1 : nz(trend_dir[1])

trend_bars := sar_long_to_short ? -1 : sar_short_to_long ? 1 : trend_dir == 1 ? nz(trend_bars[1]) + 1 : trend_dir == -1 ? nz(trend_bars[1]) - 1 : nz(trend_bars[1])

// Calculate  Acceleration Factor
af := trend_change ? start : trend_dir == 1 and high > ep[1] or trend_dir == -1 and low < ep[1] ? math.min(maximum, af[1] + increment) : af[1]

// Calculate extreme point
ep := trend_change and trend_dir == 1 ? high : trend_change and trend_dir == -1 ? low : trend_dir == 1 ? math.max(ep[1], high) : math.min(ep[1], low)

// Calculate PSAR
psar := barstate.isfirst[1] and close[1] > open[1] ? low[1] : barstate.isfirst[1] and close[1] <= open[1] ? high[1] : trend_change ? ep[1] : trend_dir == 1 ? psar[1] + af * atr : psar[1] - af * atr

//////////////// MELODY ///////////////////
VTY = ta.valuewhen(ta.cross(VTX,0),close,0)
//plot(VTY, color=color.black, title="Extended-PVT")

//DONTRENDX = ta.valuewhen(ta.cross(dontrend,0),close,0)
//plot(DONTRENDX, color=color.red, title="DONCHIAN TREND")

SSARX = ta.valuewhen(ta.cross(psar,close),close,0)
//plot(SSARX, color=color.black, title="SSAR-X")

MAXDRAG = math.max(SSARX,VTY)
//plot(MAXDRAG, color=color.black, title="MAX DRAG")
MINDRAG = math.min(SSARX,VTY)
//plot(MINDRAG, color=color.black, title="MIN DRAG")
BASEDRAG = math.avg(MAXDRAG,MINDRAG)
//plot(BASEDRAG, color=color.red, title="BASE DRAG")


/////BUY AND SELL LOGIC ///////////
DRAGONBUY = (ta.crossover(close,MAXDRAG) or ta.crossover(close,MINDRAG) )
DRAGONBUYSTOP = (ta.crossunder(close,MAXDRAG) or ta.crossunder(close,MINDRAG)) 
DRAGONBUYPLOT = ta.valuewhen(DRAGONBUY==true,close,0)
plot(DRAGONBUYPLOT, color=color.red, title="BUY LINE")

DRAGONSELL = (ta.crossunder(close,MAXDRAG) or ta.crossunder(close,MINDRAG) ) 
DRAGONSELLSTOP = (ta.crossover(close,MAXDRAG) or ta.crossover(close,MINDRAG))
DRAGONSELLPLOT = ta.valuewhen(DRAGONSELL==true,close,0)
plot(DRAGONSELLPLOT, color=color.red, title="SELL LINE")

/////TAKE PROFIT LOGIC ///////////
tp1 = input.int(5, minval=1,title = "TP-1")
tp2 = input.int(10, minval=1,title = "TP-2")
tp3 = input.int(15, minval=1,title = "TP-3")

TPTAKA1B = DRAGONBUYPLOT*(1+tp1/100)
//plot(TPTAKA1B, "BUY-TP1", color=color.red,linewidth = 1)
TPTAKA2B = DRAGONBUYPLOT*(1+tp2/100)
//plot(TPTAKA2B, "BUY-TP2", color=color.red,linewidth = 1)
TPTAKA3B = DRAGONBUYPLOT*(1+tp3/100)
//plot(TPTAKA3B, "BUY-TP3", color=color.red,linewidth = 1)

TPTAKA1S = DRAGONSELLPLOT*(1-tp1/100)
//plot(TPTAKA1S, "SELL-TP1", color=color.red,linewidth = 1)
TPTAKA2S = DRAGONSELLPLOT*(1-tp2/100)
//plot(TPTAKA2S, "SELL-TP2", color=color.red,linewidth = 1)
TPTAKA3S = DRAGONSELLPLOT*(1-tp3/100)
//plot(TPTAKA3S, "SELL-TP3", color=color.red,linewidth = 1)


BUYTP = ta.crossunder(emar,TPTAKA1B) or ta.crossunder(emar,TPTAKA2B) or ta.crossunder(emar,TPTAKA3B) 
SELLTP = ta.crossover(emar,TPTAKA1B) or ta.crossover(emar,TPTAKA2B) or ta.crossover(emar,TPTAKA3B)

/////STRATEGY ///////////
// Enter condition 
longCondition = DRAGONBUY==true 
if longCondition
    strategy.entry('Long', strategy.long, comment = "ENTER-LONG")

// Exit condition 
strategy.close('Long', when=DRAGONBUYSTOP, comment = "EXIT-LONG")

// Enter condition 
ShortCondition = DRAGONSELL  
if ShortCondition
    strategy.entry('Short', strategy.short, comment = "ENTER-SHORT")

// Exit condition 
strategy.close('Short', when=DRAGONSELLSTOP, comment = "EXIT-SHORT")
///// END OF STRATEGY ///////////

더 많은