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.
Last edited by MatPed; 09/08/1709:24.
Re: Phantom/Pool Order Sync
[Re: MatPed]
#467932 09/08/1712:3909/08/1712:39
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/1714:1109/08/1714:11
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/1716:4809/09/1716:48
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/1702:1809/10/1702:18
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/1713:2309/10/1713:23
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/1709:2309/11/1709:23