Re: Backtesting result : 1 lac turns into 28 lacs in 1 y 2 m 10d for a bit active tra
how to get this chart in Ami
here's the afl :
_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 ) ) ));
TrendUp = C > Ref(HHV(H,8),-1);
TrendDn = C < Ref(LLV(L,8),-1);
TrendUp = ExRem(TrendUp,TrendDn);
TrendDn = ExRem(TrendDn,TrendUp);
Plot(Ref(HHV(H,8),-1),"\n 8 Hi", colorBlue);
Plot(Ref(LLV(L,8),-1),"8 Lo", colorRed);
up=Ref(((Ref(HHV(H,8),-3))+(Ref(LLV(L,8),-3)))/2,-1)<((Ref(HHV(H,8),-3))+(Ref(LLV(L,8),-3)))/2;
dn=Ref(((Ref(HHV(H,8),-3))+(Ref(LLV(L,8),-3)))/2,-1)>((Ref(HHV(H,8),-3))+(Ref(LLV(L,8),-3)))/2;
Vcolor=IIf( BarsSince(up) < BarsSince(dn),colorBrightGreen ,colorOrange);
Plot(((Ref(HHV(H,8),-3))+(Ref(LLV(L,8),-3)))/2,"\n8 Pivot 3 back shifted", Vcolor);
_SECTION_BEGIN("Chart");
D=IIf( C > Ref(HHV(H,8),-1), colorBlue ,IIf( C < Ref(LLV(L,8),-1), colorRed ,0 ));
Vcolor1=IIf( (trendup),colorBlue,IIf((trenddn), colorRed,D));//
GraphXSpace = 5;
PlotOHLC( Open, High, Low, Close, "", vcolor1, styleCandle | styleThick );
PlotShapes(IIf(trenddn, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20);
PlotShapes(IIf(trendup, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20);