Profile Picture

Closing Price at a certain time

Posted By blousetrader 5 Years Ago
Message
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
Maybe

Bars.Lookback(BarUtils.BarLookBackFromDate(xxx).Close


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.

Thanks,
Daniel
Posted Monday May 14 2012
Cheers guys


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems