|
Functions by Category Functions by Alphabetical list
This function returns the number of bars for the current symbol. This function is used to iterate though the bars of a column. When iterating, the first item is zero while the last item is NumberOfBars-1. This function is typically used when creating your own indicators or charts. It should not be used in the Bar event. Examples: #Loop round all the "cells" in the column
for my $bar (0..NumberOfBars-1) {
#workout the average of the open and close
$answer=(Value(Open,$bar)+Value(Close,$bar))/2;
#set the answer for the new column
SetValue($col,$bar,$answer);
}
Related functions: ValidatePeriods , ValidateColumns , SetColumnName , Value , SetValue , BarsBack , NewColumn , SetColumnType
|