AB_AddCellRange (Function)

image\trumpet2.gif Disclaimer

The AB_AddCellRange function adds/plots a range of cells from the high price to the low price of the ActivityBar for each interval.  

Syntax

AB_AddCellRange(RangeHi, RangeLo, Side, CellGroupLabel, CellGroupColor, CellGroupValue)

Returns (Integer)

This function returns 1 if the drawing of cells was successful, otherwise, -1 if unable to add cells.

Parameters

Name Type Description
RangeHi Numeric Sets the highest price level of the column.
RangeLo Numeric Sets the lowest price level of the column.
Side Numeric Sets the side of the bar on which to add the column of cells.  Use the reserved words RightSide (1) or LeftSide (-1).
CellGroupLabel String Sets a string character that will be placed inside each cell.
CellGroupColor Numeric Sets the coloration of the cells for that particular column of cells.
CellGroupValue Numeric Sets a value that is assigned to each cell that is added.

Remarks

The function will add the cells to either the right of left of the bar depending on the Side input. You can use either LeftSide or RightSide. The letter specified in the input CellGroupLabel will be placed in each one of the cells. The cells will be drawn using the CellGroupColor color. The cells will have the CellGroupValue assigned to them.

If RangeHi < RangeLo, the function will not add any cells and return a –1.

Examples

The first example adds a number of blue cells with a "+", from the High of the ActivityBar to the Low of the ActivityBar. The assigned value of the cells will be 0.

AB_AddCellRange (High of ActivityData, Low of ActivityData, RightSide, "+", Blue, 0);

This second example could be used if we wanted to conditionally add multiple green cells with a "U"  to the current bar, from the High of the ActivityData to the Low of the ActivityData, if the Close of the ActivityData is greater than the Close of the previous ActivityData bar. Below is the EasyLanguage for this concept:

If Close of ActivityData > Close[1] of ActivityData Then
 Value1 = AB_AddCellRange(High of ActivityData, Low of ActivityData, RightSide, "U", Green, 0);