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 ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Exploration for BB Breakout for Amibroker (AFL)
Copy & Paste Friendly
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | /* This is not my Code, I got it from the Internet & I would like to share it with you. Good Luck*/ Length = 14; 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; IsBBSqueeze = bbUpper <= kUpper AND bbLower >= kLower; Proportion = (kUpper - kLower) / (bbUpper - bbLower); BBBreakout = Cross (1,Proportion); Periods = Param ( "BBPeriods" , 14, 2, 300, 1 ); Width = Param ( "Width" , 2, 0, 10, 0.05 ); Color = ParamColor ( "Color" , colorCycle ); Style = ParamStyle ( "Style" ); bbtop= BBandTop ( C , Periods, Width ); bbbot= BBandBot ( C , Periods, Width ); Plot (bbtop, "" , Color, Style ); Plot (bbbot , "" , Color, Style ); sqeezcolor= ColorRGB (194,220,218); PlotOHLC ( bbtop,bbtop, bbbot,bbbot, "" , IIf (IsBBSqueeze, colorYellow , colorLightGrey ), styleCloud | styleNoRescale , Null , Null , Null , -1 ); Plot ( Close , "Close" , IIf ( C >= O , colorBrightGreen , colorRed ), styleCandle ); Filter = BBBreakout; AddColumn (BBBreakout, "BB Breakout" , 1, colorWhite , IIf (BBBreakout==1, colorRed , colorWhite )); //set default sorting to Date/time in descending order in results window SetSortColumns (-2); |