Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485723
04/17/22 22:11
04/17/22 22:11
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
As for that date issue (error code 013), I was 'hoping' to reproduce this, since it happened exactly 1 week ago during the market opening, but no 'luck' wink

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485727
04/18/22 10:59
04/18/22 10:59
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Maybe the problem lies inside MT4 and/or the MT4 plugin?

When I watch a graph to where the Zorro EA is attached to, a trade which was opened during the previous MT4 session has no arrow sign (short entry in this case). Only today's short exit/long entry has one.

[Linked Image]

The good thing however is, is that Zorro is able to close a position from a formal session. With my sample script (see page 1) this wasn't possible.





Last edited by Grant; 04/18/22 14:59.
Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485729
04/18/22 11:48
04/18/22 11:48
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Its a chart of EURUSD - so only EURUSD trades will be marked on it.

Recent usdjpy trade (SHORT) will appear on the usdjpy chart.

Last edited by Zheka; 04/18/22 11:51.
Re: Unable to close MT4 positions from a previous Zorro session. [Re: Zheka] #485730
04/18/22 12:58
04/18/22 12:58
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Correct, because it's a multi asset strategy and it's advised to attach the Zorro EA only once to a chart.

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485731
04/18/22 13:42
04/18/22 13:42
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Does MT4 journal show a short EURUSD trade (which has no arrow sign)?
How does it appear in Zorro log?

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485732
04/18/22 14:02
04/18/22 14:02
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Yes, the MT4 'account history' tab shows the trade details from this EURUSD short trade.
Quote
Ticket Open Time Type Size Item Price S / L T / P Close Time Price Commission Taxes Swap Profit
99067148 2022.04.15 20:54:12 sell 0.01 eurusd 1.08063 0.00000 0.00000 2022.04.18 07:55:14 1.07985 0.00 0.00 0.00 0.78


Because I started a new Zorro session this week, only the closing of the trade is in my log, which is the same price as in MT4's 'account history'.
Quote
[EUR/USD::S67148] Cover 1@1.07985: +0.72 at 06:53:00


My *_d.trd file however contains (well, 'contained') the entry details from this trade.
Here's Zorro's output during the start of this week's session:

Quote
[EUR/USD::S67148] - resumed (1 lots)

Last edited by Grant; 04/18/22 14:05.
Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485735
04/18/22 16:28
04/18/22 16:28
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
If the trade is booked both by Zorro (resumed from *.trd and is in trades.csv) and MT4, and only the arrow on the chart is missing - then, well, consider this to be an "occasional glitch" in MT4.

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Zheka] #485741
04/18/22 18:07
04/18/22 18:07
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
I've reported this because it could add context (or maybe even explain) my main issue.
In case it's only a visual flaw, than I don't mind at all.

I still find it odd that a couple of early exit attempts in this week's new session failed without any error messages.

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Grant] #485744
04/18/22 23:50
04/18/22 23:50
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
MT4's Journal would contain some description of the error/reason why the order has not been executed.

Re: Unable to close MT4 positions from a previous Zorro session. [Re: Zheka] #485745
04/19/22 00:08
04/19/22 00:08
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline OP
Member
Grant  Offline OP
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
That would make sense to me as well, but that wasn't the case.

I just ran my test script again (please see 'TestCloseAllTrades' on page #1) with the same Zorro output (other than some new positions) as a result.
There was no recent activity in my MT4 log at all.

So basically, the exitLong() & exitShort() commands are being completely ignored and I wonder why.


Last edited by Grant; 04/19/22 07:00.
Page 2 of 3 1 2 3

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