Strategi reversal trend breakout adalah strategi kombinasi yang menggabungkan keunggulan strategi reversal dan strategi breakout untuk menghasilkan sinyal perdagangan pada titik reversal tren. Strategi ini pertama-tama menilai apakah harga menunjukkan bentuk reversal selama dua hari berturut-turut, sementara indikator Stochastic Oscillator mengeluarkan sinyal reversal, yang jika sesuai menghasilkan sinyal beli atau jual. Pada saat yang sama, strategi ini juga menilai apakah harga melampaui harga tertinggi atau terendah dalam periode yang ditentukan, dan menghasilkan sinyal perdagangan jika memenuhi kondisi reversal dan breakout secara bersamaan.
Strategi ini terdiri dari dua bagian:
Jika harga terbalik dua hari berturut-turut ((Beli pada hari 2 dengan harga close-out lebih tinggi dari hari 1, ketika garis cepat Stochastic lebih rendah dari garis lambat; Jual pada hari 2 dengan harga close-out lebih rendah dari hari 1, ketika garis cepat lebih tinggi dari garis lambat))
Periksa apakah harga telah melampaui harga tertinggi dalam siklus look_bak (atau beli jika harga melampaui harga tertinggi).
Ketika bagian reversal dan bagian breakout sinyal sinkronisasi (misalnya, reversal menunjukkan sinyal beli, breakout juga menunjukkan sinyal beli), menghasilkan sinyal beli atau jual yang sebenarnya.
Strategi kombinasi ini menggabungkan keunggulan dari dua strategi perdagangan, reversal dan trend breakout, untuk menangkap sinyal dengan lebih akurat pada titik-titik perubahan tren.
Bagian reversal dapat memberi sinyal saat harga berbalik, cocok untuk menangkap titik balik.
Blokir bagian untuk memastikan sinyal perdagangan berorientasi sesuai dengan tren dan menghindari perdagangan yang salah arah.
Ketika dua bagian mengirimkan sinyal searah, peluang perdagangan yang lebih dapat diandalkan dapat dihasilkan.
Penggunaan indikator Stochastic menghindari subjektivitas penilaian berdasarkan bentuk harga saja.
Strategi ini juga memiliki beberapa risiko yang perlu diperhatikan:
Sinyal pembalikan mungkin merupakan false breakout, tidak dapat memastikan bahwa pembalikan tren telah ditetapkan.
Sebuah sinyal terobosan mungkin merupakan terobosan ilusi, tidak dapat menentukan apakah tren telah dimulai.
Salah mengatur parameter indikator di kedua bagian dapat menyebabkan kehilangan peluang perdagangan.
Frekuensi transaksi mungkin terlalu tinggi, parameter dapat disesuaikan untuk mengontrol frekuensi transaksi.
Langkah-langkah optimasi yang sesuai:
Optimalkan parameter indikator pembalikan untuk memastikan sinyal pembalikan lebih dapat diandalkan.
Optimalkan parameter penembusan untuk menghindari penembusan ilusi.
Sesuaikan pengaturan parameter untuk bagian reversal dan breakout untuk menemukan yang paling cocok.
Mengatur frekuensi transaksi dengan tepat untuk mencegah terlalu seringnya transaksi.
Strategi reversal trend breakout menggunakan kombinasi strategi reversal dan trend breakout untuk memberikan sinyal perdagangan yang dapat diandalkan pada titik pivot harga. Dengan pengoptimalan parameter, Anda dapat meningkatkan kualitas sinyal dan menangkap peluang perdagangan yang dapat diandalkan sambil mengontrol frekuensi perdagangan. Secara keseluruhan, strategi ini cukup kuat, tetapi perlu diperhatikan untuk mencegah risiko yang ditimbulkan oleh false breakout dan false breakout.
The Reversal Breakout Trend strategy is a combo strategy that combines the advantages of reversal and breakout strategies to generate trading signals at trend reversal points. It first judges if prices reverse during two consecutive days and if the Stochastic Oscillator gives reversal signals. At the same time, it also checks if prices break through the highest/lowest prices over a certain period. When reversal and breakout conditions are met, trading signals are generated.
The strategy consists of two parts:
It judges if prices reverse during two consecutive days (buy when close of day 2 is higher than day 1 and Stochastic fast line is lower than slow line; sell when close of day 2 is lower than day 1 and fast line is higher than slow line).
It judges if prices break through the highest price over the look_bak period (buy if price breaks through the highest price).
When reversal and breakout parts give signals in the same direction (e.g. reversal shows buy and breakout shows buy), actual buy/sell signals are generated.
This combo strategy combines the pros of reversal and trend breakout strategies and can more accurately capture signals at trend turning points:
The reversal part can generate signals when prices reverse, suitable to catch turning points.
The breakout part ensures trade direction is aligned with the trend, avoiding trading in wrong direction.
Signals in the same direction from both parts create more reliable trading opportunities.
The application of Stochastic avoids the subjectivity of judging by price pattern alone.
There are also some risks to note:
Reversal signals may be false breakouts, unable to confirm the reversal trend has established.
Breakout signals may be false breakouts, unable to judge the trend has started.
Improper parameter settings of the two parts may lead to missing trades.
High trading frequency may occur and needs to be controlled.
Possible optimizations:
Optimize parameters of reversal indicators to ensure reversal signals are more reliable.
Optimize breakout parameters to avoid false breakouts.
Adjust parameters of both parts to find the optimal match.
Moderate the trading frequency to prevent over-trading.
The Reversal Breakout Trend strategy leverages the strengths of reversal and trend breakout strategies and reliably generates trading signals at turning points. Through parameter optimization, it can improve signal quality and capture solid trading opportunities while controlling trading frequency. Overall this strategy is robust but false breakouts remain a risk to watch out for. Proper optimization and parameter tuning is key.
[/trans]
/*backtest
start: 2023-09-29 00:00:00
end: 2023-10-06 00:00:00
period: 45m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 26/06/2019
// 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
// Breakout Range Long Strategy
//
// 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
BreakoutRangeLong(look_bak) =>
pos = 0
xHighest = highest(high, look_bak)
pos := iff(high > xHighest[1], 1, 0)
pos
strategy(title="Combo Backtest 123 Reversal & Breakout Range Long", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
look_bak = input(4, minval=1, title="Look Bak")
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posBreakoutRangeLong = BreakoutRangeLong(look_bak)
pos = iff(posReversal123 == 1 and posBreakoutRangeLong == 1 , 1,
iff(posReversal123 == -1 and posBreakoutRangeLong == -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 ? red: possig == 1 ? green : blue )