Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

BB Squeeze TradeStation Code Port for Amibroker (AFL)
niladri
about 2 months ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker, squeeze, oscillator

BB Squeeze ( 100% conversion from Tradestation code to Amibroker)

Best Volatility breakout indicator ( either on buy or sell side , ref below video to understand the logic )

Instructions:

Insert Linked to new chart pane
Periods can be selected in Param window

Usage Demo from TradeStaion: https://www.youtube.com/watch?v=v2pbrz9K7X8 ( 20min onwards )

Squeeze play with Options Trade: https://tickertape.tdameritrade.com/tools/fearless-technician-ttm-squeeze-indicator-15072

Screenshots

Indicator / Formula

Copy & Paste Friendly

Insert Linked to new chart pane

_SECTION_BEGIN("BB Squeeze"); 
Price = Close;

Length = Param("Length",20,2,100,1); 		// { Length for Average True Range (ATR)}
Lenght1 = Param("Length1",20,2,100,1);       // {  Std. Deviation (SD) Calcs }
 
nK = Param("Channel ATRs",1.5,0.1,2,0.1); 	// { Keltner Channel ATRs from Average }
nBB = Param("BB Std Devs",2,0.1,3,0.1); 	// { Bollinger Band Std. Devs. from Average }

AlertLine = Param("AlertLine",1,0,3,1); 	        // { BBSqueezeex level at which to issue alerts }
 
NormalColor = colorRed; 				// { Normal color for BBSqueeze }
AlertlColor = colorLime; 					// { Color for BBSqueeze below alert line }
 
LHMult = Nz(PointValue);
 
//{-- Calculate BB Squeeze Indicator ----------------------}
AvgTrueRange = ATR(Length);
SDev = StDev(Price, Length);
 
Denom = nK*AvgTrueRange;
BBSqueeze = Nz((nBB * SDev) /Denom); 
 
SetPlotColor = IIf( BBSqueeze < Alertline, NormalColor, AlertlColor);

BBcrossDown = Cross(AlertLine,BBSqueeze);
BBcrossUp = Cross(BBSqueeze,AlertLine);
 
//{-- Plot the Alert Line -------------------------}
Plot(0, "", SetPlotColor, styleDots );

//{-- Plot delta of price from Donchian mid line ----------}
value2 = LinearReg( price-((HHV(H, Lenght1)+LLV(L, Lenght1))/2+ MA(C,Lenght1))/2, Lenght1);
color = IIf( value2 > 0, IIf( value2 > Ref(value2,-1), colorBlue, colorSkyblue), IIf( value2 < 0, IIf( value2 < Ref(value2,-1), colorRed, colorYellow ), colorGold ));
 
//Plot(value2*LHMult, "NickmNxtMove", color, styleHistogram );
Plot(value2,"BBSqueeze",color, styleHistogram );
 
//Sound alerts
AlertIf( BBcrossDown, "SOUND C:\\Windows\\Media\\RINGIN.WAV", "Audio alert", 2 );
AlertIf( BBcrossUp, "SOUND C:\\Windows\\Media\\RINGIN.WAV", "Audio alert", 2 );

PlotShapes( IIf( BBcrossDown, shapeHollowCircle, shapeNone ), colorYellow, layer = 0, yposition = 0, offset = 0);
PlotShapes( IIf( BBcrossUP, shapeHollowCircle, shapeNone ), colorWhite, layer = 0, yposition = 0, offset = 0);
_SECTION_END();

1 comments

1. anjan123

May I request for buy sell explorer.

Leave Comment

Please login here to leave a comment.

Back