StockFetcher Forums · Indicators and Measures · Count -- Occurrences << >>Post Follow-up
stockfetcher
979 posts
msg #34492
12/23/2004 1:16:10 PM

 Count -- Occurrences Parameters Indicator,period Period Limit 100 Usage count(indicator,length) Description This indicator allows you to create screens based on how many times a particular screening event occurs. As a basic example, suppose you are interested in stocks that have set multiple 1 year highs over the last 30 days: Fetcher[Show stocks where the count(high reached a new 1 year high, 30) is above 10] In the example above the count(...) phrase tells StockFetcher to return the number of times a stock has set the 1 year high over the last 30 days. Current Limitations: You can only include a single screen within the count(...) text. That is, you can't include filters which have been joined with "and" inside of the count(...) text. There is a limit of 100 days for accumulating the counts. This restriction is based on performance and hopefully we will be able to increase that value. Weekly measures are not fully supported within the count() phrase. Additional Examples: Cases where the MA(10) has not crossed below the MA(50) in the last 60 trading days. Fetcher[show stocks where the count(MA(10) crossed below MA(50),60) is below 1] The CCI(14) has spent exactly 20 of the last 90 trading days below -100. Fetcher[show stocks where the count(CCI(14) below -100,90) equals 20] Display a column which shows the number of times the high has crossed above the upper Bollinger Band in the last 15 days. (You can sort on the resulting column.) Fetcher[ show stocks where the close is between 4 and 100 and draw Bollinger(20) and add column count(high crossed above the upper Bollinger Band(20), 15) ] *** Advanced example *** Find stocks where the RSI(14) has spent more than 75% of the time either above 70 or below 30 within the last 45 days. Fetcher[ set{var1, count(rsi(14) is below 30, 45)} set{var2, count(rsi(14) is above 70, 45)} set{sum1, var1 + var2} set{ratio2, sum1 / 45} show stocks where ratio2 is above 0.75 and draw rsi(14) and draw rsi(14) line at 30 and draw rsi(14) line at 70 ]

 StockFetcher Forums · Indicators and Measures · Count -- Occurrences << >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.