AB_RowHeightCalc (Function)

image\trumpet2.gif Disclaimer

The AB_RowHeightCalc function calculates and returns the row height to be used for an ActivityBar.

Syntax

AB_RowHeightCalc(ApproxNumRows, RangeAvgLength)

Returns (Double)

The row height of an ActivityBar, or .1 if either ApproxNumRows or RangeAvgLength is set to zero.

Parameters

Name Type Description
ApproxNumRows Numeric Sets the approximate number of cell rows that are desired for an ActivityBar. The normal range for this Input is between 5 and 25.
RangeAvgLength Numeric Sets the number of bars to consider in the calculation of the average range.

Remarks

AB_RowHeightCalc uses a calculation of the average range, divided by the ApproxNumRows Input to determine what the row height should be set to. As a result of this calculation, the number of rows on each ActivityBar will be likely to vary. If the above calculation results in a row height value that is smaller than the minimum movement of the symbol, the minimum movement value is returned.

Examples

Approximates that there will be 10 rows for each ActivityBar, based on the average range over the last 3 bars:

AB_RowHeightCalc(10, 3)

In this second example, the AB_RowHeightCalc value, based on an approximation of 15 rows and using a 3 bar average range, is used with the AB_SetRowHeight reserved word to set the row height for an ActivityBar study.

AB_SetRowHeight(AB_RowHeightCalc(15, 3));