Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Volatility for Amibroker (AFL)
This AFL helps you to find long and short signals or to identify trend based on the volatility.
Similar Indicators / Formulas
Indicator / Formula
//PRICE _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); //================================================================================================================== //BOLLINGER BANDS _SECTION_BEGIN("BB1"); P = ParamField("Price field",-1); Periods = Param("Periods", 20, 1, 300, 1 ); Width = Param("Width", 1, 0, 10, 0.05 ); Color = ParamColor("Color", colorCycle ); Style = ParamStyle("Style"); Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), colorRed, Style ); Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), colorRed, Style ); _SECTION_END(); _SECTION_BEGIN("BB2"); P = ParamField("Price field",-1); Periods = Param("Periods", 20, 2, 300, 1 ); Width = Param("Width", 2, 0, 10, 0.05 ); Color = ParamColor("Color", colorCycle ); Style = ParamStyle("Style"); Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style ); Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style ); _SECTION_END(); //============================================================================================== _SECTION_BEGIN("MA20"); MA20upcol=IIf(MA(C,20)>Ref(MA(C,20),-1),colorBlue,colorAqua) ; Plot( MA(C,20),"MA20", ma20upcol, styleDots) ; _SECTION_END(); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //TRENDING RIBBON // Paste the code below to your price chart somewhere and green ribbon means both // both MACD and ADX trending up so if the red ribbon shows up the MACD and the ADX // are both trending down. _SECTION_BEGIN("trending ribbon"); uptrend=PDI()>MDI() AND MACD()>Signal(); downtrend=MDI()>PDI() AND Signal()>MACD(); Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( uptrend, colorLime, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END(); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //FORMULE P = ParamField("Price field",-1); cuptop1=C>BBandTop(p,20,1) ; bot1=BBandBot(p,20,1) ; top2=BBandTop(p,20,2) ; bot2=BBandBot(p,20,2) ; stocup=StochK()>StochD() ; MACDup=MACD()>Signal() ; Hist=MACD()-Signal() ; Histup=Hist>Ref(Hist,-1) ; MFIupema5=MFI()>EMA(MFI(),5) ; Cupo=C>O ; top1up=BBandTop(p,20,1)>Ref(BBandTop(p,20,1),-1) ; band=BBandTop(p,20,2)-BBandBot(p,20,2) ; Volatbuy=band>Ref(band,-1) ; cupbot1=C>BBandBot(p,20,1) ; bot1up=BBandBot(p,20,1)>Ref(BBandBot(p,20,1),-1) ; MA20up=MA(C,20)>Ref(MA(C,20),-1) ; Vup10=V>10000 ; CCIup0=CCI()>0 ; //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //PARAMTOGGLE // This combines indicators into one timing Signal //function ParamOptimize( description, default, minv, maxv, step ) // { return Optimize(description, Param(description,default, minv, maxv, step ), minv, maxv, step ); } tgl = ParamToggle("Result", "AND logic|Compare"); // switch test calculation and compare the results if(tgl) { myBuy = volatbuy AND MA20up AND Histup AND MFIupema5 AND MACDup AND stochup ; myShort = !volatbuy AND !Histup AND !mfiupema5 ; } else { myBuy = IIf( band>Ref(band,-1) AND MA(C,20)>Ref(MA(C,20),-1) AND Hist>Ref(Hist,-1) AND MFI()>EMA(MFI(),5) AND MACD()>Signal() AND StochK()>StochD() ,1,0); myShort = IIf( band<Ref(band,-1) AND Hist<Ref(Hist,-1) AND MFI()<EMA(MFI(),5) ,1,0); } Buy = ExRem(myBuy, myShort); Sell = ExRem(myShort, myBuy); PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L,Offset=-10); PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,Offset=-10);
6 comments
Leave Comment
Please login here to leave a comment.
Back
Lots of Whipsaws and buy/sell signals are not impressive . Looks good in Daily and weekly timeframe (2 star from me).
I think this is a very nice try, especially for daily timeframe. I want to explore the formula a little bit, but overall the signal generated by the tool looks fine for me. Thanks for posting and best regards!
I’m proud of this formula!
Thank You to “the Author”!
middle MA line is good
thanx
@Makaran2,
thank you…..
Thank you for you contribution of this formula. If you change buy and sell signals to cross point of price to 2 red lines, the prediction will be more accurate. for information of others I must to say that other volatility indicator that presented in this site such as ATRstudy and JimBerg formula shows better results and I recommend to use them.