Use general ranking functionality two times simultaneously

if ( Status("stocknum") == 0 ) // GENERATE RANKING WHEN WE ARE ON VERY FIRST SYMBOL 
{ 
    StaticVarRemove( "values*" ); 

    for ( n = 0; ( Symbol = StrExtract( List, n ) )  != "";  n++    ) 
    { 
        SetForeign ( symbol ); 
        values = ROC(C,100)); 
        RestorePriceArrays(); 
        StaticVarSet (  "values"  +  symbol, values ); 
        _TRACE( symbol ); 
    } 

    StaticVarGenerateRanks( "rank", "values", 0, 1224 ); 
}

Hello guys, code written above gives ranking of stocks based on 100 days ROC() .This code will give me my top 100 stocks .Now I want to again rank that top 100 stocks based on another Roc() of 15 days .How I can achieve that

@anubhav did you read this thread?

1 Like