Virtual Stops are deleted when two EA's are running
-
Hi,
I'm running two different EA's on the same MT4 and they are both using Virtual Stops.
But when one EA is already in a trade and the other EA takes a trade and both Virtual Stops are running at the same time for both EA's, then one of the Virtual Stops (objects) gets deleted for one of the EA's and that EA no longer has a Virtual Stop.
Is this a bug and if so are you able to fix?
If not, do you know why this might be happening?
Thanks!
-
I think I programmed those lines to be automatically deleted if no corresponding trade is found. The link between the trade and its line is in the name of the line, the name starts with "#" and the ticket number. I need to check it to see what is going on.
Just in case, it will be good if you have instruction of how to replicate the problem easily. Sometimes I don't know what exactly to do to get the problem. -
Thanks.
To replicate the problem, have two EA's running on the same time frame on demo, both using virtual stops that trail and have trades execute one after the other. At some point the trades should both be running with their independent virtual stops. You should notice that one of the stops disappears (I think after the first stop is hit on one of the trades)
I've attached 2 EA's you can use to test. One triggers a trade after 3 seconds the other after 30 seconds. Just run them on the same pair and timeframe. in demo. You'll see how the virtual stops disappear - especially when one trade closes on a stop.
1_1519164402790_Virtual Stops Disappear - B2.mq4 0_1519164402790_Virtual Stops Disappear - B1.mq4
-
Any update on this?
Thanks
-
I think no. I eventually decided to make the code of all MQL4 and MQL5 blocks the same and meanwhile I fixed some things here and there, but I think I didn't touched the virtual stops yet.