Handling Functions like Highest where a stock has less bars then the length

T

thetradingfrog

New member
Hello,

I am trying to find the highest of several values for a scanner I am working on. I want to do something like
Code:
plot highestHigh = Highest(high, 100);
Which works fine until I come across stock that are recently IPO'd and do not have 100 days of data yet. In this case Highest returns N/A. If there a way to work around this. I tried to calculate the number of bars available however it doesn't seem like a variable number can be passed to the Highest function.

Any help would be greatly appreciated.

Thanks,
Nathan
 

Similar threads

Top