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.
Options

Scanning for the first 200 day New High after a 200 day New Low

Hi,

I am an experienced SC Scan Workbench user but need a nudge in the right direction. I would like to write a scan that identifies stocks making their first 200 day high after making a 200 day low. Writing the scan for the 200 day new high is pretty easy. I'm having trouble writing the scan language to capture the first 200 day high since making a 200 day low.

Any help would be greatly appreciated. Thank you.

Answers

  • Options
    markdmarkd mod
    edited January 2
    I'm assuming you mean the first new 200 day high after after the last LOWER (or new) 200 day low (you could have a higher low 200 days ago, vs. 201,2,3 etc. days ago).

    If you make the assumption that the 200 day price channels are falling when the new 200 day high occurs, your scan could be this:

    [exchange is NASD] // or whatever

    and [high x 1 day ago Upper Price Chan(200)]
    and [Upper Price Chan(200) = min(200, Upper Price Chan(200))]

    and [Lower Price Chan(200) = min(200, Lower Price Chan(200))]

    The mins insure the channels have been falling and haven't ticked up any time in the last 200 days.

    But, it may be the case that both channels do NOT have to be falling or flat to meet your first 200 day new high condition. It may be possible that the Lower channel can start rising before price gets back above the upper channel. Also, there may be special cases where sharp price changes mean you could get a new low and a new high within a say a couple of weeks or a month. But that implies a narrow range or a special situation - something probably not tradable.

    The code above does get valid results, but not many, possibly due to the state of the market. You could set the start date back to see what happens.





  • Options
    Hi markd, Thank you very much for your assistance. I'll go give it a try. Stay well!
Sign In or Register to comment.