Type/to search

Momentum Oscillation Crossing Bollinger Bands with Moving Average Strategy

Cryptocurrency
Created: 2023-12-19 11:34:46
Last modified: 2 years ago
1
Follow
1779
Followers

img

Overview

This is a quantitative trading strategy based on Bollinger Bands and MACD indicators. It combines two mainstream technical indicators to identify trading opportunities, aiming to achieve higher win rate in trending markets.

The strategy will establish long position when price breaks through the lower band of Bollinger Bands for trend following, and close position when price breaks through upper band. MACD indicator is used to filter false breakout by judging momentum direction. RSI indicator can be configured to assist in identifying overbought and oversold levels to further avoid losses.

Strategy Logic

The strategy consists mainly of Bollinger Bands and MACD indicators.

Bollinger Bands calculate upper and lower bands based on standard deviation of prices. Upward breakout of upper band signals overbought condition, while downward breakout of lower band signals oversold condition. This strategy goes long when price breaks down the lower band, and closes position when it breaks up the upper band.

MACD indicator judges momentum and direction of prices. Crossover of short term moving average above long term moving average is buy signal, while crossover below is sell signal. MACD helps filter false breakout of Bollinger Bands in this strategy.

Additionally, RSI indicator can assist in identifying overbought/oversold levels. Low RSI represents oversold and enhances buy signal, while high RSI represents overbought and enhances sell signal.

Advantages of the Strategy

The strategy combines Bollinger Bands, MACD and RSI indicators, which can effectively determine price trend and volatility. Its advantages include:

  1. Bollinger Bands capture trend following when price breaks out of bands
  2. MACD filters false signals from Bollinger Bands by judging momentum
  3. RSI avoids buying at peak by identifying overbought/oversold levels
  4. Higher win rate can be achieved through parameter optimization

Risks of the Strategy

There are also some risks to be aware of:

  1. High risk of stop loss when prices fluctuate violently
  2. Profitability decreases with improper parameter settings
  3. MACD may misjudge when trend reverses

Countermeasures:

  1. Stop loss percentage can be loosened appropriately
  2. Extensive backtesting required to find optimum parameters
  3. More indicators can be used to predict trend reversal

Directions for Optimization

Major directions to optimize the strategy include:

  1. Optimize parameters of Bollinger Bands for more market regimes
  2. Increase indicators to improve robustness
  3. Utilize machine learning to auto optimize parameters
  4. Test strategy performance on high frequency data
  5. Add risk management module to limit per trade loss

Conclusion

Overall this is a typical trend following strategy. By combining multiple technical indicators, it improves robustness and can achieve decent win rate when signals are accurate. However risks need to be monitored. Further improvements can be made through continuous optimization and tuning.

Source
Pine
/*backtest
start: 2022-12-12 00:00:00
end: 2023-12-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tedwardd
Strategy parameters
Strategy parameters
Simple bot
3Commas Bot ID (Optional)
Bot Email Token (Optional)
Base order size
Safety order size
Safety Order Vol Scale (%)
Safety Order Step Scale (%)
Max Number of Safety Orders
Initial SO Deviation (%)
Long Stop Loss (%)
Long Take Profit (%)
Short MA Window
Long MA Window
Upper Band Offset
Lower Band Offset
Entrry at Cross Over/Under Lower
Start Date
Start Month
Start Year
End Date
End Month
End Year
Use long?
Use short?
MACD
Fast Length
Slow Length
Source
Signal Smoothing
Simple MA FAST (Oscillator)
Simple MA SLOW (Oscillator)
Simple MA(Signal Line)
Stress
Use stress on recent bars
Stress on recent bars
Level of stress
Moving Average
Use moving average (MACD)?
Length
Type MA
Linear Regression
Use linear regression (MACD)?
Length
Offset
Condition entry/exit
Use cross macd and signal
Use min/max macd
RSI
Use RSI filter?
Use RSI Take Profit?
RSI period
RSI source
Overbought height
Oversold height
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)