3 closes within 2%

I was looking to scan for three daily closes within 2% or less of each other. Haven't seen able to think of a criteria that would give me all the scenarios.

Any help is appreciated.

Comments

  • You would have to pick one close as the base, then compare the other two to it.

    It doesn't matter which one you start with as the base close - it could be close, 1 day ago close or 2 days ago close.

    Then you would need a condition for the upper bound, which would be other close < base close * 1.02.

    Then a condition for the lower bound, which would be other close > base close * .98.

    If that doesn't make sense, post what you have.