Hi
I'm still quite new to ThinkScript and TOS in general and I am trying to understand isNAN() function. I see there are a couple of examples and questions, but I am still not quite sure about something.
I do understand that this is used to check if a parameter value is a number or not. Where my confusion come in is when I look at the example here:
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Math---Trig/IsNaN
specifically, the first line line under Example1 from the link above:
My question is, under what circumstances would IsNaN(close) not be number?
I'm still quite new to ThinkScript and TOS in general and I am trying to understand isNAN() function. I see there are a couple of examples and questions, but I am still not quite sure about something.
I do understand that this is used to check if a parameter value is a number or not. Where my confusion come in is when I look at the example here:
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Math---Trig/IsNaN
specifically, the first line line under Example1 from the link above:
Code:
def onExpansion = if IsNaN(close) then yes else no;
plot HighestClose = if onExpansion then HighestAll(close) else double.NaN;
plot LowestClose = if onExpansion then LowestAll(close) else double.NaN;
My question is, under what circumstances would IsNaN(close) not be number?