Time/Price in EA

 

Hi,

Can someone tell me how to get currency prices at a certain time in the past? I know you can do it by Bars calculations but say you want to find out bid/ask values exactly at 8 AM and its 12 noon now.

Thank you.

 

There may not have been an incoming tick dead on 0800. Just use the iClose() function to look up the nearest Bid price at that time.

If you need both Ask and Bid at a certain time, then you'll need to capture them in your EA as the spread (and therefore Ask) are not otherwise retained.


CB