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.

Low of Previous Years

Is it possible to do a scan for a low within any of the previous years only?

for example:

I want to make a scan that the close of today's price is within 5 % of the low of 2016.

Is this possible?

Comments

  • Just to be clear, I'm not searching for stocks that have revisited the old lows of 2016(or any past year), but rather had broken those lows since and have rallied back up to that point.

    So i need a way to just get the low of that year alone all together.
  • The value of a calendar year's low would be min(251,low) as of the last trading day of that year. So, each time you run the scan, you would have to figure out how many trading days had elapsed since the end of that year.


    Then you would look for a close some time in the more recent past (since that year end) that is less than that low by some amount (per cent), and a current price that is some smaller per cent below that min 251 low.

    So, assuming the last day of the trading year of interest was 60 days ago, it might be something like

    // recent price has been more than 15 per cent below annual low
    and [30 days ago close < 60 days ago min(251, low) * .85]


    // current price is below annual low
    and [close < 60 days ago min(251,low)]

    // current price is less than 5 per cent below annual low
    and [ close > 60 days ago min(251, low) * .95]

Sign In or Register to comment.