[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Intraday Intensity



PureBytes Links

Trading Reference Links

I'm attempting to create the Intraday Intensity normalized oscillator that
appears in John Bollinger's latest book.

This is what I have written based on the formula he provided:

{Intraday Intensity, 21-Day Normalized II Oscillator}

Input: Length(21);

Value1 = Average( 2*Close - High - Low / (High - Low)*Volume, Length) /
Average(Volume, Length)*100;

Plot1(Value1, "II%");


However, when the indicator is applied to data I receive the following
message:

****************************************************
 Runtime Error

 Attempted to divide by zero (0). You
 should always check before dividing
 to be sure divisor is not zero.

 Incorrect example:

 Value1 = (C - O) / (H - L)

 Correct example:

 Value1 = IFF(H - L <> 0, (C - O) / (H - L), 1)

*****************************************************

I understand the issue but, I've been unsuccessful at applying the fix.

There are two divisors in the formula.  Which one do I apply the IFF
statement to?

No matter which combination I choose, I continue to receive the same error.

Any help will be most appreciated.