Don't double post! You already had another thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19Don't double post! You already had another thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19The other post was regarding why my EA didn't close position.
You answer that post already where you revealed that MT4 MACD does not provide a code method to trade the MACD and trigger line crosses but only allows for histogram zero line cross. You revealed that this is completely different then the MACD and trigger line crosses and thus the EA did not close position because I was expecting these crosses for the code but in reality it was not the correct code for MACD and trigger line crosses.
This raised the new question about what method to use in order to create an EA that would make use of MACD and trigger line crosses where MT4 MACD does not allow.
2 different questions is it not ? Relevant maybe but not really the same question at all.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Visually the MT4 MACD histogram and red line cross at similar to typical MACD crossing lines. However, the MT4 does not provide any code to make use of the 3 element MACD for crosses which I was unaware of.
MQL4 reference literally says this:
NOTE:
"In some systems it is called MACD Histogram and plotted as two lines. In MetaTrader 4 client terminal MACD is plotted as histogram."
The MQL reference manual has this text but the histogram is really not coordinating with the crosses that most other MACD indicators have traditionally shown.
I wrongfully assumed that (0-MODE_MAIN, 1-MODE_SIGNAL) would be the crosses of MACD and triggers lines like traditional MACD's but it's not.
Anyhow, now what ?
I want to code the EA with MACD and trigger line crosses.
What do others do for this ?
Thanks