Search code examples
mql4forexmacdeployqt

How to access MACD value and signal (both 2 data) in mql4


I am trying to create a robot in mql4 for forex trading.So i need to access both MACD value and MACD signal value.But it looks like only providing MACD value without MACD signal value.Please help me to access those values. enter image description here


Solution

  • It provides u with both value pls look to my code

    double macdBaseIndicatorLine = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
    double macdSignalIndicatorLine =iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
    

    thats how you get the values, pls give me a like if it helps u thx