How to open or close based on MAC D MOVING AVERAGE lines crossing?

How can I use a MAC D Moving average cross as one of the conditions of opening and closing a position? Not crossing above the middle line, but the actual crossing of the two moving averages lines. Is that possible in an EA? I don’t know how to code, but I’m using a generator and just want to know if it’s even possible even if I did know how to write my own original code. Can anyone help?

1 Like

Yes you can do that, each line of an indicator has its own buffer, the index of that buffer is the identifier of the line so in your EA you can reference any line in any indicator, even custom ones you wrote yourself.

The MACD is a built in indicator in mt4 and has its own special function called iMACD which allows you to use a MACD in your EA with any settings you want.

Thanks!!!