CurrentBar
Previous Topic  Next Topic 

Definition

A number representing the current bar of the chart that the indicator is currently calculating a value for. If the chart has 100 bars of data, the very first bar of the chart (left most bar) will be number 1 (one).


Property Value

An int value that represents the current bar.


Syntax


CurrentBar


Examples

// Make sure there are more than 20 bars
if (CurrentBar < 20) return;