New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

% of stocks in an up trend scan. Help!


I would like to create a scan that measures the percentage of stocks in a particular group/exchange (ex. NASDAQ, SP500,...) that are in an uptrend/downtrend.

Is it possible to create a scan for this?

Thank you


  • The scan engine returns symbols, not numbers, so technically, the answer is no.

    But, the results page for a scan does show the number of stocks that meet the conditions described in the scan. So, you could write two scans. The condition for the first scan would be simply membership in the group you specify. Suppose that group is Energy stocks. The scan would just be

    [group is EnergySector]

    That gets 501 hits.

    The second scan would have this condition, plus whatever condition(s) you think describe an uptrend. Suppose that condition is the 200 MA higher than a month ago. The scan would be:

    [group is EnergySector]
    and [sma(200, close) > 21 days ago sma(200, close)]

    That gets 342 hits.

    So, 342/500 = 68.4%

    This method won't work if the group you choose has more than 999 members, because 999 is the limit for the results page. So, for instance,

    [exchange is NYSE]

    will return only 999 hits. Since you don't know the real total, you can't calculate the per cent.
  • great. thanks for your feedback!
Sign In or Register to comment.