Download MetaTrader 5

EA not get MACD value from previous Timeframe.

To add comments, please log in or register
Sign up for MQL5.community to leave your comments!
Shammi Akter Joly
326
Shammi Akter Joly 2016.02.24 07:51 

Dear Guys, I have Indicator that give multi-timeframe MACD signal. I wrote same code into EA but MACD value show 0 in previous timeframe. I attach both indicator and EA on M15 chart.  Indicator give MACD value of M1 perfectly but EA not give MACD value of M1. it happens only in backtester.

Indicator code :

   
   double l_imacd_552 = iMACD(symbol, TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0);
   double l_imacd_560 = iMACD(symbol, TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0);
   
   Alert(l_imacd_552+"   "+l_imacd_560);


EA code :

   double l_imacd_552 = iMACD(Symbol(), TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0);
   double l_imacd_560 = iMACD(Symbol(), TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0);
   
   if(TF1==1) {Alert("Signal from EA  "+l_imacd_552+"   "+l_imacd_560);}


In tester journal show :



Please help

Shammi Akter Joly
326
Shammi Akter Joly 2016.02.25 11:58  
any guys help me?
Shammi Akter Joly
326
Shammi Akter Joly 2016.02.27 01:19  
It is MT4 Bugs?
To add comments, please log in or register