FUNCTION: LOOPCALC

STUB: result_vector = LOOPCALC( expression )


where expression can be a mathematical expression that refers to other vectors. Unlike the CALC function the expression can (and should) contain an index called i. The expression will be calculated for i taking values from 0 to the size of the vector minus 1.

In short, unlike spreadsheet formulas that calculate values for a single cell, LOOPCALC allows you to calculate values for the whole column (called vector in the StockWiz 5 formula language).

Example:

MEDIAN = LOOPCALC( (HIGH(i)+LOW(i))/2.0)

In the 'expression' you can refer to any column that has been calculated in previous lines in the formula.

Please see the documentation for the CALC function for a list of valid operators.