Hey guys,
I want to rank every close of symbols, and here's the issue:
—Day before 2002/5/16: the rank were all correct.
—Day after 2005/5/16: more and more close of symbol are empty on the AddColumn, but the data on the K line are normal, i'm wondering why is that.
Here're the part of the screenshot and the code below, thank you.
Version(6.40);
Mainlist = GetCategorySymbols(categoryWatchlist, 1);
if (Status( "StockNum" ) == 0 )
{
StaticVarRemove("ValuesToSort*");
StaticVarRemove("rank*");
for (i = 0; (Sym = StrExtract(Mainlist, i)) != ""; i++)
{
SetForeign(Sym);
SymClose = Close;
RestorePriceArrays();
StaticVarSet("ValuesToSort" + Sym, SymClose);
}
StaticVarGenerateRanks("rank", "ValuesToSort", 0, 1224);
}
Close_Price = StaticVarGet("ValuesToSort" + Name());
Close_Price_Rank = StaticVarGet("rankValuesToSort" + Name());
Filter = 1;
AddColumn(Close_Price, "Close");
AddColumn(Close_Price_Rank, "Close_Rank");
SetSortColumns(2, 4);
See symbol 100220.SH_C