Download MetaTrader 5

EA not get MACD value from previous Timeframe.

To add comments, please log in or register
Shammi Akter Joly
284
Shammi Akter Joly  

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
284
Shammi Akter Joly  
any guys help me?
Shammi Akter Joly
284
Shammi Akter Joly  
It is MT4 Bugs?
To add comments, please log in or register