MACD + Bollinger: Need Help Coding

I’m building a MT4 EA, that requires the use of the customized MACD (macd-2.mq4), and a Bollinger Band that can take a multiplier with decimal places.

Basically, I have tried to code it out, but I am not familiar enough with MT4 to be able to code the custom indicators into the system.

The logic is as follows:

BUY:

  • MACD Fast Line crosses above Signal Line
  • Price is below Bollinger Band

SELL:

  • MACD Fast Line crosses below Signal Line
  • Price is above Bollinger Band

The MACD is required to be all three parts to be EMA. In the code attached, I have had to use the “iOsMA”, although the Signal is ‘simple’.

Any help would be greatly appreciated!