BarsSinceEntryExecution()
<< Click to Display Table of Contents >> BarsSinceEntryExecution() |
Returns the number of bars that have elapsed since the last entry. When a signal name is provided, the number of bars that have elapsed since that last specific entry will be returned.
An int value that represents a number of bars. A value of -1 will be returned if a previous entry does not exist.
Syntax
BarsSinceEntryExecution()
BarsSinceEntryExecution(string signalName)
The following method signature should be used when working with multi-time frame and instrument strategies:
BarsSinceEntryExecution(int barsInProgressIndex, string signalName, int entryExecutionsAgo)
Note: When working with a multi-series strategy the BarsSinceEntryExecution() will return you the elapsed bars as determined by the first Bars object for the instrument specified by the barsInProgressIndex. |
signalName |
The signal name of an entry order specified in an order entry method. |
barsInProgressIndex |
The index of the Bars object the entry order was submitted against.
Note: See the BarsInProgress property. |
entryExecutionsAgo |
Number of entry executions ago. Pass in 0 for the number of bars since the last entry execution. |
protected override void OnBarUpdate() |