Can help me fix AddMultiTextColumn

Dear : Professional Amibroker ;
I am using Amibroker 6.93 (32bit) . I can not how to fix error AddMultiTextColumn. Who can tell me how to fix it?
Thanks
P/s : My code is below.

_SECTION_BEGIN("Price");
 GraphXSpace = 35;
Plot(C,"",IIf(C>Ref(C,-1),colorCustom9,colorRed),styleCandle);
Title = EncodeColor(colorYellow)+ FullName()+"("+Name()+") - " + EncodeColor(colorWhite) + " - " + Interval(2) + EncodeColor(colorWhite) +
 "  - " + Date() +"\n" +EncodeColor(colorWhite) +"O - "+O+"  "+"H - "+H+"  "+"L - "+L+"  "+ "C - "+C+"  "+ "Volume : "+ WriteVal(V,1.0);
_SECTION_END();


_SECTION_BEGIN("Check AddMultiTextColumn");
GraphXSpace =25;

BBBreakout = Cross(MA(C,10),MA(C,40));
BBBreakoff = Cross(MA(C,40),MA(C,10));

Buy = BBBreakout ;
Sell = BBBreakoff ;

PlotShapes( shapeUpArrow * BBBreakout, colorBlue, 0,Low);

Chg = ROC( C, 1 );
ChgV = ROC( V, 1 );
AddColumn(C, "Price", 1.2, IIf(Chg >= 0, colorGreen, colorRed),-1);
AddColumn(V, "Volume", 1, IIf(chgv>= 0, colorGreen, colorRed),-1);
AddColumn(ChgV, "% Volume", 1, IIf(ChgV >= 0, colorGreen, colorRed),-1);
AddColumn(Chg, "% Price", 1.2, IIf(Chg >= 0, colorGreen, colorRed),-1); 

TextList = "YES\nNO";
AddMultiTextColumn(BBBreakout, TextList, "BREAKOUT", 1.2,IIf(BBBreakout, colorGreen, colorRed),colorWhite,-1);
Filter = BBBreakout OR BBBreakoff;

_SECTION_END();

What error? Post full details

If I delete AddMultiTextColumn at row 28 it will no error.

No error for me when using the code you posted, but your text string is backwards. It should be:

TextList = "NO\nYES"

Check your AB version, maybe it's an older one

First post said v6.93 (32 bit), which should be OK.

What is your AB version? If I delete row AddMultiTextColumn then no error. I checked this error was this function ?

Try deleting that line and then typing it again from scratch, i.e. don't copy and paste. Maybe you have some strange unprintable character in the existing line. I copied and pasted your original post into a new AFL file and it worked fine.

1 Like

Comment out your AddMultiTextColumn() statement and add the following 2 lines as a workaround for now - I think it should work.

fgcolor = IIf( BBBreakout > 0, colorGreen, colorRed );
AddMultiTextColumn( BBBreakout > 0, "YES\nNO", "BREAKOUT", 1.2, fgcolor, colorWhite );
1 Like

Post the CODE, not a screenshot of code. So it can be copy-pasted and checked by others without retyping the whole thing. Also the error is elsewhere (in parts not shown in the code), because if it was there there would be in-line error message shown.

When posting the formula, please make sure that you use Code Tags (using </> code button) as explained here: How to use this site.

Using code button

Code tags are required so formulas can be properly displayed and copied without errors.

1 Like