// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("Squeeze");

BBLength= 10;
StdDv= 2;
K1= 5;
K2= 10;
Mul= 1.25;
Mi=EMA(C, K1);
Kel= ATR(K2)*Mul;
UB= Mi + Kel;
LB= Mi - Kel;
UpB=BBandTop(H,BBLength,StdDv);
Mdb=MA(C, BBLength);
DnB=BBandBot(L,BBLength,StdDv);

//Plot (Mi,"",3,1);
//Plot (UB,"",3,1);
//Plot (LB,"",3,1);
//Plot(UpB,"",12,1);
//Plot(MdB,"",12,1);
//Plot(DnB,"",12,1);



Plot( 2, "",IIf(UpB < UB AND DnB > LB ,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -2.5, 100 );


Squeeze = UpB < UB AND DnB > LB ;

Filter = Squeeze ;

AddColumn(Close,"close");
_SECTION_END();