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.

PMO 30 day high/low or other indicator

How can I test to see if the PMO is, say, 5% lower today than it was in the last 30 days, or just lower?

I've written a few scans so far but can't figure out how to do something like this for an indicator like PMO.

I tried this:
and [ppo line (5,5,1)<ppo line (30,30,1)]

but it doesn't seem to return anything. If I try something like this:

and [ppo line (5,5,1)<ppo line (30, close)]

I get a syntax error. Apologies for the basic question. Just not sure how to reference a PPO/PMO/MACD value for a low in a period.


  • Options
    markdmarkd mod
    edited February 2016
    I think you have to clarify (to yourself) exactly what your are looking for.

    Do you want stocks where today's indicator value is the lowest in 30 days?

    In that case, you would want to use the min() function (see the Instructions link for details), where today's indicator = min(30, indicator); so

    and [MACD Line(12,26,9) = min(30, MACD Line(12,26,9)]

    Or do you want to know if today's indicator value is say, 5% lower than it was 30 days ago?

    If so, then today's indicator < 30 days ago indicator * .95 (for five per cent).

    and [MACD Line(12,26,9) < min(30, MACD Line(12,26,9) * .95]

    If you want both, you would combine the two conditions into one statement.

    If you just want to see whether it's lower than a few days ago, then the pattern is

    and [indicator < x days ago indicator], so

    and [MACD Line(12,26,9] < 10 days ago MACD Line(12,26,9)]

    This is a pretty good video on some coding techniques that might give you some ideas:

    Check out the other ones, too.

    Here's a link to a sample scan page that might help, too:
  • Options
    [MACD Line(12,26,9) < min(30, MACD Line(12,26,9) * .95]

    This should get me going now that I know how to write it. Thanks again.
Sign In or Register to comment.