Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
ButterWorth Trading System for Amibroker (AFL)
Developed by R.Rajandran, this system is best for some shorlisted stocks like stocks 20-20
It catches trends very early on 5 mins time frame.
Even whipsaws wont ripe your profit as whole.
Use some other trend confirming indicator along with it.
Screenshots
Similar Indicators / Formulas
Indicator / Formula
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | /* Done by Rajandran R */ _SECTION_BEGIN ( "Butterworth Trend Trading System" ); SetBarsRequired (100000,0); GraphXSpace = 15; 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 () ); //PositionSize=100000; //////////////////////////////////////////////////////////////////////////// function Butterworth( mean, per ) { CutoffPeriod=per; Shift=0; coef1=coef2=coef3=coef4=0; tempReal= atan (1.0); rad2Deg = 45/tempReal; deg2Rad = 1.0/ rad2Deg; pi = atan (1.0)* 4; a1 = exp (- sqrt (2) * pi / CutoffPeriod); b1 = 2 * a1 * cos (deg2Rad * sqrt (2) * 180 / CutoffPeriod); coef2 = b1; coef3 = -a1 * a1; coef1 = (1 - b1 + a1 * a1) / 4; TBFilter[0]= C [0]; up[0]= Null ; down[0]= Null ; for (i = 1; i < BarCount ; i++){ if (i>3){ TBFilter[i]=coef1 *(mean[i]+2.0*mean[i-1] +mean[i-2])+coef2*TBFilter[i-1]+coef3*TBFilter[i-2]; } else { TBFilter[i]=mean[i]; } if (TBFilter[i]>TBFilter[i-1]){ up[i]=TBFilter[i]; up[i-1]=TBFilter[i-1]; } else { down[i]=TBFilter[i]; down[i-1]=TBFilter[i-1]; } } TBFilter1[ BarCount -1]= Null ; for (i=0;i< BarCount -1;i++) { TBFilter1[i]=TBFilter[i]; } return TBFilter1; } //////////////////////////////////////////////////////////////////////// PositionSize = 100000; FAST = Optimize ( "FAST" ,29,2,50,1); //ow =Optimize("SLOW",42,2,50,1); RSIValue =17; FBUTTER=Butterworth( C ,FAST); SBUTTER=Butterworth(FBUTTER,FAST); RSV= RSI (17); diff=FBUTTER-SBUTTER; //Buy = diff>0 AND Ref(diff,-1)<0 AND RSI(17)>50 AND Ref(RSI(17),-1)<50; //Sell =diff<0 AND Ref(diff,-1)>0 AND RSI(17)<50 AND Ref(RSI(17),-1)>50; Cond=0; ind =0; for ( i=0; i< BarCount ; i++) { if (diff[i]>0 AND RSV[i]>50) { Cond=1; } if (diff[i]<0 AND RSV[i]<50) { Cond=2; } Buy [i]=Cond==1 AND ind==2; Sell [i]=Cond==2 AND ind==1; ind = Cond; } //end for Short = Sell ; Cover = Buy ; Plot (FBUTTER, "FBUTTER" , colorGreen ); Plot (SBUTTER, "SBUTTER" , colorRed ); Title = EncodeColor ( colorWhite )+ "ButterWorth Trading System" + " - " + Name () + " - " + EncodeColor ( colorRed )+ Interval (2) + EncodeColor ( colorWhite ) + " - " + Date () + " - " + "\n" + EncodeColor ( colorRed ) + "Op-" + O + " " + "Hi-" + H + " " + "Lo-" + L + " " + "Cl-" + C + " " + "Vol= " + WriteVal ( V )+ "\n" + EncodeColor ( colorLime )+ WriteIf ( Buy , " GO LONG / Reverse Signal at " + C + " " , "" )+ WriteIf ( Sell , " EXIT LONG / Reverse Signal at " + C + " " , "" )+ "\n" + EncodeColor ( colorWhite )+ WriteIf ( Sell , "Total Profit/Loss for the Last Trade Rs." +( C - BuyPrice )+ "" , "" )+ WriteIf ( Buy , "Total Profit/Loss for the Last trade Rs." +( SellPrice - C )+ "" , "" ); PlotShapes ( IIf ( Buy , shapeSquare , shapeNone ), colorGreen , 0, L , Offset=-40); PlotShapes ( IIf ( Buy , shapeSquare , shapeNone ), colorLime , 0, L , Offset=-50); PlotShapes ( IIf ( Buy , shapeUpArrow , shapeNone ), colorWhite , 0, L , Offset=-45); PlotShapes ( IIf ( Sell , shapeSquare , shapeNone ), colorRed , 0, H , Offset=40); PlotShapes ( IIf ( Sell , shapeSquare , shapeNone ), colorOrange , 0, H , Offset=50); PlotShapes ( IIf ( Sell , shapeDownArrow , shapeNone ), colorWhite , 0, H , Offset=-45); _SECTION_END (); |
0 comments
Leave Comment
Please login here to leave a comment.
Back