Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Imhotep), 567 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Corrupted Z12.trd? [Re: DdlV] #483712
07/14/21 18:21
07/14/21 18:21
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
No, 1 lot is not a fallback. It's really the stored trade size.

The open value is simply the difference of current price and open price multiplied with the number of contracts.

Re: Corrupted Z12.trd? [Re: DdlV] #483713
07/15/21 01:22
07/15/21 01:22
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks @jcl. Well, I now know what happened. I made a mistake (no surprise there frown ), Zorro's message of closing 1 lot is in error and misdirected the investigation, and I would appreciate your help in how best to proceed.

Mistake: After determining I could successfully create a trd with the AlgoVars removed, in my exuberance I didn't double-check close enough and converted an old trd. Consequently, when Z12 finally was able to start, it was presented with an old trade list.

Message: Z12 startup resumed all the virtual trades and checked the real trades against the broker. Real trades found were resumed. Real trades not found were correctly listed as closed - but rather than printing the lots of those Real trades, Zorro printed "1", which I believe is a bug.

Help: Zorro is now running with a list of virtual trades that no longer match reality, since it's lost the intelligence of what happened to those trades in the interim. What to do? I suspect the response will be to close all trades in the broker interface and let Z12 start over; but are there any other choices to consider?

Thanks.

Re: Corrupted Z12.trd? [Re: DdlV] #483715
07/15/21 11:44
07/15/21 11:44
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hmmm... Or is Open Value not used in determining exit and I should just let the positions ride and all will become right over time?

Or are the Stops based on the (incorrect) opening prices and something needs to be done?

Re: Corrupted Z12.trd? [Re: DdlV] #483716
07/15/21 13:58
07/15/21 13:58
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
When it's really messed up, I would close all open trades and restart. A wrong .trd file can have all sorts of wrong stops or other parameters.

Normally .trd files should not go corrupted. The only scenario I can imagine is a hard server crash just at the moment when the .trd file is written.


Re: Corrupted Z12.trd? [Re: DdlV] #483717
07/15/21 18:51
07/15/21 18:51
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks @jcl. Please clarify - I see 2 scenarios:

1) In the Broker platform, close all trades. Zorro retains its virtual trades, and will re-enter real NET trades to match.

2) Click Stop, Close all Trades, and Stop Trading. In the Broker platform, verify all trades are gone - if any remain, close them. Delete the trd. When Zorro restarts, it will create a new, empty trd and restart completely fresh with no trades - virtual or real - resumed.

Which scenario did you mean?

Re: Corrupted Z12.trd? [Re: DdlV] #483738
07/19/21 14:51
07/19/21 14:51
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
2.

Re: Corrupted Z12.trd? [Re: DdlV] #485277
02/15/22 18:31
02/15/22 18:31
Joined: Oct 2021
Posts: 10
Z
ztests Offline
Newbie
ztests  Offline
Newbie
Z

Joined: Oct 2021
Posts: 10
I have been trading live on Interactive Brokers with Zorro.

Unfortunately, my laptop crashed and burned - nearly to ashes...

Obviously, the open lives trades stated on the IB platform - is it possible somehow to re-reconnect those trades with Zorro again so that Zorro continues to manage them?

I see in the documentation a function

brokerTrades (int Filter): int,
Call the GET_TRADES command. Cancel all currently open trades, and replace them with the open positions on the broker account (if any).
https://manual.zorro-project.com/brokercommand.htm

Could this function be helpful in re-creating the .trd file?

Maybe there is an example script somewhere for this task?

Re: Corrupted Z12.trd? [Re: DdlV] #485278
02/16/22 10:44
02/16/22 10:44
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
brokerTrades will not recreate the original trades from the .trd, but create new ones. Theoretically a .trd can be constructed from that, but that's a forensic task and probably not worth the effort. Close the open positions and start over.

Re: Corrupted Z12.trd? [Re: jcl] #485279
02/16/22 11:04
02/16/22 11:04
Joined: Oct 2021
Posts: 10
Z
ztests Offline
Newbie
ztests  Offline
Newbie
Z

Joined: Oct 2021
Posts: 10
Originally Posted by jcl
brokerTrades will not recreate the original trades from the .trd, but create new ones. Theoretically a .trd can be constructed from that, but that's a forensic task and probably not worth the effort. Close the open positions and start over.


JCL - thank you!

Page 3 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