Stoynks
Member
		Code:
	
	def x = if close crosses above VWAP then 1 else x[1];
plot alert = if x == 1 then 1 else 0;This code is great when finding out the stock is is crossing vwap. My only problem is instead of showing 0, it is showing NaN. How do I add a false statement and x[1] together?
is it like this?
		Code:
	
	if close crosses above VWAP then 1 else 0 and x[1]that way my plot alert triggers the 0 instead of NaN
I also tried:
		Code:
	
	plot alert = if x == 1 then 1 else if x!= 1 then 0 else 0;Please Help. Very Much Appreciated.
 
				 
						 
 
		 
 
		 
 
		