PivotBar( Source, TrendSize, PivotNo);
Source - This is the array that will be used for calculating the indicator. This can be the price or another indicator like RSI.
TrendSize - This value specifies how large the trend should be for a point to be considered a pivot.
PivotNo - This value specifies which pivot you want to get the bar for.
The PivotBar function returns the bar number of the Nth pivot specified by PivotNo.