Unreliable onTrade filter events on MT5
-
Hi, I'm having problems using onTrade filter events on MT5.
Those work sometimes, sometimes doesn't.
This doesn't happen on MT4 and I cannot figure out the cause.
In this example, I put a SL and TP when opening a position. Sometimes the SL and TP is set, and other times not. It should work always!

https://fxdreema.com/shared/Lm2U59LNd
Greetings.
-
@nilsen said in Unreliable onTrade filter events on MT5:
Hi, I'm having problems using onTrade filter events on MT5.
Those work sometimes, sometimes doesn't.
This doesn't happen on MT4 and I cannot figure out the cause.
In this example, I put a SL and TP when opening a position. Sometimes the SL and TP is set, and other times not. It should work always!

https://fxdreema.com/shared/Lm2U59LNd
Greetings.
Yes, it happens to me too, a couple of times it modifies the stops and then it doesn't work anymore. Is it a bug @FxDreema ?
-
@nilsen Did you check the logs in mt5? Also check minimum stop level of the instrument. I'm on mobile at the moment and can't open the blocks in your project. So it's just a guess.
-
@trader-philipps Stops are 50 pips, so no problem with that. I've checked the logs and there are no errors. When SL is applied, a modify line apperars on the log. When not, that modify line is missing. It's very random.
-
MT5 if FAR less efficient than MT4 in fxDreema. Unfortunately it's very buggy :(.
-
@l-andorrà It's a real shame because MT5 is much more reliable on the data and on stability.
MT4 is very unstable in comparisson on my experience.
I need to use MT5 because my broker has server occasional overflows on MT4, causing some hangs that can last for minutes, and this can be very dangerous...
In the other way, using the same broker, on MT5, the client is 100% reliable and stable.
-
This problem is already known by the administrator, but apparently he is not specially motivated to fix it, I'm afraid.

-
Anyone could point me to some MQL5 code to do that?
-
@nilsen Try a similar way in "on tick" tab

-
@ambrogio Thank you, works perfectly!!!!!
-
I've contacted fxdreema by mail and he helped me with the solution to this problem:
onTrade events are not reliable when trades are manually launched. So if those trades are launched from the EA, those work perfectly.
-
@nilsen said in Unreliable onTrade filter events on MT5:
I've contacted fxdreema by mail and he helped me with the solution to this problem:
onTrade events are not reliable when trades are manually launched. So if those trades are launched from from the EA, those work perfectly.
I didn't know that. Did he say how to fix that manual trades problem?
-
@l-andorrà No, but it can be easily managed just using buttons to launch the orders
-
@nilsen said in Unreliable onTrade filter events on MT5:
I've contacted fxdreema by mail and he helped me with the solution to this problem:
onTrade events are not reliable when trades are manually launched. So if those trades are launched from the EA, those work perfectly.
To manage manual orders you must specify it in the "group" field
