Noted Sir.
Please do help me to find error in below code pls. it will be very highly appreciated.
below is the basic ichimoku buy sell which is deletes the buy order automatically in backtesting result.
_SECTION_BEGIN(“Ichi”);
n1 = Param(“Conversion Line”,9,1,200,1);
n2 = Param(“Base Line”,26,1,400,1);
n3 = Param(“Lagging Span”,52,1,600,1);
TenkanSen =(HHV(H,n1)+LLV(L,n1))/2;
KijunSen =(HHV(H,n2)+LLV(L,n2))/2;
ChinkouSpan =Ref(C,-n2);
Cks = Close;
SenkouSpanA =Ref((KijunSen+TenkanSen)/2,-n2);
SpA =(KijunSen+TenkanSen)/2;
SenkouSpanB =Ref((HHV(H,n3)+LLV(L,n3))/2,-n2);
SpB =(HHV(H,n3)+LLV(L,n3))/2;
DL = Ref( C, 52);
//DL = Optimize (“DL”, 1000, 1, 100,1);
Plot (C,“Bars”,colorYellow,styleCandle);
Plot (TenkanSen,“Tenkan-sen”,colorRed);
Plot (KijunSen, “Kijun-sen”, colorBlue);
Plot (Cks,“Chinkou Span”,colorLime, style = styleLine,0,0,-n2);
Plot (SpA,“SenkouSpanA”,colorOrange,styleDashed,0,0,n2);
Plot (SpB,“SenkouSpanB”,colorViolet,styleDashed + styleThick,0,0,n2);
PlotOHLC (SpA,SpA,SpB,SpB,“Cloud”,IIf (SpA > SpB,colorPink,colorLavender),styleCloud, 10, 10, n2 );
Buy = Cross(TenkanSen,KijunSen) AND (DL>Close);
Sell = Cross(KijunSen,TenkanSen) AND (DL<KijunSen);
IIf( (Buy),PlotShapes(shapeStar*Buy,colorGreen,0,Low,-60,0),0);
IIf( (Sell),PlotShapes(shapeStar*Sell,colorRed,0,Low,-60,0),0);
_SECTION_END();