Help with MACD

 

Good afternoon. I started this topic because I'd want to know if there's any way to get the history values of my MACD.

I have seen we can find the history values of the japanaese candle in every timeframe, but these are just Open, Close, high, low. But I need the MACD values.

Thanks for helping. 

 

iMACD()

MT4

MT5 

Final parameter (shift) is the bar index you want.

iMACD - Technical Indicators - MQL4 Reference
iMACD - Technical Indicators - MQL4 Reference
  • docs.mql4.com
iMACD - Technical Indicators - MQL4 Reference
 
honest_knave:

iMACD()

MT4

MT5 

Final parameter (shift) is the bar index you


Actually I'm a little beginner.

Could you be a little more explicit? Thank you.


<Edited to move the reply outside of the quote box>

 

MACD value of the current bar:

iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0)

MACD value of the previous bar:

iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1)

MACD value of the bar before that:

iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,2)
 
JesusRAN:

honest_knave: ...

Actually I'm a little beginner.

Could you be a little more explicit? Thank you.

  1. Don't add text inside quoted text, put it outside. MQL4 Forum editor problem - MQL4 forum
  2. Perhaps you should read the manual. He gave you the links.