
Sistem double overshooting reversal breakout adalah strategi kuantitatif yang menggabungkan trend tracking dan reversal trading. Strategi ini menghasilkan sinyal beli dengan menghitung apakah ada sinyal overshooting berturut-turut pada harga penutupan N hari sebelum harga saham dibandingkan; sekaligus menghasilkan sinyal jual dengan menghitung rata-rata bergerak T3 dari parameter tertentu, untuk mencapai perlindungan keuntungan.
Strategi ini terdiri dari dua bagian:
Menurut buku ini, sistem berbalik ini mengamati perubahan harga penutupan selama N hari terakhir, dan jika harga penutupan hari ini naik lebih tinggi dari hari sebelumnya, dan harga penutupan dua hari sebelumnya turun, maka dianggap sebagai sinyal overbought dua hari berturut-turut, sistem ini menghasilkan sinyal beli. Selain itu, sistem ini juga akan menggabungkan indikator STOCH, jika garis cepat STOCH hari ini lebih rendah dari garis lambat, untuk lebih mengkonfirmasi validitas sinyal beli.
Rata-rata bergerak T3 adalah rata-rata bergerak indeks yang dihitung berdasarkan rumus tertentu yang digabungkan dengan harga. Ini mengatur sensitivitas rata-rata bergerak terhadap perubahan harga melalui parameter tertentu.
Strategi ini akan menggabungkan dua bagian sinyal di atas, yang masing-masing menghasilkan sinyal perdagangan yang sebenarnya ketika sinyal beli 123 reversed dan sinyal jual T3 moving average terpenuhi secara bersamaan.
Langkah-langkah yang dapat diambil untuk mengatasi risiko adalah sebagai berikut:
Strategi ini dapat dioptimalkan dalam beberapa hal:
Anda dapat menambahkan indikator teknis lainnya sebagai syarat penyaringan, seperti persyaratan terobosan untuk meningkatkan volume transaksi, dan lain-lain, untuk menghindari kesalahan transaksi yang disebabkan oleh kebisingan.
Anda dapat melakukan pengembalian dengan berbagai kombinasi parameter, memilih kombinasi yang sesuai dengan tingkat pengembalian tertinggi untuk mengoptimalkan efek strategi. Anda juga dapat mengatur parameter dinamis, menyesuaikan secara real-time sesuai dengan situasi pasar.
Sebagai contoh, dapat mengumpulkan banyak data historis, menggunakan model pelatihan pembelajaran mesin, untuk memprediksi waktu pembelian dan penjualan terbaik.
Berbagai varietas memiliki karakteristik yang berbeda, parameter yang sesuai juga akan berbeda. Anda dapat melakukan pengukuran terpisah berdasarkan data varietas yang berbeda, dan mengatur parameter independen.
Sistem terobosan double overbought dan overbought menggabungkan keuntungan dari pelacakan tren dan perdagangan reversal. Ini dapat membeli harga yang lebih rendah pada fase overbought dan berhenti tepat waktu setelah memanfaatkan keuntungan tren. Kombinasi efektif dari sinyal reversal dan sinyal tren ini dapat secara efektif mendapatkan peluang reversal dan mengunci keuntungan.
/*backtest
start: 2023-09-26 00:00:00
end: 2023-10-26 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 16/09/2021
// This is combo strategies for get a cumulative signal.
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
// The strategy sells at market, if close price is lower than the previous close price
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This indicator plots the moving average described in the January, 1998 issue
// of S&C, p.57, "Smoothing Techniques for More Accurate Signals", by Tim Tillson.
// This indicator plots T3 moving average presented in Figure 4 in the article.
// T3 indicator is a moving average which is calculated according to formula:
// T3(n) = GD(GD(GD(n))),
// where GD - generalized DEMA (Double EMA) and calculating according to this:
// GD(n,v) = EMA(n) * (1+v)-EMA(EMA(n)) * v,
// where "v" is volume factor, which determines how hot the moving average’s response
// to linear trends will be. The author advises to use v=0.7.
// When v = 0, GD = EMA, and when v = 1, GD = DEMA. In between, GD is a less aggressive
// version of DEMA. By using a value for v less than1, trader cure the multiple DEMA
// overshoot problem but at the cost of accepting some additional phase delay.
// In filter theory terminology, T3 is a six-pole nonlinear Kalman filter. Kalman
// filters are ones that use the error — in this case, (time series - EMA(n)) —
// to correct themselves. In the realm of technical analysis, these are called adaptive
// moving averages; they track the time series more aggres-sively when it is making large
// moves. Tim Tillson is a software project manager at Hewlett-Packard, with degrees in
// mathematics and computer science. He has privately traded options and equities for 15 years.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
vFast = sma(stoch(close, high, low, Length), KSmoothing)
vSlow = sma(vFast, DLength)
pos = 0.0
pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0)))
pos
T3A(Length, b) =>
pos = 0.0
xPrice = close
xe1 = ema(xPrice, Length)
xe2 = ema(xe1, Length)
xe3 = ema(xe2, Length)
xe4 = ema(xe3, Length)
xe5 = ema(xe4, Length)
xe6 = ema(xe5, Length)
c1 = -b*b*b
c2 = 3*b*b+3*b*b*b
c3 = -6*b*b-3*b-3*b*b*b
c4 = 1+3*b+b*b*b+3*b*b
nT3Average = c1 * xe6 + c2 * xe5 + c3 * xe4 + c4 * xe3
pos:= iff(nT3Average > close, -1,
iff(nT3Average < close, 1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & T3 Averages", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- T3 Averages ----")
LengthT3 = input(5, minval=1)
b = input(0.7, minval=0.01,step=0.01)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posT3A = T3A(LengthT3, b)
pos = iff(posReversal123 == 1 and posT3A == 1 , 1,
iff(posReversal123 == -1 and posT3A == -1, -1, 0))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1 , 1, pos))
if (possig == 1 )
strategy.entry("Long", strategy.long)
if (possig == -1 )
strategy.entry("Short", strategy.short)
if (possig == 0)
strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )