Download MetaTrader 5

How to add MACD True

To add comments, please log in or register
Have you developed a trading robot? Publish it in the Market and make profit!
kwaldron
65
kwaldron 2012.10.07 13:17 
I have been trading for some time on MT4 but I switched one of my accounts recently to a broker offering MT5 because I needed 2 hour charts. I use indiccators as well as price action to arrive at trading decisions on forex pairs. The version of MACD offered with MT5 wsn't acceptable so I downloaded a file from the internet called MACD True, which contains code for the traditional version of this indicator. However, when I add this indictaor to a chart it doesn't look anything like it should look- it looks at though it was compiled improperly despite me having clicked the compile button. Does anyone know how to add an indicator to the suite of indicators offered by MT5 ?  
Biantoro Kunarto
14834
Biantoro Kunarto 2012.10.08 10:19  

What do you mean with "The version of MACD with MT5 wasn't acceptable"?
Miguel Chambel
440
Miguel Chambel 2012.10.08 11:48  

No way to tell what's wrong until you post the code or file for people to see. Also, please explain what you expect to see in that indicator.

kwaldron
65
kwaldron 2012.10.08 14:57  

In response to the points made above, I would point out the following:

1.     The version of MACD supplied by MetaQuotes hasn’t got two crossover lines and the histogram isn’t as responsive to price changes as the traditional version and therefore isn’t acceptable for my purposes.

2.     A link to the file containing the code is here:   http://www.forexfactory.com/showthread.php?t=69409

3.     I have been using MACD for years and expect to see both the crossover lines and histogram responding to price and oscillating either side of the zero line.

Miguel Chambel
440
Miguel Chambel 2012.10.08 18:08  
kwaldron:

In response to the points made above, I would point out the following:

1.     The version of MACD supplied by MetaQuotes hasn’t got two crossover lines and the histogram isn’t as responsive to price changes as the traditional version and therefore isn’t acceptable for my purposes.

2.     A link to the file containing the code is here:   http://www.forexfactory.com/showthread.php?t=69409

3.     I have been using MACD for years and expect to see both the crossover lines and histogram responding to price and oscillating either side of the zero line.

Hello,

Not sure that this is what you want but it's a starting point for you. I modified the original MACD to get close to the one you're using. I don't have MT4 so I haven't compared the two but looking at the code, the MACD line is exacly the same on both indicators and the signal line uses a different MA method which I replaced to match the one you like. The rest is cosmetics I think.

Hope it helps, regards 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Indicators Lines - Documentation on MQL5
Files:
kwaldron
65
kwaldron 2012.10.08 21:01  

Thanks for your help Heighast- I added your file but the indicator still doesn't look right.

To add comments, please log in or register