Backtesting | Arrow display delay (see image)

 

Hi guys!

I recently made an EA and was operating on a live account when I noticed that an EA position was not opened. When running a backtest on the same day in visual mode I noticed that something different happened in the same position that was not opened in the real account. It is as if he entered the new position, displayed the entry price and stop loss line, but still did not show the entry arrow in the operation (1st part of the photo). However, when he leaves the position, then the arrow appears (3rd part of the photo). In the tests this does not influence the results, and for that reason I never noticed when testing only, but in the real account, as I said, this order is not sent when this happens in the tests.

What I was able to notice is that this happens when the robot closes an operation, and right after that in the next candle in a few seconds it already opens another operation at the same price (or very close).

Has anyone been through this and would you know how to tell me how to fix it?

Thank you!!

Example

Reason: