Turtle Breakout Drawdown Adaptive Trading Strategy

Penulis:ChaoZhang, Tanggal: 2023-12-08 11:54:02
Tag:

img

Gambaran umum

Strategi ini terutama didasarkan pada prinsip trend breakout, dikombinasikan dengan metode channel breakout, menggunakan rel ganda yang cepat dan lambat untuk menerobos untuk menentukan arah tren. Strategi ini memiliki perlindungan ganda entri breakout dan keluar penarikan pada saat yang sama, yang dapat secara efektif menangani perubahan pasar yang tiba-tiba. Keuntungan terbesar dari strategi ini adalah dapat memantau penarikan akun secara real time. Ketika penarikan melebihi persentase tertentu, itu akan secara aktif mengurangi ukuran posisi. Ini memungkinkan strategi untuk secara efektif mengontrol risiko pasar dan resistensi risiko akun.

Logika Strategi

  1. Jalur ganda cepat dan lambat: Jalur cepat dan lambat digunakan untuk membangun saluran masing-masing. Jalur cepat merespons lebih cepat dan jalur lambat lebih halus. Tentukan arah tren dengan menggabungkan terobosan rel ganda.

  2. Breakout entry: pergi panjang ketika harga menembus saluran naik, dan pergi pendek ketika menembus saluran turun.

  3. Penarikan keluar: Pemantauan waktu nyata dari penarikan maksimum. Setelah titik keluar penarikan tercapai, itu akan secara aktif menghentikan kerugian untuk menutup posisi. Titik keluar penarikan dapat disesuaikan sesuai dengan kondisi pasar.

  4. Adaptive position sizing: Jumlah posisi disesuaikan secara real time berdasarkan ekuitas akun untuk menghindari risiko pasar. Semakin kecil drawdown akun, semakin sedikit posisi yang dipegang. Resistensi risiko yang lebih kuat.

Keuntungan

  1. Saluran rel ganda + entri breakout, penilaian tren yang lebih akurat.

  2. Stop loss dan mengambil keuntungan mekanisme secara efektif mengendalikan kerugian tunggal.

  3. Pemantauan real-time penggunaan akun dan penyesuaian aktif ukuran posisi untuk mengurangi risiko pasar.

  4. Ukuran posisi terkait dengan ekuitas akun dengan ketahanan risiko yang kuat untuk mengatasi perubahan pasar yang tiba-tiba.

Risiko

  1. Pengendalian penarikan dapat gagal di pasar yang tidak stabil, yang mengarah pada kerugian yang lebih besar.

  2. Beberapa sinyal terobosan yang tidak valid dapat terjadi ketika jalur cepat memasuki zona netral.

  3. Garis lambat terlalu halus untuk menangkap perubahan cepat dalam waktu.

  4. Ada risiko lock-in dengan posisi panjang dan pendek campuran.

Optimalisasi

  1. Tetapkan toleransi penarikan yang lebih tinggi untuk pasar yang tidak stabil untuk menghindari stop loss yang berlebihan.

  2. Tambahkan filter zona netral untuk menghindari sinyal yang tidak valid.

  3. Mengoptimalkan parameter saluran lambat untuk meningkatkan kecepatan respons ke pasar cepat.

  4. Tambahkan aturan pemesanan urutan pembukaan untuk menghindari kunci dengan posisi dua arah.

Kesimpulan

Secara keseluruhan, ini adalah strategi yang efektif yang cocok untuk perdagangan tren jangka menengah dan panjang. Keuntungan terbesar dari strategi ini adalah pemantauan penurunan real-time dan penyesuaian posisi secara dinamis. Ini memungkinkan strategi untuk menyesuaikan ukuran posisi secara otomatis dengan kemampuan beradaptasi yang kuat dengan pasar. Ketika ada perubahan pasar yang tajam atau fluktuasi harga, strategi dapat secara otomatis mengurangi ukuran posisi untuk secara efektif mencegah kerugian berkembang. Ini sulit untuk banyak strategi tradisional. Secara umum, ide strategi ini inovatif dengan kepraktisan yang kuat. Layak dijelajahi dan dioptimalkan untuk aplikasi.


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


Lebih banyak