I can't get this scan to work. Can someone help ?
Code:
def agg = AggregationPeriod.YEAR;
def ydiff = (high(period = AggregationPeriod.YEAR)[1] - low(period = AggregationPeriod.YEAR)[1]);
(low(period=agg) >= (open(period=agg)-(ydiff*0.24)) and close >= (open(period=agg))) or
(high(period=agg) <= ((open(period=agg)+(ydiff*0.24)) and close <= (open(period=agg)));