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.

Regarding MACD crossover scan

Dear Mark
As you know, sometimes there is an MACD 12,26,9 crossover below 0 or above zero, sometimes very much below or there a way to scan for stocks which are very close to the zero line? Say, 10-15% below it (or above it)?

Also, is there a way to scan for stocks which cross UP from an extremely low (or down from a high level)?
For example 5th June 2017 ASNA crossed was from a very DEEP low level. is there a way to scan for that?


  • I think I would use PPO instead of MACD, because the scale is normalized (meaning, the values are comparable across different symbols). So, to get symbols near the zero line you might ask for max(x, PPO Line(12,26,9)) < 1 and min(x, PPO Line(12,26,9)) > -1, or something similar.

    For the deep crossover, again you would test PPO Line within a range deep in negative territory - maybe min(x, ..) > -20 and max(x,...) < -15. "x" is the lookback period - maybe 20 days, which is about the trading month. Then test for Signal below line at the start of the look back period and above it at the end. So, if your look back period is 20 days, you would test for 20 days ago signal < 20 ago line, and now signal > line. You would have to play with the parameters. If those two conditions are true, there must have been a crossover in between.
  • Mark, this is very interesting thanks. Before doing this i ran a normal macd cross over followed by PPO crossover on the same parameterss. Results were not totally matching. Is there a reason why PPO and MACD would not match?
  • I don't use either one, so I can't offer a comment based on experience. But this Chart School article should help:
  • Mark
    I typed up the following formula, do you know why it doesnt work?

    [type is stock]
    and [market cap > 200]
    and [country is not uk]
    and [country is not canada]
    and [country is not india]
    and [Volume > 100000]
    and [PPO Line(12,26,9) x PPO Signal(12,26,9)]
    and [PPO Line(12,26,9)<0]
    and [PPO Signal(12,26,9)<0]
    AND [max(200, PPO Line(12,26,9)) < 1 and min(200, PPO Line(12,26,9)) > -1]
  • I'm assuming you mean it gets no results.

    I would try varying the 200 parameter. 200 days is very long time for Line to be in such a narrow range. Try maybe 10 or 5.
  • it said
    There is a misplaced "and" keyword in your scan expression, near " and max(200) < -15]"
  • i can shorten it as you suggested but that was not the problem
  • AND [max(200, PPO Line(12,26,9)) < 1 and min(200, PPO Line(12,26,9)) > -1]

    This line is missing parens - s/b

    AND [max(200, PPO Line(12,26,9)) < 1]
    and [min(200, PPO Line(12,26,9)) > -1]
Sign In or Register to comment.