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.

How to set up a scan for a upward day to day change in a moving average that overlays an indicator.

Hi-Working with PPO(1,4,2) indicator with a selected overlay of Exp. Moving average of (3).
Trying to construct a scan to find stocks with an Upward-day to day-change in the overlayed Exp, (3) Moving Average.
So far have not been able figure out how to lay out a scan for this. Any help would be greatly appreciated. Thanks.


  • This link is to the help on that topic. About half way down you will see examples for Slope and for MA overlays.
  • markdmarkd mod
    edited February 4
    @lmkwin 's link is spot on.

    I would add, with PPO, there are two indicator values to consider - Line and Signal.

    This example will use Line (like the MACD example in the link). You can substitute Signal if that's what you want.

    // stocks to look at

    [group is sp500]

    // stocks to put on results page:
    // today's MA 3 of Line is greater than yesterday's MA 3 of Line

    and [sma(3,PPO Line(1,4,2)) > 1 day ago sma(3, PPO Line(1,4,2))]

    This passes syntax and gets 124 hit on 2/4/23.

    You could try both Line and Signal and see which results you better. A ten day daily chart shows the indicator values plotted pretty clearly.

    Note that because an MA changes direction more slowly than the value it averages, you can have the average still tick up when the indicator value starts to tick down, and vice versa.
Sign In or Register to comment.