Bollinger Bands on MACD for MetaTrader 5

BB MACD indicator has been converted to be compatible with the MetaTrader 5 platform. It’s a simple visual Forex indicator that displays the Bollinger Bands on the custom MACD indicator, shown in the separate window of the chart. It wasn’t an easy MQL4->MQL5 conversion, mostly because of the lack of …OnArray() functions in the new MetaTrader. Custom EMA and Standard Deviation functions should have been added to the indicator to make it work properly. The new version has certain differences with the MT4 one:

  • Removed some unneeded code — it should run faster now.
  • The indicator’s structure is much clearer now with less unneeded buffers and the proper variable scoping.
  • There is a difference with the most current bar’s Bollinger Bands data because of the different handling of the Standard Deviation indicator in MT4 and MT5.
  • You can get the code of the MT5 version or read more BB MACD indicator about this modification of Bollinger Bands indicator.

    If you find any bugs in this MT5 indicator or if you want to make a suggestion regarding its functionality or what should be my next MT4->MT5 conversion, please, use the commentary form below.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    20 − eighteen =