You have to know that with mql5, you can get a new tick while your "current" order is not yet processed. So your "comprado" and "vendido" can be false while you have an order still in processing on the server (or on the wire).
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I have the following code which is duplicating my orders, I create a Rule
I create the following rule to avoid it, but it keeps duplicating sometimes. not always.
I don't understand why it's duplicating the orders.