Zorro 1.24 and 1.26 / Can't close trades with MT4

Posted By: jcl

Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/06/14 16:44

There have been two reports recently that Zorro could not close trades with the MT4 bridge under certain circumstances. Here's a new Zorro.mq4 script that should solve this problem:

http://server.conitec.net/down/ZorroMT4.zip

You only need to update the Zorro.mq4 in the Experts folder. The other files in the zip archive are unchanged.

The problem affected both Zorro 1.24 and the version 1.26 until yesterday. The current 1.26 version already contains the patched script.
Posted By: Mangal

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/07/14 04:29

After replacing the folder Zorro MT4 in 1.26 folder, do we need to close the instante of 1.26 and open it again, or it is not necessary?
Posted By: jcl

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/07/14 10:50

Close and open it. Replacing the script restarts the MT4 expert, so Zorro should log in again.
Posted By: mustang

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/07/14 22:22

"There have been two reports recently that Zorro could not close trades with the MT4 bridge under certain circumstances"

What are the circumstances?

I have updated zorro.mq4 (compiled to zorro.ex4) and although Zorro is now closing trades on my own strategy, it is still printing:
On Zorro => "Can't close"
On MT4 Bridge => "Close failed - Invalid function parameter value", "Invalid lots number or OrderClose funtion"
Posted By: mustang

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/08/14 02:27

[USD/JPY:J_ENTER:S2375] Can't close 2@108.24 at 02:13

Below are the messages I get. Zorro does close some trades and does not close some other. This is a mystery because it should either never close or always close.

[Wed 08.10.14 02:14] 2832 -10 +3 !/
[USD/JPY:J_ENTER:S2374] Can't close 1@108.24 at 02:14
[USD/JPY:J_ENTER:S2375] Can't close 2@108.24 at 02:14

[Wed 08.10.14 02:15] 2832 -10 +3 !/
[USD/JPY:J_ENTER:S2374] Can't close 1@108.25 at 02:15
[USD/JPY:J_ENTER:S2375] Can't close 2@108.25 at 02:15

[Wed 08.10.14 02:16] 2832 -10 +3 !/
[Wed 08.10.14 02:17] 2832 -10 +3 !/
Posted By: mustang

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/08/14 15:23

Update: not sure what made it to work but Zorro closes trades and no error message anymore, neither on Zorro logs, nor on MT4. All I did was shutdown the laptop last night and start it again this morning, then re-attach Zorro EA to MT4 graph. All this I had done before, but looks like this time was good!
Posted By: boatman

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/08/14 16:34

Hey Mustang, I had this problem as well - http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=445897#Post445897 - and it seemed to be occurring when I invoked the exitLong() and exitShort() functions. 'Stop' and 'Trail' exits worked fine.

It seems that the issue is now resolved, but I'd really like to know what was causing the problem in the first place, for two reasons:
1. To improve my own knowledge of how the MT4 plugin works; and
2. To have some idea of how to solve problems of this nature that might arise in the future.

JCL, any chance of enlightening us as to the details of the issue?

Cheers
Posted By: jcl

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/08/14 16:51

It was a bug in the bridge with a random behavior, dependent on the pattern of trades. Interestingly the bug was there all the time, but was only reported now. The changed script is not a fix but a workaround, the real fix will come with the next Zorro version. But the workaround should work 100%.
Posted By: mustang

Re: Zorro 1.24 and 1.26 / Can't close trades with MT4 - 10/08/14 17:35

Thank you Boatman and JCL for the info.
It's great to see trades open/close as expected!
Cheers!
© 2024 lite-C Forums