トートルブレイクダウン 適応型取引戦略

作者: リン・ハーンチャオチャン, 日付: 2023-12-08 11:54:02
タグ:

img

概要

この戦略は,主にトレンドブレイクアウト原理をベースに,チャネルブレイクアウト方法と組み合わせて,トレンド方向を決定するために高速で遅いダブルレールを使用してブレイクアウトする.この戦略は,突発的な市場の変化に効果的に対処できる,同時にブレイクアウトエントリーと引き下げ出口の二重保護を持っています.この戦略の最大の利点は,リアルタイムで口座引き下げを監視できるということです.引き下げが一定パーセントを超えると,ポジションサイズを積極的に削減します. これにより,戦略は市場リスクと口座リスクレジスタンスを効果的に制御することができます.

戦略の論理

  1. 急速な線と遅い二重線: 急速な線と遅い線はそれぞれチャネルを構築するために使用されます. 急速な線はより速く反応し,遅い線はよりスムーズです. 双重線突破を組み合わせることでトレンド方向を決定します.

  2. ブレイクエントリー:価格が上向きチャネルを突破するとロング,下向きチャネルを突破するとショート.リスクを減らすためにストップオーダーを使用します.

  3. 引き上げ出口: 最大引き上げ出口のリアルタイムモニタリング.引き上げ出口点に達すると,ポジションを閉鎖する損失を積極的に停止します.引き上げ出口ポイントは市場状況に応じて調整できます.

  4. アダプティブ・ポジション・サイジング: 市場リスクを避けるために,アカウント・エクイティに基づいてポジションの数がリアルタイムで調整されます. 口座の引き下げが小さくなるほど,保有するポジションが少なくなります. リスク抵抗性が強くなります.

利点

  1. ダブルレールチャネル + ブレイクエントリ より正確なトレンド判断

  2. ストップ・ロスト・アンド・テイク・プロフィートのメカニズムは 単一の損失を効果的に制御します

  3. 口座の利用をリアルタイムに監視し,市場リスクを減らすためにポジションのサイズを積極的に調整する.

  4. ポジションサイズは,急激な市場の変化に対応するための強力なリスク抵抗性を持つ口座資本に結びついています.

リスク

  1. 不安定な市場では 引き下げ制御が失敗し より大きな損失につながる可能性があります

  2. 快速線が中立地帯に入ると 複数の無効の突破信号が発生する可能性があります

  3. 遅い線は ゆっくりと逆転する傾向を 捉えるには 滑りすぎます

  4. 長期と短期間の取引が混同されている場合,ロックインのリスクがあります.

最適化

  1. ストップロスの過剰を避けるため,不安定な市場に対してより高い引き下げ容量設定する.

  2. 中立ゾーンフィルタリングを追加して 無効な信号を避ける.

  3. 遅いチャネルのパラメータを最適化して,高速な市場への応答速度を向上させる.

  4. 2つの方向のポジションでロックを避けるために開示順序のソートルルルを追加します.

結論

一般的に,これは中長期トレンドトレーディングに適した効果的な戦略である.戦略の最大の利点は,リアルタイムの引き下げモニタリングとポジションのダイナミックな調整である. これにより,戦略は市場に適応力のあるポジションサイズを自動的に調整することができる.急激な市場変化または価格変動があるとき,戦略は自動的にポジションサイズを削減して損失を効果的に拡大するのを防ぐことができます.これは多くの伝統的な戦略にとって困難です.一般的に,この戦略のアイデアは強力な実用性を持つ革新的なものです.適用のために探求し最適化する価値があります.


//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)


もっと