evanevans
Active member
Code:
high is equal to Highest("data" = high, "length" = 252) and
high from 1 bars ago is less than Highest("data" = high, "length" = 252) from 1 bars ago and
high from 2 bars ago is less than Highest("data" = high, "length" = 252) from 2 bars ago and
high from 3 bars ago is less than Highest("data" = high, "length" = 252) from 3 bars ago and
high from 4 bars ago is less than Highest("data" = high, "length" = 252) from 4 bars ago and
high from 5 bars ago is less than Highest("data" = high, "length" = 252) from 5 bars ago and
high from 6 bars ago is less than Highest("data" = high, "length" = 252) from 6 bars ago and
high from 7 bars ago is less than Highest("data" = high, "length" = 252) from 7 bars ago and
high from 8 bars ago is less than Highest("data" = high, "length" = 252) from 8 bars ago and
high from 9 bars ago is less than Highest("data" = high, "length" = 252) from 9 bars ago and
high from 10 bars ago is less than Highest("data" = high, "length" = 252) from 10 bars ago and
high from 11 bars ago is less than Highest("data" = high, "length" = 252) from 11 bars ago and
high from 12 bars ago is less than Highest("data" = high, "length" = 252) from 12 bars ago and
high from 13 bars ago is less than Highest("data" = high, "length" = 252) from 13 bars ago and
high from 14 bars ago is less than Highest("data" = high, "length" = 252) from 14 bars ago
Ideally, I want to check for the last 252 bars. So as you can see, this is probably not the most elegant way to program this.
I'm simply trying to check if today's high, is a 52-week high breakout and at no other time before it was there a day which broke out of the last 52-weeks highs. Essentially a "virgin" 52-week high breakout scan.