Hi all, I am trying to get the list of all stocks that went up 10% at some point during the day. That's 10% from the price at which the stock started trading today. I wrote this script and while all the results are correct, I noticed that it missed a few other stocks. For example, it missed KAVL and YTEN. Can you please take a look and let me know what I am doing wrong, because I can't find it. Thank you!
Code:
def na = double.nan;
def agg = AggregationPeriod.DAY;
def OpenLine = open(period = agg);
def High = Highest(high(period = AggregationPeriod.DAY)[0], 1);
plot X = if OpenLine * 1.1 < High
then
1
else na;