Weekend Gap - Trade Exit Issue

 

In Metatrader, I had an open position on Friday that was closed out on Sunday due to a weekend gap in the market. The market opening on Sunday triggered the exit criteria of my system and the position was closed as the market opened. However the system did not draw an exit icon on the chart where the position was closed. Here is my exit logic; why didn't a trade close icon appear on the chart?

else // go to short position

{

if(BarClose>UpperStop) // Close order if closing price exceeds Donchian Upper Channel stop

{

OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // Close order

return(0);

}

Reason: