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

ButterWorth Trading System for Amibroker (AFL)
ajeet
about 7 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 2)
Tags:
trading system, amibroker

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

All in One
Submitted by Nahid over 8 years ago
Kase Peak Osc. V2 batu
Submitted by batu1453 about 5 years ago
Kase CD V2batu
Submitted by batu1453 about 5 years ago
Ichimoku
Submitted by prashantrdx about 5 years ago
Arvind' System
Submitted by akdabc about 9 years ago
Miftha remix for dse
Submitted by coolpace about 9 years ago

Indicator / Formula

Copy & Paste Friendly
/* 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