EA Closing new orders continuously after new order with the wrong TP

 

We coded a simple martingale strategy EA that immediately opens new order and closes upon reaching TP. For this demo bot, we had $1 as TP.

But for some reason, THIS happens:

Error

I suspect this to be a latency problem from a laggy VPS (where multiple demo bots are running) but I'm not sure.

Would delaying the TP function after a new order help solve this problem?

Thanks for the help in advance

 
Im sure, you do not have an expert on your phone
 
amando:
Im sure, you do not have an expert on your phone

Obviously, I have an expert installed on a MT4 in a VPS and I only monitor its orders through phone.