Here is My Simple AFL, just two MA cross
SetPositionSize( 1 , spsShares ) ; //每個信號下一口單
FastMAs = Param("FaseMA", 3, 3, 30, 1);
SlowMAs = Param("SlowMA", 20, 8, 40, 1);
FastMA = MA(C, FastMAs);
SlowMA = MA(C, SlowMAs);
Buy = Cross(FastMA, SlowMA);
Sell = Cross(SlowMA, FastMA);
Short = Sell;
Cover = Buy;
Plot(FastMA , "FastMA", colorBlue , styleLine ) ;
Plot(SlowMA , "SlowMA", colorYellow , styleLine ) ;
PlotShapes(Buy * shapeUpTriangle, colorBlue, 0, L, -10);
PlotShapes(Sell * shapeDownTriangle, colorOrange, 0, H, -10);
Plot( C , "Close" , colorDefault , styleCandle );
but in BackTest , i lost some trade like this
lost some trade , how to check it