sma(200) uptrend 1 month or less

Hi all,

I'm looking for a scanning sample showing stocks having the sma(200) in an uptrend for 1 month or less.

Thanks for your help...

Comments

  • markd
    markd mod
    edited September 2015
    If you want to catch a turn in any MA, you can test for the MA higher than some short period ago, but less than some longer period.

    So,

    and [sma(x, close) > y days ago sma(x, close)]
    and [sma(x, close) < z days ago sma(x, close)]

    where y < z.

    Plug in some numbers for x, y and z and experiment for a while to see what you get.
  • Thanks, it looks like the following works:

    and [sma(200, close) > 30 days ago sma(200, close)]
    and [30 days ago sma(200, close) < 60 days ago sma(200, close)]

    This gives me kind of a curve from a previous downtrend into an uptrend...