AddToComposite
|
Composites |
SYNTAX | AddToComposite( array, ''ticker'', ''field'', flags = atcFlagDefaults ) |
RETURNS | NOTHING |
FUNCTION | Allows you to create composite indicators with ease. More
info... Parameters: array - the array of values to be added to "field" in "ticker" composite symbol "ticker" - the ticker of composite symbol. It is advised to use ~comp (tilde at the beginning) newly added composites are assigned to group 253 by default and have "use only local database" feature switched on for proper operation with external sources possible field codes: "C" - close , "O" - open, "H" - high, "L" - low, "V" - volume, "I" - open interest, "1" - Aux1 field, "2" - Aux2 field, "X" - updates all OHLC fields at once flags - contains the sum of following values
(it works ONLY in scan mode, unless atcFlagEnableInBacktest or atcFlagEnableInExplore flags are specified) and does NOT affect composite ticker when run in Indicator or Commentary mode, so it is now allowed to join scan and indicator into single formula. |
EXAMPLE | AddToComposite( MACD() > 0, "~BullMACD", "V"); |
SEE ALSO |
The AddToComposite function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.