Hi ,
I need help regarding exploration. I modified the code a little bit to make squeeze appear as a ribbon and also added 'Filter' to it to enable exploration.
On exploring with n last quotations and n=1, I am not getting the stocks which are currently having Squeeze. I want to see the stocks having squeeze in 5 Min TF. Please find the code below. Am I doing anything wrong in coding this way?
Clarification will be highly appreciated.
_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);
//PlotOHLC(Open,High,Low,Close,"KPL",colorYellow, style=styleBar);
//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();
Regards,
Sreenath
I need help regarding exploration. I modified the code a little bit to make squeeze appear as a ribbon and also added 'Filter' to it to enable exploration.
On exploring with n last quotations and n=1, I am not getting the stocks which are currently having Squeeze. I want to see the stocks having squeeze in 5 Min TF. Please find the code below. Am I doing anything wrong in coding this way?
Clarification will be highly appreciated.
_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);
//PlotOHLC(Open,High,Low,Close,"KPL",colorYellow, style=styleBar);
//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();
Regards,
Sreenath