Welcome to the Traders Laboratory Forums.
Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL.

Reply
Squeezer Details »»
Squeezer
Platform: 8.6, by caglebagle caglebagle is offline
Developer Last Online: Oct 2009 Show Printable Version Email this Page

Platform: Tradestation Rating:
Released: 08-13-2009 Last Update: Never Installs: 8
 
No support by the author.

Here's a little indicator I coded a while back which displays the upper and lower band values when a bollinger band squeeze is on. The price lines disappear when the bands exit the squeeze. The idea is to place an entry bracket at price lines in anticipation of the breakout. Hope someone finds it useful.

Code:
inputs:
	BollingerPrice( close),
	bbLength( 13 ),
	NumDevsUp( 2 ),
	NumDevsDn( -2),
	Displace( 0 ) ,
	kPrice( Close ), 
	kLength( 13 ), 
	NumATRs( 1.5 ),
	Plotbb(false); 
	
variables:
	bbAvg( 0 ),
	kAvg(0),
	SDev( 0 ),
	bbLowerBand( 0 ),
	bbUpperBand( 0 ), 
	Shift( 0 ),
 	kLowerBand( 0 ), 
	kUpperBand( 0 ),
	decimals(autodecimals),
	rndbbupperband(0),
	rndbblowerband(0);
	

{bb}
bbAvg = AverageFC( BollingerPrice, bbLength ) ;
SDev = StandardDev( BollingerPrice, bbLength, 1 ) ;
bbUpperBand = bbAvg + NumDevsUp * SDev ;
bbLowerBand = bbAvg + NumDevsDn * SDev ;
{kc}
kAvg = AverageFC( kPrice, kLength ) ;
Shift = NumATRs * AvgTrueRange( kLength ) ;
kUpperBand = kAvg + Shift ;
kLowerBand = kAvg - Shift ;
{bb}
If plotbb=true then begin	
if Displace >= 0 or CurrentBar > AbsValue( Displace ) then 
	begin
	Plot1[Displace]( bbUpperBand, "UpperBand" ) ;
	Plot2[Displace]( bbLowerBand, "LowerBand" ) ;
	Plot3[Displace]( bbAvg, "MidLine" ) ;
end;
{kc}
if Displace >= 0 or CurrentBar > AbsValue( Displace )  then 
	begin
	Plot4[Displace]( kUpperBand, "UpperBand" ) ;
	Plot5[Displace]( kLowerBand, "LowerBand" ) ;
	
	end;
end;

If bbUpperBand<=kUpperband or bbLowerband>=klowerband then begin
	setplotcolor(1,yellow);
	setplotcolor(2,yellow);
end;	

if lastbaronchart then begin
	
	value1=TL_new(currentdate, currenttime+5, bbUpperband, currentdate, currenttime+5, bbUpperband);
	value2=TL_new(currentdate, currenttime+5, bbLowerband, currentdate, currenttime+5, bbLowerband);
	
	TL_SetExtRight(1, true);
	TL_SetExtRight(2, true);
	

	TL_SetStyle(1, tool_solid);
	TL_SetStyle(2, tool_solid);
	


	TL_SetColor(1, yellow);
	TL_SetColor(2, yellow);
	

	TL_SetSize(1, 0);
	TL_SetSize(2, 0);


rndbbupperband=roundinst(bbupperband);
rndbblowerband=roundinst(bblowerband);
	value3=Text_New(Date, time, 0, numtostr(rndbbupperband,decimals));
	
	Text_SetLocation(1, currentDate, currenttime+5, bbupperband);
	Text_SetColor(1, green);
		
	value4=Text_New(Date, Time, 0, numtostr(rndbblowerband,decimals));
	Text_SetLocation(2, currentDate, currenttime+5, bblowerband);
	Text_SetColor(2, red);
If  bbUpperBand>=kUpperband or bbLowerband<=klowerband then begin
	TL_Delete(1);
	TL_Delete(2);
	Text_Delete(1);
	Text_Delete(2);
end;



	
end;
Let me know if you have any issues. Squeezer.eld is the indicator. Auto Decimals.eld and RoundInst.eld are functions referenced in the indicator.

JC

Download Now

File Type: eld SQUEEZER.ELD (9.3 KB, 125 views)
File Type: eld AUTO DECIMALS.ELD (2.6 KB, 77 views)
File Type: eld ROUNDINST.ELD (3.5 KB, 74 views)

Show Your Support

  • If you like to thanks you by the author -> Click Thanks to the Author
  • This modification may not be copied, reproduced or published elsewhere without the author's permission.
The Following 5 Users Say Thank You to caglebagle For This Useful Post:
birddog (08-13-2009), pathfinder62 (09-22-2009), Power555 (08-19-2009), sunilrohira (09-06-2009), Tams (08-13-2009)

Comments
Old 08-13-2009, 04:12 PM   #2

Join Date: Sep 2007
Location: Mobile
Posts: 15
Ignore this user

Thanks: 3
Thanked 12 Times in 5 Posts

Re: Squeezer

Here's a pic.
This indicator is made to be used in conjunction with the BB Squeeze indicator FWIW.

JC
Attached Thumbnails
Squeezer-squeezer.png  
caglebagle is offline  
Reply With Quote
Old 08-13-2009, 04:24 PM   #3

Join Date: Jun 2009
Location: Seattle
Posts: 63
Ignore this user

Thanks: 8
Thanked 18 Times in 16 Posts

Re: Squeezer

<ajax> JC.....copied & pasted in EasyLanguage......it would not verify, as sadi a "word" was not coorect.....hmmmm. Can ya post the "ELD" for it???....thx JC....
ajax358 is offline  
Reply With Quote
Old 08-13-2009, 04:25 PM   #4

Join Date: Jun 2009
Location: Seattle
Posts: 63
Ignore this user

Thanks: 8
Thanked 18 Times in 16 Posts

Re: Squeezer

TS would not "verify" when hi tthat button in last pahse of making the indicator in Easy Language...... ajax
ajax358 is offline  
Reply With Quote
Old 08-13-2009, 04:27 PM   #5

Join Date: Sep 2007
Location: Mobile
Posts: 15
Ignore this user

Thanks: 3
Thanked 12 Times in 5 Posts

Re: Squeezer

k.....ELD posted. Let me know if you get it working....It verified for me. I'm using 8.6 build 2612 fwiw
caglebagle is offline  
Reply With Quote
Old 08-13-2009, 04:34 PM   #6

Join Date: Jun 2009
Location: Seattle
Posts: 63
Ignore this user

Thanks: 8
Thanked 18 Times in 16 Posts

Re: Squeezer

k.....using same Build.....so will test it now....thx again JC.....
ajax358 is offline  
Reply With Quote
Old 08-13-2009, 04:41 PM   #7

Join Date: Sep 2007
Location: Mobile
Posts: 15
Ignore this user

Thanks: 3
Thanked 12 Times in 5 Posts

Re: Squeezer

K.....the functions needed for the indicator are posted now. That should solve it.

JC
caglebagle is offline  
Reply With Quote
Old 08-13-2009, 04:50 PM   #8

Join Date: Sep 2007
Location: Mobile
Posts: 15
Ignore this user

Thanks: 3
Thanked 12 Times in 5 Posts

Re: Squeezer

I found another squeeze related indicator that I coded a while back. This one is a paintbar indicator and paints the bars when a squeeze is entered. It works well with the above indicator and the BB Squeeze indicator.

JC
Attached Thumbnails
Squeezer-squeezrpb.png  
Attached Files
File Type: eld SQUEEZRPB.ELD (4.3 KB, 69 views)

Last edited by caglebagle; 08-13-2009 at 04:57 PM.
caglebagle is offline  
Reply With Quote
The Following 3 Users Say Thank You to caglebagle For This Useful Post:
pathfinder62 (09-22-2009), Power555 (08-19-2009), Tams (08-13-2009)

Reply

Thread Tools
Help Others By Rating This Thread
Help Others By Rating This Thread:


All times are GMT -4. The time now is 10:58 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.