percent from 60 day high

can someone provide the criteria for stocks that are 2percent below their 60 day high please . Thanks in advance

Comments

  • Hi @lynden

    The sixty day high is

    max(60, high)

    Two per cent below is 98 per cent of that max high

    max(60, high) * .98

    So, close less than that is

    and [close < max(60, high) * .98]

    But, that statement alone can get anything below 98%, like less than .50 or .25 or .10 and that's probably not what you want. So you need to select a range. The .98 statement is the upper bound of the range - you need a lower bound - something that the close is greater than.

    So, if you want, say, a 5% point range, you would add

    and [close > max(60, high) * .93]

    If you run this against the [group is sp500], you get 194 hits as of the close 5/24/16.

    // begin 2% below 60 day high scan

    [group is SP500]

    and [close < max(60, high) * .98]
    and [close > max(60, high) * .93]

    // end scan
  • Thank you so much for such a quick response.