1. Manually; Just click on the column header to sort. Programatically;
Use SetSortColumns
http://www.amibroker.com/guide/afl/afl_view.php?id=314
2. You would need to capture the state of your positions then use that
as a condition for the color argument. Since AB adds the symbol by
default, you would have to disable the default and add it manually.
Buy = ...
Sell = ...
InPos = Flip(ExRem(Buy, Sell), ExRem(Sell, Buy));
Filter = Buy OR Sell OR InPos;
Colors = IIf(Buy, colorGreen, IIf(Sell, colorRed, colorYellow));
SetOption("NoDefaultColumns", True);
AddTextColumn(Name(), "Name", 1.2, colorDefault, Colors);
AddColumn(DateTime(), "Date", formatDateTime);
AddColumn(Close, "Close");
Mike
--- In [email protected], "gelsner99" <gels...@...> wrote:
>
> Hi,
>
> (1) With an Exploration what code would I need to add to display the
"Number" for the results? (That is the highest ranked Ticker would be
number 1, etc.)
>
> (2) Also, with an Exploration, what code could I add that would color
the Full Name or Ticker if I am holding a particular Ticker? (I realize
this would need to be changed as I change my holdings.)
>
> Thanks in advance,
>
> / GE
>