SH sir great efforts u have taken for developing this complete trend following strategy. There is small contribution from my side. developed afl with basic rules of this system. having 3 ema 15 ema and crossover point for tomorrow. Still need to modify with other rules.
/*
Basic 315 strategy is implimented
Buy at crossover point and short at crossover point */
_SECTION_BEGIN("315 cross");
SetBacktestMode( backtestRegularRawMulti );
SetPositionSize(1,spsShares);
CrossPoint= ((EMA(C,15)*(1-(2/(1+15))))-(EMA(C,3)*(1-(2/(1+3)))))/((2/(1+3))-(2/(1+15)));
Plot(Close,"Price",colorBlack, styleCandle);
Plot(EMA(Close,3),"3EMA",colorBlue,style=styleThick);
Plot(EMA(Close,15),"15EMA",colorRed,style=styleThick);
Plot(CrossPoint,"CrossPoint",colorGreen,style=styleThick);
Buy=(Cross(EMA(Close,3),EMA(Close,15)));
Sell=Cross(EMA(Close,15),EMA(Close,3));
Short=Sell;
Cover=Buy; shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
BuyPrice=IIf(Ref(Crosspoint,-1)<O,O,Ref(Crosspoint,-1));
SellPrice=IIf(Ref(Crosspoint,-1)>O,O,Ref(Crosspoint,-1));
ShortPrice=SellPrice;
CoverPrice=BuyPrice;
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlack) );
Hor=Param("Horizontal Position",630,1,1200,1);
Ver=Param("Vertical Position",1,1,830,1);
GfxTextOut(" "+Crosspoint, Hor , Ver );
/*
Basic 315 strategy is implimented
Buy at crossover point and short at crossover point */
_SECTION_BEGIN("315 cross");
SetBacktestMode( backtestRegularRawMulti );
SetPositionSize(1,spsShares);
CrossPoint= ((EMA(C,15)*(1-(2/(1+15))))-(EMA(C,3)*(1-(2/(1+3)))))/((2/(1+3))-(2/(1+15)));
Plot(Close,"Price",colorBlack, styleCandle);
Plot(EMA(Close,3),"3EMA",colorBlue,style=styleThick);
Plot(EMA(Close,15),"15EMA",colorRed,style=styleThick);
Plot(CrossPoint,"CrossPoint",colorGreen,style=styleThick);
Buy=(Cross(EMA(Close,3),EMA(Close,15)));
Sell=Cross(EMA(Close,15),EMA(Close,3));
Short=Sell;
Cover=Buy; shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
BuyPrice=IIf(Ref(Crosspoint,-1)<O,O,Ref(Crosspoint,-1));
SellPrice=IIf(Ref(Crosspoint,-1)>O,O,Ref(Crosspoint,-1));
ShortPrice=SellPrice;
CoverPrice=BuyPrice;
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlack) );
Hor=Param("Horizontal Position",630,1,1200,1);
Ver=Param("Vertical Position",1,1,830,1);
GfxTextOut(" "+Crosspoint, Hor , Ver );