That normally occurs when you divide by zero. So at a guess, your Range2 is returning a zero value for some or all of your bars. Perhaps you’re seeing it just at the start of the time series where there’s fewer bars than your PeriodRange, so it’s not able to calculate it yet?

No problem @fourier. Another approach is just to add a very tiny amount far to the right of the decimal point, to the denominator so it avoids it resolving as an absolute zero value.

Why should functions like HHV() , LLV() produce values other than null for bars before the defined period
its like having the MA(C, pds) returning MA ( C, n ) for each bar when n< pds
it just causes confusion, false signals, and extra line of code to fix .