The Bollinger Bands Indicator is one of the most popular, it can be used for breakout strategies as well as reversal. In this article you can download an Expert Advisor for MetaTrader4 that will use the Bollinger Bands breakout as entry signal.
You can download the source code with the following link.
- Position Size, to define the position size
- Stop loss in pips
- Take profit in pips
- Slippage in pips
- Enable trade, to enable or disable the trading function
- Period of the Bollinger Bands
- Deviation of the Bollinger Bands
- BUY signal when the price is above the upper band
- SELL signal when the price is below the lower band
- Fixed Take Profit OR Stop Loss hit
Result EURUSD H1
The backtesting on the EURUSD shows an interesting result. Despite not being stable the Risk Reward Ratio allows the EA to be profitable in the tested timeframe. The profit is around the 5% with a low drawdown. This EA could be used as base for a more complex one.
- Risk Reward Ratio produces a profit in the tested period
- EA not heavily impacted by ranging market
The EA can suffer of false breakouts.
The profitability in the backtested period can indicate potential, the EA could be improved with further condition and become even more profitable and consistent.
This Expert Advisor is free to download and use.
I remember when I first started to learn MQL coding, although I had some knowledge of coding many concept were still unclear. To speed up your learning process I would recommend to follow a quick MQL course that will give you the fundamentals you need to create functional Trading Robot.
You can check out the following two course, Udemy often has sales on to make the courses even more affordable, and if you subscribe to my newsletter (top and bottom of the page) I will let you know when this happens.
Please leave a comment if you have any feedback or doubt and remember to like us on Social Media! I would really appreciate also suggestion for improvements and reports of any bug found. Thank you!