Filtering

#1
Can someone help me please, I am new to Amibroker, how to do this? I want the Explorer result to show Buy or Sell in the Action column depend on the result. Thanks.

I tested this, it gave me "empty" result.

Filter=Buy OR Sell ;
Action = WriteIf(Buy, "BUY", WriteIf(Sell, "SELL", " "));
AddTextColumn(Action,"Buy/Sell",1.0,colorWhite,IIf(Buy,colorDarkGreen,IIf(Buy,colorRed,Null)));

I tested this, it gave me "none" result.

Filter=Buy OR Sell ;
act_status= WriteIf(Buy, "Buy", WriteIf(Sell, "Sell", "none"));
act_Col=IIf(Buy, colorDarkGreen, IIf(Sell, colorRed, colorLightGrey));
AddTextColumn(act_status, "Action", 1.6, colorWhite, act_Col,-1);
 

Similar threads