Thanks for the help. Will try this. Wern
--- In [email protected], "bistrader" <bistra...@...> wrote: > > I believe you could also start with something like the following, with your > rsi code added, and do via regular bactest, plot or whatever. > > function CountWatchList( listnum ) > { > // retrive comma-separated list of symbols in watch list > list = CategoryGetSymbols( categoryWatchlist, listnum ); > > Count = 0; // just in case there are no watch list members > > for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) > { > Count = Count + 1; > } > return Count; > } > > Count = CountWatchList(10); > //Filter = 1; > //AddColumn(Count, "Count", 5.3); > //Plot or whatever here > > > > --- In [email protected], "woodshedder_blogspot" > <woodshedder_blogspot@> wrote: > > > > Wern, I think this will work for you. You'll need to use the scan feature. > > It is also going to compute a universe count for you as well. You can of > > course tweak the universe parameters any way you like. > > > > Regards, > > Wood > > > > Buy = Sell = 0; > > Universe = 0; > > RSI2Count = 0; > > AV10=MA(V,10); > > RSI2=RSI(2); > > > > // Scan and Count Universe > > for (i=1; i<BarCount; i++) > > { > > if (C[i]>1 AND AV10[i]>100000) > > Universe[i] = Universe[i] + 1; > > } > > AddToComposite (Universe, "~Universe", "X"); > > Plot ( Foreign("~Universe", "X"), "Universe",6,1); > > > > // Scan and Count RSI2 > 90 > > for (i=1; i<BarCount; i++) > > { > > if (C[i]>1 AND AV10[i]>100000 AND RSI2>90) > > RSI2Count[i] = RSI2Count[i] + 1; > > } > > AddToComposite (RSI2Count, "~RSI2Count", "X"); > > Plot ( Foreign("~RSI2Count", "X"), "RSI2Count",6,1); > > > > --- In [email protected], "wernkra" <WKRAG@> wrote: > > > > > > Hi there, > > > > > > is there a way to count the number of stocks which are at a certain > > > RSI(2) threshold? > > > I'd like to plot the number of stocks with RSI(2) > 90. > > > > > > I guess that could be done with AddtoComposite. > > > > > > How would I do that? > > > > > > Thanks. > > > > > > Wern > > > > > >
