Bollinger Squeeze Explorer

#1
I'm Trying to create an exploration to identify when the Bollinger bands are starting to squeeze together

I would like to run these on multiple securities to identify possible trading opportunities

Is this possible in Metastock?

Steve
 
#2
To find the Bollinger Band Squeeze with Metastock create the 2 indicators below:

BollingerBandHistogram
X:= ((C+2*Std(C,13)-Mov(C,13,E))/(4*(Std(C,13)))*100);
Blue:=If(X>80,X,0);
Red:=If(X<80,X,0);
Blue; Red;

BB Squeeze
If(Fml('BollingerBandHistogram')>45 AND Fml('BollingerBandHistogram')<55,1,0)

Then create the below in your Explorer.

Straddles/Strangles
EXPLORATION NOTES
-----------------
Finds Stocks that have the Bollinger Bands Squeezing Together
CALCULATION PARAMETERS
-----------------------
Periodicity: Daily
COLUMN FORMULAS
---------------
ColumnA: Close
CLOSE
ColumnB: Squeeze
Fml('BB Squeeze')
ColumnC: 2DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-1)=1,1,0)
ColumnD: 3DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-3)=1,1,0)
ColumnE: 5DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-5)=1,1,0)
ColumnF: 8DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-8 )=1,1,0)
FILTER SOURCE
-------------
Filter Enabled: Yes
Formula:
colA>20 AND (colB=1 OR colC=1 OR colD=1 OR colE=1 OR colF=1)
 
#4
For amibroker

Formula:

/*
Bollinger bands squeeze.
By Vladimir Gaitanoff, 2005. support<at>vglib<dot>com

This is a volatility indicator.
It can be used to determine the periods of extremes of low volatility which
usually followed by big moves.
Indicator does not show direction of the trade, only timing.
Some other aspects of technical/fundamental analysis should be employed for
direction.

There is a signal line with colored dots. Red dots indicate periods of low
volatility (sqeeze).
Green dots indicate periods of high volatility.
Indicator line crosses above and below signal line. Time trades at historical
extremes of low volatility.

It can be used for scans, for instance, to find stepper stocks before big
moves.
The original author of the idea uses it for intraday trading.

For confirmation look for sqeezes in two different time frames.

*/

Length = 8;
Price = EMA(Close, Length);

// Keltner
kLength = Length;
kN = 1.5;
kATR = ATR(kLength);
kUpper = Price + kN * kATR;
kLower = Price - kN * kATR;

// Bollinger
bbLength = Length;
bbN = 2;
bbStDevValues = StDev(Close, bbLength);
bbUpper = Price + bbN * bbStDevValues;
bbLower = Price - bbN * bbStDevValues;

IsSignal =
bbUpper <= kUpper AND
bbLower >= kLower;

Graph0 = 1;
Graph0Style = styleDots;
Graph0BarColor = IIf(IsSignal, colorRed, colorGreen);

Proportion = (kUpper - kLower) / (bbUpper - bbLower);
Graph1 = Proportion;

Title = "Next Move Signal. In squeeze: " + WriteVal(IsSignal, 1) + "
Keltner/Bollinger: " + WriteVal(Proportion);
 

rkkarnani

Well-Known Member
#5
To find the Bollinger Band Squeeze with Metastock create the 2 indicators below:

BollingerBandHistogram
X:= ((C+2*Std(C,13)-Mov(C,13,E))/(4*(Std(C,13)))*100);
Blue:=If(X>80,X,0);
Red:=If(X<80,X,0);
Blue; Red;

BB Squeeze
If(Fml('BollingerBandHistogram')>45 AND Fml('BollingerBandHistogram')<55,1,0)

Then create the below in your Explorer.

Straddles/Strangles
EXPLORATION NOTES
-----------------
Finds Stocks that have the Bollinger Bands Squeezing Together
CALCULATION PARAMETERS
-----------------------
Periodicity: Daily
COLUMN FORMULAS
---------------
ColumnA: Close
CLOSE
ColumnB: Squeeze
Fml('BB Squeeze')
ColumnC: 2DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-1)=1,1,0)
ColumnD: 3DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-3)=1,1,0)
ColumnE: 5DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-5)=1,1,0)
ColumnF: 8DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-8 )=1,1,0)
FILTER SOURCE
-------------
Filter Enabled: Yes
Formula:
colA>20 AND (colB=1 OR colC=1 OR colD=1 OR colE=1 OR colF=1)
Thanks for this exploration!! :clapping:
 
#6
kumaram

Thanks for this exploration

I'm getting an error messages when I create the Indicators. It's asking me for quotation marks in front of Fml('BollingerBandHistogram') Statement.

I might be misunderstanding this process, but I'm assuming that I have to create 2 Separate Indicators in the Indicator Builder:

1. Named BollingerBandHistogram
2. Named BB Squeeze

Both with their respective formulas

Then create the Exploration.

I do understand the exploration Part.
 

Karanm

Active Member
#8
To find the Bollinger Band Squeeze with Metastock create the 2 indicators below:

BollingerBandHistogram
X:= ((C+2*Std(C,13)-Mov(C,13,E))/(4*(Std(C,13)))*100);
Blue:=If(X>80,X,0);
Red:=If(X<80,X,0);
Blue; Red;

BB Squeeze
If(Fml('BollingerBandHistogram')>45 AND Fml('BollingerBandHistogram')<55,1,0)

Then create the below in your Explorer.

Straddles/Strangles
EXPLORATION NOTES
-----------------
Finds Stocks that have the Bollinger Bands Squeezing Together
CALCULATION PARAMETERS
-----------------------
Periodicity: Daily
COLUMN FORMULAS
---------------
ColumnA: Close
CLOSE
ColumnB: Squeeze
Fml('BB Squeeze')
ColumnC: 2DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-1)=1,1,0)
ColumnD: 3DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-3)=1,1,0)
ColumnE: 5DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-5)=1,1,0)
ColumnF: 8DaySQ
If(Fml('BB Squeeze') AND Ref(Fml('BB Squeeze'),-8 )=1,1,0)
FILTER SOURCE
-------------
Filter Enabled: Yes
Formula:
colA>20 AND (colB=1 OR colC=1 OR colD=1 OR colE=1 OR colF=1)
Sir, is it possible to Explore Congestion of Multiple Moving Averages on EOD Data in Metastock. If yes, Kindly provide the Formula for the Explorer.
Regards
Karanm
 
#9
can anybody help me to make a exploration in ms when price once touches the lower bb and then after leaving the bb bottom i.e. low of the bar is now not touching the lower band it gives BUY SIGNAL AND VICE VERSA
 

AJAY

Active Member
#10
Hi Friends,

When it is to look for a Bollinger Band Squeeze, I just increase the chart periodicity and look for a low range bar or an inside bar.

Say e.g., if you want a Squeeze on Daily charts, then just keep "Inside()" in Filter tab and in Exploration Options, change the exploration periodicity to monthly. Generally this logic works well for me.

Similarly you may use Low Range Bar formula in filter and run exploration.

Please give a try. I believe you will be happy using this exploration.

Happy practicing technicals

Ajayakumar
 

Similar threads