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.

Slope of Moving Average

Hi There,

Quick question! Is it possible to scan for the slope of a moving average? In other words, I want to scan for stocks on the daily or weekly timeframe with moving averages increasing (moving upward) rather than decreasing or being flat. Thanks!

Comments

  • two ways I can think of:

    [group is sp500]
    and [Slope(5, sma(5,close)) > 0]

    Another way:

    and [sma(5, close) > 5 days ago sma(5, close)]

    A possible problem you might run into is that the MA has turned down, but not yet gone below its starting value - that would give you a positive slope but the turn may already be under way.

    To eliminate those, also check for a more recent value:

    and [sma(5,close) > 1 day ago sm(5, close)]

    That tells you the rise is still on.
Sign In or Register to comment.