Definition
Returns the number of bars ago starting with the 1st bar from oldest to newest that matches the time stamp based on the DateTime parameter passed in. If the time stamp passed in is older than the 1st bar, the value returned reflects the number of bars ago for the 1st bar of the series. If the time stamp is newer than the last bar, a value of zero is returned.
Method Return Value
An int value that represents the number of bars ago.
Syntax
GetBar(DateTime time)
GetBar(int barSeriesIndex, DateTime time)
Method Of
Custom Indicator, Custom Strategy
|
Parameters |
|
|
time |
An instance of time. |
|
barSeriesIndex |
Index value of bars object in a multiseries strategy |
Examples
|
// Check that its past 9:45 AM
|