iLow returns incorrect and huge number

 

Hi,

iLow is returning incorrect values for my code below.

My code:

double entry_price = iLow(NULL,ENTRY_TIMEFRAME,1) - entry_tick_buffer;
PrintFormat("low=%d; entry_tick_buffer=%e",iLow(NULL,ENTRY_TIMEFRAME,1),entry_tick_buffer);

iLow values logged:

Weird thing is however, iHigh(NULL,ENTRY_TIMEFRAME,1) is returning accurate values as expect.

Is there something I'm missing? 


Thank you in advance.

 

Hi! Thanks for the reply.


It seem to have worked once I first store it as a variable instead of directly calling iLow. Seems to having some sort of "delay" required for strategy tester to work.


Thanks anyway!