AB_NextLabel (Function)
The AB_NextLabel series function determines the label that is placed within the cells of an ActivityBar, based on a user-defined interval.
Syntax
AB_NextLabel(MinuteInterval)
Returns (String)
The text character that is associated with ActivityBar cells based on the current MinuteInterval period.
Parameters
| Name | Type | Description |
| MinuteInterval | Numeric | Sets the number of minutes that make up each cell label interval. |
Remarks
The ActivityBar characters alternate in order from A to Z. Following the letter Z, numerical values from 1 to 9 are used. If all available alphabetical and numerical characters are used, the reserved word will return an asterisk "*", until the reserved word is reset on the next ActivityBar. Thus, there can be a total of 36 distinct intervals.
The MinuteInterval Input must be equal to or greater than the Bar Interval of the ActivityData. If the MinuteInterval Input exceeds the Bar Interval of the ActivityBar, only a single alphabetical character will be displayed throughout the entire ActivityBar. The qualifier, ’of ActivityData’ is usually added to the reference of this reserved word so that it is called on each and every ActivityData bar, as opposed to just once for each new ActivityBar.
This reserved word does not affect the color of the cells, only the string contents.
Examples
Assuming a 60 minute ActivityBar with a 10 minute ActivityData interval:
Value1 = AB_NextLabel(10);
Value1 represents a character every 10 minutes for the cells that are added to the ActivityBar during that period. This results in a total of 6 characters used in the cells throughout the ActivityBar.
In addition, assuming a 20 minute ActivityBar, with a 1 minute ActivityData interval:
Value2 = AB_NextLabel(5);
Value2 represents a new character every 5 minutes for the cells that are added to the ActivityBar during that period. This results in a total of 4 characters used in the cells throughout the ActivityBar.
Additional Example
The EasyLanguage that would allow for the Minute Interval to be set as an Input in an ActivityBar study that adds a Red cell, on the right side, containing an interval specific character, at each price of the ActivityData, is displayed below. The default used in this example is a 10-minute interval.
Inputs: MinuteInt(10);
Variables: Letter("");
Letter = AB_NextLabel(MinuteInt) of ActivityData;
AB_AddCell(Close of ActivityData, RightSide, Letter, Red, 0);