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 Scan for a PPO Line above 0 for x number of days?

I have been trying for a looong time to figure out a way to scan for a PPO Line 12,26,9 that is staying > 0 for xx numbers of days, and which was < 0 just the day before that span of time. The scan works, yet it doesn't!

(...)
AND [MAX (30, PPO Line (12,26,9)) > 0] // PPO Line is above zero for the past 30 days
AND [31 days ago Daily PPO Line(12,26,9,Daily Close) < 0] // PPO Line was below zero 31 days ago
(...)

The scan has no mistake but it doesn't return what is expected. I find many stocks where the PPO Line was below zero from day 30 until today, while it shouldn't since the PPO Line should be above zero for the past 30 days.

Is there a way to scan for that?

Comments

  • Try MIN instead of MAX.

    You want the LOWEST value to be above zero for 30 bars.
  • Holly Molly! It works! Now, why didn't I think about the MIN instead of the MAX is one of those quantum physics question that my mind won't never answer :blush:

    Many thanks for all you do here markd! I have learn a lot from you... keep it up for 2018!
  • Thanks! That's the plan.
Sign In or Register to comment.