The Sideways Breakthrough Oscillation Strategy is a quantitative trading strategy that uses Bollinger Bands and the MACD indicator to determine buy and sell signals. This strategy is mainly suitable for oscillating products such as stock index futures, forex and digital currencies. The main idea of the strategy is to issue buy and sell signals when the price breaks through the upper and lower bands of the Bollinger Bands.
The Sideways Breakthrough Oscillation Strategy uses Bollinger Bands to judge the range of price fluctuations. Bollinger Bands include the middle band, upper band and lower band. The middle band is the n-day simple moving average, and the upper and lower bands are k times the n-day true range above and below the middle band respectively. When the price breaks through the lower band, it is believed that the market may reverse, a buy signal is issued. When the price breaks through the upper band, it is believed that the market may reverse, a sell signal is issued.
In addition to using Bollinger Bands to determine trading points, this strategy also incorporates the MACD indicator to determine trading signals. The MACD indicator includes the DIF line, DEA line and MACD line. The DIF line is the difference between the 12-day exponential moving average and the 26-day exponential moving average, the DEA line is the 9-day exponential moving average, and the MACD line is the difference between the DIF and DEA lines. A buy signal is generated when the MACD line turns from negative to positive, and a sell signal is generated when it turns from positive to negative.
Combining Bollinger Bands and MACD indicators, the trading signal generation rules for the Sideways Breakthrough Oscillation Strategy are: a buy signal is issued when the price breaks through the lower band of the Bollinger Channel; A sell signal is issued when the price breaks through the upper band of the Bollinger Channel. Close the position when the price breaks through the channel rails again.
The Sideways Breakthrough Oscillation Strategy has the following advantages:
Although the Sideways Breakthrough Oscillation Strategy has many advantages, there are still some risks in actual trading, which are mainly reflected in the following aspects:
To reduce the above risks, we can optimize from the following aspects:
The Sideways Breakthrough Oscillation Strategy also has room for further optimization, which can mainly be done in the following directions:
The Sideways Breakthrough Oscillation Strategy integrates Bollinger Bands and MACD indicators to determine entry and exit timing, and can effectively capture reversal opportunities in oscillating trends by using price breakthroughs on both sides. This strategy is simple, flexible in parameter selection, and performs well across different products. However, there are still some risks to the strategy that require further testing and optimization. We have proposed some optimization ideas. With continuous improvement, we believe the performance of this strategy will get better and better. In general, the Sideways Breakthrough Oscillation Strategy is a recommended quantitative strategy.
/*backtest start: 2023-12-26 00:00:00 end: 2024-01-02 00:00:00 period: 5m basePeriod: 1m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=3 strategy("Seitwärtsdoppelpenetration", overlay=false) //Keltner Channel source = open useTrueRange = input(true) length = input(20, minval=1) mult = input(4.0) ma = sma(source, length) range = useTrueRange ? tr : high - low rangema = sma(range, length) upper = ma + rangema * mult lower = ma - rangema * mult crossUpper = crossover(source, upper) crossLower = crossunder(source, lower) //Entry buyEntry = cross(lower,source) sellEntry = cross(upper,source) if (cross(lower,source)) strategy.entry("buyEntry", strategy.long, comment="buyEntry") if (cross(source, upper)) strategy.entry("sellEntry", strategy.short, comment="sellEntry") buyExit = cross(source, upper) sellExit = cross(lower,source) strategy.close("buyEntry", buyExit) strategy.close("sellEntry", sellExit)