Show View - BBKC Squeeze

Using the following script for BBKC Squeeze Show View.

//Calc KC Mid Line
MidKC = MA(BARS=20, STYLE=Simple, CALC=Open);

//Calc Upper & Lower Keltner Channels using ATR
UpperKC = MidKC + ATR(BARS=20, MULT=2.00);
LowerKC = MidKC + ATR(BARS=20, MULT=2.00);

//Calc Upper and Lower Bollinger Bands
UpperBB = BB(BARS=20, DEFAULT=UpperLine, STDDEV=2.000000);
LowerBB = BB(BARS=20, DEFAULT=LowerLine, STDDEV=2.000000);

//Squeeze on
SQZOn = UpperBB < UpperKC and LowerBB > LowerKC;

//Squeeze off
SQZOff = UpperBB > UpperKC and LowerBB < LowerKC;

//Show View
SQZOff

When I use SQZOff as the Show View it works perfect. When using SQZOn, which is the one I want, Show View is blank.

Thanks

Tim

Hi Tim,

The LowerKC variable needs to be -ATR, not +ATR.

Also, note that we have the KC() function for Keltner Channel so there’s no need to create it.

Oops missed that.

Regarding KC from reading the Optuma tools section the KC’s are based on moving averages not ATR. Is that correct or have I miss read that?

Tim

Ah OK - yes it uses the moving average only.