AFL about plotshapes

#1
Dear All,

I tested a system which will trade one time only everyday and position will be cleared before the close of market.

The following AFL was used for plotting the signals:

shapebuy = Buy * shapeUpArrow + Sell * shapeDownArrow;
shapeshort = Short * shapeDownArrow + Cover * shapeUpArrow;
PlotShapes( shapebuy, IIf( Buy, colorYellow, colorBlue ), 0, IIf( Buy, Low, High ) );
PlotShapes( shapeshort, IIf( Short, colorRed, colorGreen ), 0, IIf( Short, High, Low ) );
GraphXSpace = 5;

However, the chart showed some trades which were not included in backtest report. For example, i have a buy position and closed at the close of market but the short of shape was also displayed in the chart which actually no such trade in backtest report.

In other word, how to plot the shapes for the actual trade as showed in the backtest report?

Thank you!!
 

Similar threads