How to code a standalone Bollinger Bands Expert Advisor

video
play-sharp-fill

 

Here is a detailed summary of the video

The video starts with an introduction on how to automate the Bollinger Bands indicator to automatically open four trades for Metatrader 0:01.

  1. It shows that a first open position is already in place 0:13. The speed is slightly increased to demonstrate that it works 0:16.
  2. It is explained that the Bollinger Bands indicator was the indicator with which the first profits were made in automated trading 0:23.
  3. Next, it shows how to automate this indicator with MQL4 for Metatrader 0:32. This is done by clicking on the small button or pressing the F4 key on the keyboard to call up the Meta Editor 0:41.
  4. In the Meta Editor, a new Expert Advisor is created and named “SimplerBollingerBandsStandAloneEA” 0:55. Everything above the On Tick function is deleted, as are the two comment lines 0:64.
  5. A variable for the signal is created 0:71. Then it goes to the determination of the Bollinger Bands 0:86. It is explained that entry signals should be created whenever a candle closes outside one of the bands and a re-entry takes place 0:93.
  6. The Bollinger Bands are calculated with the built-in iBands function for the current currency pair on the chart and the period selected on the chart 1:09. This is calculated for twenty candles 1:20.
  7. It shows how to insert the Bollinger Bands in Metatrader by clicking on Insert, Indicators, Trend, Bollinger Bands 1:33.
  8. It explains how the actual order commands are executed. If the signal has the value “Buy” and the OrdersTotal function returns zero, i.e., if there are no open positions, then ten micro lots are bought 2:40. The same applies if a sale is to be made 2:77.
  9. Finally, it shows how to create a chart output. The comment command is used for this 2:94.
  10. The video ends with the explanation that in this short video, you have learned how to generate buy and sell signals for the Bollinger Bands and how to automatically trade the recognized signals with Metatrader four 3:83.