2 registered members (howardR, sleakz),
705
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Corrupted Z12.trd?
#483606
06/21/21 03:13
06/21/21 03:13
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
Hi. Windows (Server 2016) wanted to do Updates, so today (Sunday) I clicked Stop, No to Close Trades, Yes to Stop Trading, exited Zorro, and did the Updates, including the reboot after.
Now Z12 will not Trade. It logs in to the broker, loads prices, prints "Trade: Z12 <date>" and then up pops the "Zorro Automaton has stopped working" window. I have also tried with "- diag", but no additional information is recorded.
The same VPS also runs Z7 (from a different directory) and it has restarted fine.
So, it seems the Z12.trd file has somehow been corrupted? How can I verify this and repair the trd file? Is there a trd utility somewhere?
Thanks.
|
|
|
Re: Corrupted Z12.trd?
[Re: DdlV]
#483628
06/24/21 12:11
06/24/21 12:11
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
Thanks @jcl. Would the code below work? It creates a MUCH smaller trd...
function run()
{
if(Bar >= 1) {
SaveMode = SV_SLIDERS+SV_TRADES;
loadStatus("/home/user/QubesIncoming/a-personal/Z12.trd");
saveStatus("/home/user/QubesIncoming/a-personal/Z12-Fixed.trd");
quit();
}
}
|
|
|
Re: Corrupted Z12.trd?
[Re: DdlV]
#483685
07/08/21 17:38
07/08/21 17:38
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
Thanks @jcl. That puts the size reduction is in the same ballpark, so I'll give the tiny trd a try.
FYI, I save a copy of the trd file most every weekend. I tested starting Zorro (in a test environment, not live) with these backups, and had to go back a number of weeks to find an un-corrupted trd. Zorro ran continuously over that period, and the weekly trd files have different sizes. Since Zorro was never stopped and restarted, the trd file was apparently never read - only written to. Unfortunately, especially given the passage of time, I have no hope of correlating the corruption to anything else. But from these circumstances a reasonable suspicion could be a rare pointer/buffer problem in Zorro?
HTH.
|
|
|
Re: Corrupted Z12.trd?
[Re: DdlV]
#483688
07/09/21 01:26
07/09/21 01:26
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
@jcl: The saga continues. The tiny trd allowed Z12 to start. But:
a) Intermingled with the "resumed" messages were a number of "closed" messages. The "closed" messages were all for real trades, and all exactly 1 lot. Is this expected?
b) After the "resumed" messages came a slew of Trails, Stops, and Longs. I assume this is normal as Z12 adjusts to the new market conditions it finds? (Although without the benefit of the missing AlgoVars...)
c) Lastly, the net result of the above seems to be that the account balance being reported by Zorro is accurate, the number of open trades matches the number of open positions in the broker's web interface, but Zorro's view of the value of these open positions, including which are winning vs. losing, is incorrect. Is anything to be done?
FYI, the trd file has grown from 12k to 57k.
Thanks.
|
|
|
Re: Corrupted Z12.trd?
[Re: DdlV]
#483713
07/15/21 01:22
07/15/21 01:22
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
Thanks @jcl. Well, I now know what happened. I made a mistake (no surprise there ), 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]
#483717
07/15/21 18:51
07/15/21 18:51
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
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,982 Frankfurt
jcl
Chief Engineer
|
Chief Engineer
Joined: Jul 2000
Posts: 27,982
Frankfurt
|
|
|
|
Re: Corrupted Z12.trd?
[Re: DdlV]
#485277
02/15/22 18:31
02/15/22 18:31
|
Joined: Oct 2021
Posts: 10
ztests
Newbie
|
Newbie
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.htmCould 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: jcl]
#485279
02/16/22 11:04
02/16/22 11:04
|
Joined: Oct 2021
Posts: 10
ztests
Newbie
|
Newbie
Joined: Oct 2021
Posts: 10
|
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!
|
|
|
|