Profile Picture

Closing Price at a certain time

Posted By blousetrader 6 Years Ago
Posted Sunday May 13 2012
Quickie for you - how would I retrieve the closing price on a certain date/time from with the code. Typically for my system this would be 1.15 the previous day.
Posted Sunday May 13 2012


Posted Sunday May 13 2012
Yes, you can use BarUtils.BarLookBackFromDate for this. However, it will only work if there is a bar with the exact BarStartTime you specify, otherwise it will return -1.

Other options are just to loop/search through the bar series yourself, or if you know what time you are interested in having the price for, just record the price at that time when you reach it to refer to later.

Posted Monday May 14 2012
Cheers guys

Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems