Download MetaTrader 5

different data between ea and indicator

To add comments, please log in or register
TOMEK
13
TOMEK  

Hi,

I running simple code on ea and indicator using tester. Timeframe is H1. The code is:

   double h = iHigh(NULL,PERIOD_D1,0);
   int err = GetLastError();
   if (err!=0)
       Alert("error __high=",err);
   GlobalVariableSet("__High",h);
   double l = iLow(NULL,PERIOD_D1,0);
   err = GetLastError();
   if (err!=0)
       Alert("error __low=",err);
   GlobalVariableSet("__Low",l);
   return(0);

This is the only code and the only differences between ea and indicator are names of global variables  i.e __Low and _Low.

The problem is reported values are different i.e. low from ea is different than low from indicator ect. No error is reported.

regards,

toso

TOMEK
13
TOMEK  

Hi,

It seems, that ea is getting correct data but indicator not. Even if tester is paused global variables are updated.

Any comments?

regards,

toso


To add comments, please log in or register