토르트 브레이크 아웃 드래운드 적응형 거래 전략

저자:차오장, 날짜: 2023-12-08 11:54:02
태그:

img

전반적인 설명

이 전략은 주로 트렌드 브레이크아웃 원리에 기반하고 있으며, 채널 브레이크아웃 방법과 결합하여 트렌드 방향을 결정하기 위해 빠르고 느린 이중 레일을 사용하여 브레이크아웃 진입과 드래운드 출구를 동시에 두 배 보호하여 갑작스러운 시장 변화에 효과적으로 대처할 수 있습니다. 전략의 가장 큰 장점은 실시간으로 계좌 드래운드를 모니터링 할 수 있다는 것입니다. 드래운드가 특정 비율을 초과하면 적극적으로 포지션 크기를 줄일 것입니다. 이것은 전략이 시장 위험과 계좌 위험 저항을 효과적으로 제어 할 수있게합니다.

전략 논리

  1. 빠른 및 느린 이중 레일: 빠른 및 느린 라인은 각각 채널을 구축하는 데 사용됩니다. 빠른 라인은 더 빨리 반응하고 느린 라인은 더 부드럽습니다. 이중 레일 돌파구를 결합하여 트렌드 방향을 결정하십시오.

  2. 브레이크아웃 엔트리: 가격이 상승 채널을 뚫고 갈 때 길게, 하락 채널을 뚫고 갈 때 짧게. 위험을 줄이기 위해 스톱 오더를 사용하십시오.

  3. 마감 출구: 최대 마감의 실시간 모니터링. 마감 출구 지점이 도달되면 포지션을 닫기 위해 손실을 적극적으로 중지합니다. 마감 출구 지점은 시장 조건에 따라 조정 될 수 있습니다.

  4. 적응형 포지션 사이즈: 시장 위험을 피하기 위해 계정 자금에 따라 실시간으로 포지션 수를 조정합니다. 계정 마감량이 작을수록 보유 포지션이 적습니다. 더 강한 위험 저항성.

장점

  1. 더블 레일 채널 + 브레이크아웃 엔트리, 더 정확한 트렌드 판단

  2. 스톱 로즈와 수익 메커니즘은 단일 손실을 효과적으로 제어합니다.

  3. 계좌 사용량 실시간 모니터링 및 시장 위험을 줄이기 위해 포지션 크기의 적극적인 조정

  4. 포지션 크기는 급격한 시장 변화에 대처하기 위해 강력한 위험 저항력을 가진 계정 자금과 연결되어 있습니다.

위험성

  1. 유동성 있는 시장에서 유출 통제가 실패할 수 있고 더 큰 손실로 이어질 수 있습니다.

  2. 빠른 선이 중립 구역에 들어갈 때 여러 개의 유효하지 않은 신호가 발생할 수 있습니다.

  3. 느린 선은 시간이 지남에 따라 급격한 역행 경향을 포착하기에는 너무 부드럽습니다.

  4. 롱과 쇼트 포지션이 섞여 있는 경우 로크인 위험이 있습니다.

최적화

  1. 유동성 있는 시장에 대해 더 높은 마감 허용을 설정하여 손실을 멈추는 것을 피합니다.

  2. 중립 구역 필터링을 추가해서 유효하지 않은 신호를 피합니다.

  3. 느린 채널의 매개 변수를 최적화하여 빠른 시장에 대한 응답 속도를 향상시킵니다.

  4. 두 방향 포지션으로 잠금되는 것을 피하기 위해 시작 순서 분류 규칙을 추가합니다.

결론

전체적으로, 이것은 중장기 트렌드 트레이딩에 적합한 효과적인 전략이다. 전략의 가장 큰 장점은 실시간 드라우다운 모니터링과 포지션의 동적 조정이다. 이것은 전략이 시장에 강한 적응력을 가지고 자동으로 포지션 크기를 조정할 수 있게 한다. 급격한 시장 변화 또는 가격 변동이 있을 때, 전략은 손실이 확장되는 것을 효과적으로 방지하기 위해 자동으로 포지션 크기를 줄일 수 있다. 이것은 많은 전통적인 전략에 어려운 일이다. 일반적으로, 이 전략의 아이디어는 강력한 실용성을 가진 혁신적이다. 응용을 위해 탐색하고 최적화 할 가치가 있다.


//Noro
//2020

//Original idea from «Way of the Turtle: The Secret Methods that Turned Ordinary People into Legendary Traders» (2007, CURTIS FAITH, ISBN: 9780071486644) 

//@version=4
strategy("Noro's Turtles Strategy", shorttitle = "Turtles str", overlay = true, default_qty_type = strategy.percent_of_equity, initial_capital = 100, default_qty_value = 100, commission_value = 0.1)

//Settings
needlong = input(true, title = "Long")
needshort = input(false, title = "Short")
sizelong = input(100, defval = 100, minval = 1, maxval = 10000, title = "Lot long, %")
sizeshort = input(100, defval = 100, minval = 1, maxval = 10000, title = "Lot short, %")
needfast = input(true, title = "Fast")
needslow = input(true, title = "Slow")
enter_fast = input(20, minval=1)
exit_fast = input(10, minval=1)
enter_slow = input(55, minval=1)
exit_slow = input(20, minval=1)
showof = input(true, title = "Show offset")
showll = input(false, title = "Show lines")
showlabel = input(true, defval = true, title = "Show label")
fromyear = input(1900, defval = 1900, minval = 1900, maxval = 2100, title = "From Year")
toyear = input(2100, defval = 2100, minval = 1900, maxval = 2100, title = "To Year")
frommonth = input(01, defval = 01, minval = 01, maxval = 12, title = "From Month")
tomonth = input(12, defval = 12, minval = 01, maxval = 12, title = "To Month")
fromday = input(01, defval = 01, minval = 01, maxval = 31, title = "From day")
today = input(31, defval = 31, minval = 01, maxval = 31, title = "To day")

//Fast
fastL = highest(enter_fast)
fastLC = lowest(exit_fast)
fastS = lowest(enter_fast)
fastSC = highest(exit_fast)

//Slow
slowL = highest(enter_slow)
slowLC = lowest(exit_slow)
slowS = lowest(enter_slow)
slowSC = highest(exit_slow)

//Lines
offset = showof ? 1 : 0
col1 = showll and needlong and needfast ? color.blue : na
col2 = showll and needshort and needfast ? color.red : na
col3 = showll and needlong and needslow ? color.blue : na
col4 = showll and needshort and needslow ? color.red : na
plot(fastL, color = col1, offset = offset)
plot(fastLC, color = col1, offset = offset)
plot(fastS, color = col2, offset = offset)
plot(fastSC, color = col2, offset = offset)
plot(slowL, color = col3, offset = offset)
plot(slowLC, color = col3, offset = offset)
plot(slowS, color = col4, offset = offset)
plot(slowSC, color = col4, offset = offset)

//Orders
truetime = time > timestamp(fromyear, frommonth, fromday, 00, 00) and time < timestamp(toyear, tomonth, today, 23, 59)
size = strategy.position_size
lotlong = 0.0
lotlong := size != size[1] ? strategy.equity / close * sizelong / 100 : lotlong[1]
lotshort = 0.0
lotshort := size != size[1] ? strategy.equity / close * sizeshort / 100 : lotshort[1]

//Fast
strategy.entry("fast L", strategy.long, lotlong, stop = fastL, when = needfast and needlong and strategy.position_size == 0 and truetime)
strategy.entry("fast S", strategy.short, lotshort, stop = fastS, when = needfast and needshort and strategy.position_size == 0 and truetime)
strategy.exit("fast L", stop = fastLC, when = needfast and needlong and strategy.position_size > 0)
strategy.exit("fast S", stop = fastSC, when = needfast and needshort and strategy.position_size < 0)

//Slow
strategy.entry("slow L", strategy.long, lotlong, stop = slowL, when = needslow and needlong and strategy.position_size == 0 and truetime)
strategy.entry("slow S", strategy.short, lotshort, stop = slowS, when = needslow and needshort and strategy.position_size == 0 and truetime)
strategy.exit("slow L", stop = slowLC, when = needslow and needlong and strategy.position_size > 0)
strategy.exit("slow S", stop = slowSC, when = needslow and needshort and strategy.position_size < 0)

if time > timestamp(toyear, tomonth, today, 23, 59)
    strategy.close_all()
    strategy.cancel("fast L")
    strategy.cancel("fast S")
    strategy.cancel("slow L")
    strategy.cancel("slow S")
    
if showlabel

    //Drawdown
    max = 0.0
    max := max(strategy.equity, nz(max[1]))
    dd = (strategy.equity / max - 1) * 100
    min = 100.0
    min := min(dd, nz(min[1]))
    
    //Label
    min := round(min * 100) / 100
    labeltext = "Drawdown: " + tostring(min) + "%"
    var label la = na
    label.delete(la)
    tc = min > -100 ? color.white : color.red
    osx = timenow + round(change(time)*10)
    osy = highest(100)


더 많은