Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (SBGuy), 652 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Phantom/Pool Order Sync #467929
09/08/17 08:10
09/08/17 08:10
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Hi,
I have already raised this question and the answer received was not very clear to me and issue occurs again. Hopefully this example will help me to clear out the point
Attached a log file where my TS open an order with Hedge =5
Phantom trade is opened, pool trade fail.
Now I have a phantom Trade open and no Pool trade.
bars are passed and no synchronization happened.

Which is the best way to handle this situation? Thank you.

Attached Files
mpCL105mreal.zip (77 downloads)
Last edited by MatPed; 09/08/17 09:24.
Re: Phantom/Pool Order Sync [Re: MatPed] #467932
09/08/17 12:39
09/08/17 12:39
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi MatPed,

I have had the same situation, and it eventually does sync. I believe the issue is the sync code is embedded within the trade opening code, so if bars go by with no new trade for that asset, the sync code is not executed.

Hopefully jcl can confirm this, and also explain why the sync code can't be pulled out to be more global and executed on each bar (or more frequently?). Or perhaps this could be an enhancement request?

Regards.

Re: Phantom/Pool Order Sync [Re: DdlV] #467933
09/08/17 14:11
09/08/17 14:11
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
yes I agree. Unfortunately, up to now the phantom trade is living its own life with no the corresponding pool one.
I hope we will find a solution...

Re: Phantom/Pool Order Sync [Re: MatPed] #467936
09/08/17 15:16
09/08/17 15:16
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I can confirm that it syncs when opening a new trade.

The reason of that is a situation where you want to manually close trades. If if would sync immediately, the trades would be just reopened. For preventing this, the reopening is delayed until the next trade. If you've set Margin to 0, they are never reopened.

Re: Phantom/Pool Order Sync [Re: jcl] #467948
09/09/17 16:48
09/09/17 16:48
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Thank you Jcl,
but how to deal with this?
Is there a way to force a re-sync, from the script? I can than issue a command from a Panel and re-sync only when such errors occur...
I am open to other suggestion, but I'd like to dig into that. Such errors never happen when you train or test a script, because the trades are always opened.

Ciao

Re: Phantom/Pool Order Sync [Re: MatPed] #467951
09/10/17 02:18
09/10/17 02:18
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl.

I don't really follow the logic of the reason. A delay of the resync until a new trade is added is just that - a delay. It doesn't really accomplish/respect a user's supposed manual wish any longer, does it?

MatPed makes a good point regarding having Trade function like Test does.

More generally, isn't there a deeper issue here? Zorro is an automated trading system. Isn't it inherent therein that Zorro should at all times be doing just that and keeping things in sync as quickly as it can?

Put another way, if the user wants to do something manual, then isn't s/he by definition in conflict with Zorro's purpose, & shouldn't s/he at that point be stopping Zorro and sorting out whatever the issues are?

If there are cases to be made for both directions, it would seem to me this should be an .ini option like VHImmediateSync = True if Zorro is to be in charge & keep things in sync at all times; or False if Zorro is to only sync on a new trade.

Regards.

Re: Phantom/Pool Order Sync [Re: DdlV] #467953
09/10/17 13:23
09/10/17 13:23
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Yes DdlV a flag will be perfect!

Re: Phantom/Pool Order Sync [Re: MatPed] #467961
09/11/17 07:23
09/11/17 07:23
Joined: Mar 2017
Posts: 48
Bologna
K
kmerlo Offline
Newbie
kmerlo  Offline
Newbie
K

Joined: Mar 2017
Posts: 48
Bologna
Originally Posted By: MatPed
Yes DdlV a flag will be perfect!

me too I think should be a good feature

Re: Phantom/Pool Order Sync [Re: kmerlo] #467962
09/11/17 08:24
09/11/17 08:24
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline OP
User
MatPed  Offline OP
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Jcl just a confirmation.
New trades have been opened with different assets. But the missed trade have not be synced.
As DdlV has stated in order to be re-synced a new trade on the same asset has to be opened. Correct?

Thank you

Re: Phantom/Pool Order Sync [Re: MatPed] #467964
09/11/17 09:23
09/11/17 09:23
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
That's right. But a flag to enforce re-syncing could make sense.


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