How do i add a static column in my explore window?

i am trying to add a column of number to just sort my rows but whenever i change the sorting mechanism from one column to another, the sorting column also change, i want this column to be static containing numbers from 1 to n to use it only to know the ranking of each stock based on different columns.

First of all you can add function AddRankColumn plus SetSortColumns function to exploration code

format    = 1.2;
width     = 70;
Colfont   = colorLightGrey;
Colcell   = colorDarkGrey;


SetOption( "NoDefaultColumns", True );
SetSortColumns( 2, -7 );

AddTextColumn( Name(), "Ticker", 1.0, Colfont, Colcell, width );
AddColumn( DateTime(), "Date/Time", formatDateTime, Colfont, Colcell, 120 );
AddColumn( O, "Open", format, Colfont, Colcell, width );
AddColumn( H, "High", format, Colfont, Colcell, width );
AddColumn( L, "Low", format, Colfont, Colcell, width );
AddColumn( C, "Close", format, Colfont, Colcell, width );
AddColumn( V, "Vol", 1, Colfont, Colcell, width );

Filter = 1; // Status( "lastbarinrange" ); etc...

If you still do some manual sorting afterwards (after exploration run) then you can still add additional rank columns via right click on result list and choosing "Add rank column" of context menu.

And in column setup (see video below) you can uncheck showing certain columns.



Thank you very much that's exactly what i wanted ! :grinning: