generate separate ranks for each category from the listįor( i = 1 ( category = StrExtract ( categoryList, i ) ) != "" i ++ ) StaticVarSet ( "values" + category + "_" + symbol, values ) write ranked values to a static variable in this example we will use 10-bar rate-of-change write our ranking criteria to a variable If( ! StrFind ( categoryList, "," + category + "," ) ) categoryList += NumToStr ( category, 1, 0 ) + "," cleanup variables created in previous runs (if any)įor( n = 0 ( Symbol = StrExtract ( List, n ) ) != "" n ++ ) List = CategoryGetSymbols ( categoryWatchlist, wlnum ) Wlnum = GetOption ( "FilterIncludeWatchlist" ) watchlist should contain all symbols included in the test The static variables names are based on category number (sectors in this example) and that allows to create separate ranks for each sector. The formula presented below iterates though the list of symbols included in the test, then calculates the scores used for ranking and writes them into static variables. This can be done with ranking functionalities provided by StaticVarGenerateRanks function. When we want to develop a trading system, which enters only N top-scored symbols from each of the sectors, industries or other sub-groups of symbols ranked separately, we should build appropriate ranks for each of such categories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |