Programming Question

 

Hi,

I have this code in my EA that uses the following line:

DXFL=iHigh(Symbol(),PERIOD_D1,1)-iLow(Symbol(),PERIOD_D1,1);

However, I need to refresh the history (manually) every time I run the EA. I have tried different ways to make the EA refresh it automatically but none worked. I understand that the iHigh and iLow reads from the history so how can I eaither refresh them automaticall or read from the server directly?

Thanks.

 

when the EA is attached to a chart, it will run the start function every in comming tick. So when the above function is called from the start function it will refresh automatically when a new bar in the history is complete.


hth


Russell