Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Slow order placement via MT4 bridge #462506
10/05/16 13:45
10/05/16 13:45
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
I've noticed that there's a substantial delay between subsequent order placement instructions (up to several seconds). The following is from MT log. If I understand it correctly every odd line indicates an instruction received from Zorro and every even line indicates response from the broker. The first weird thing is that the first instruction was received almost 3 seconds after 10:00:00. After that the response from the broker usually takes around 200-300 ms. But the interval between different orders can be several seconds. With all the assets I'm trading this means that the last order can be up to 20 seconds delayed. I checked the resource monitor during the order placement and the CPU or memory capacity shouldn't be the culprit. The strategy contains only an asset loop and algo loop (with 2 different algos) and there are no complicated computations. It's the new Zorro / bridge version so the cumulative delay bug from previous version should be fixed. Does anyone else experience the same? Is it possible to decrease the delay somehow?

Quote:

0 10:00:02.930 Zorro EURUSD,M1: Close [NZDUSD:L6197] 0.2@0.7257
2 10:00:03.140 Zorro EURUSD,M1: close #2996197 buy 0.20 NZDUSD at 0.72548 at price 0.72565
0 10:00:05.064 Zorro EURUSD,M1: Open NZDUSD 0.2@0.7256 stop 0 slp 5 magic 42379
2 10:00:05.275 Zorro EURUSD,M1: open #2996336 sell 0.20 NZDUSD at 0.72563 ok
0 10:00:05.563 Zorro EURUSD,M1: Close [USDCAD:S6053] 0.2@1.3173
2 10:00:05.985 Zorro EURUSD,M1: close #2996053 sell 0.20 USDCAD at 1.31513 at price 1.31736
0 10:00:07.539 Zorro EURUSD,M1: Open USDCAD 0.2@1.3174 stop 0 slp 5 magic 42379
2 10:00:07.837 Zorro EURUSD,M1: open #2996337 buy 0.20 USDCAD at 1.31735 ok


Re: Slow order placement via MT4 bridge [Re: pcz] #462510
10/05/16 14:36
10/05/16 14:36
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Not that I know. When several trades are opened at the same time, Zorro opens the first one and then waits for confirmation. Depending on broker and market, this can in extreme cases take up to 2 minutes. Only after the confirmation is received, Zorro opens the next trade. So the trades are not opened in a single batch, but one after the other. This is necessary since the MT4 client is unresponsive between calling and returning from the OpenOrder function. Sending all trades at the same time would not work.

Re: Slow order placement via MT4 bridge [Re: jcl] #462512
10/05/16 15:45
10/05/16 15:45
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
OK, I get it that the execution has to be sequential. But it seems that the delay between the confirmation and the next trade is quite big. Isn't that something that could be caused by Zorro or the MT4 bridge? Or do I understand the logs it in a wrong way? For example these two lines:

Quote:
2 10:00:03.140 Zorro EURUSD,M1: close #2996197 buy 0.20 NZDUSD at 0.72548 at price 0.72565
0 10:00:05.064 Zorro EURUSD,M1: Open NZDUSD 0.2@0.7256 stop 0 slp 5 magic 42379

Isn't the first one the confirmation that the first trade was closed and the second one indicating that Zorro is trying to place another order? Why is there almost 2 second delay?

Re: Slow order placement via MT4 bridge [Re: pcz] #462516
10/05/16 16:59
10/05/16 16:59
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The first message is printed after the close order was sent by Zorro and before the confirmation was sent back. The second message is printed after the confirmation was sent. The time inbetween is beyond Zorro's control except for the 50 ms bridge cycle time, which you can set up in the Zorro EA.

Re: Slow order placement via MT4 bridge [Re: jcl] #462518
10/05/16 18:37
10/05/16 18:37
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
ok, thank you for the clarification!


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1