- adds exploration text column based on array

Exploration / Indicators
(AmiBroker 6.20)

SYNTAX AddMultiTextColumn( ARRAY, ''TextList'', ''Caption'', format = 1.2, fgcolor = colorDefault, bkcolor = colorDefault, width = -1 )
FUNCTION Adds a text column to the exploration where text displayed is choosen based on array value.


  • ARRAY - parameter decides on bar-by-bar basis which item from TextList is choosen
  • TextList - newline-separated list of texts to be displayed depending on ARRAY value. Note: newline is a "\n" symbol
    This work so, when ARRAY value is zero, then first item from TextList is choosen and displayed, when ARRAY value is 1 then second item is choosen and so on.
    This allows outputting conditional text in the exploration output, like shown in the example.
  • Caption - defines column caption
  • format - defines formatting (minimum number of characters used to display a string)
  • fgcolor - defines foreground color
  • bgcolor - defines background color
  • width - defines column width
EXAMPLE Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

Filter = 1; // all bars

AddColumn( Buy, "Buy" );
AddColumn( Sell, "Sell" );

TextList = "No signal\nBuy\nSell\nBuy and Sell";
TextSelector = 1 * Buy + 2 * Sell; /* would give 0 if no signal, 1 if a buy, 2 if a sell, 3 if both buy and sell */
AddMultiTextColumn( TextSelector, TextList, "Which signal" );
SEE ALSO AddColumn() function , AddTextColumn() function


The AddMultiTextColumn function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.