Hey folks I am trying to build a scanner which detects if the current mark price is greater than 3% the mark price x minutes ago. Here is what I have so far
However I get the error "Secondary period not allowed: 1 min." Any suggestions would be appreciated. Also if you think my code would not work the way it is set up currently feel free to chime in with your expertise. It is very much welcomed.
Code:
input priceType = PriceType.MARK;
input period = AggregationPeriod.MIN;
def closePeriod = close(period = period, priceType = priceType);
def refPrice = (closePeriod from 2 bars ago) * 1.03;
plot scan = closePeriod > refPrice;
However I get the error "Secondary period not allowed: 1 min." Any suggestions would be appreciated. Also if you think my code would not work the way it is set up currently feel free to chime in with your expertise. It is very much welcomed.