Bars.ClosePrices.Last(0) in OnBarClosed()
Created at 27 Feb 2024, 08:43
Bars.ClosePrices.Last(0) in OnBarClosed()
27 Feb 2024, 08:43
In the docs it says that
“When accessed in this event handler, the Bars
collection does not contain the current live bar, whereas other collections (e.g., Positions
, Symbols
, etc.) contain actual data.”
Does this mean that
Bars.ClosePrices.Last(0)
inside the OnBarClosed() event handler returns the previous bar's close price (whereas Last(0) would typically return the current one)?