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.

Help creating a scan 3 days in a row

Hi I searched but could not find anything. I am looking for a scan that would have a stock moving up exactly 3 and 4 consecutive days. Thanks!

Comments

  • markdmarkd mod
    edited December 2017
    The brute force way would be to describe each close in the series in terms of the prior close, so starting with the most recent day, it would be

    and [close > 1 day ago close]
    and [1 day ago close > 2 days ago close]

    etc.

    But the last day in the series has to be a down day, so

    and [x days ago close < y days ago close]

    A more sophisticated way would be to use ROC(1), which you can also use to see whether a close was up or down. If ROC(1) is positive the close was up, if less than zero it was down. So:

    and [3 days ago ROC(1) < 0]
    and [min(3, ROC(1)) > 0]

    min(3, ROC(1)) > 0 says the last three closes were up - today's close (in other words, 0 days ago), 1 day ago close and two days ago close.

    3 days ago ROC(1) < 0 says the fourth close back was down.
  • Thanks Mark I appreciate your help will give it a shot!
Sign In or Register to comment.