I am running Z2 on an Oanda demo account without hedging.
Everything works fine, but for one USD/CAD trade the information in Zorro and the Broker do not match.
[USD/CAD:HP:S00186] ID 186 Lots 840
[USD/CAD:HP:S00192] ID 192 Lots 843
ID 186 USD/CAD 465 Short
ID 192 USD/CAD 843 Short
As you can see the lot sizes do not match.
The Oanda support was not helpful (for me):
"Therefore when you have Sell order 840 units , you placed a Buy order of 375 units , it will offset the original Sell order ( Ticket 186)"
But according to the logs a trade for 375 units has not been triggered.
Also no change on trade 186 is listed in the Zorro log.
I have identified one log entry (the line with Error 075) that could be related to the problem:
[Thu 20-12-31 20:03] 99962 -26.46 -10.24 6/5 (1.22108)
(USD/CAD:CY:L) Long firstname.lastname@example.org Entry limit
!position closed by reversal
Error 075 (USD/CAD:CY:L) - can't open email@example.com Stop 0.079591 at 20:03:27
[USD/CAD:HP:S00155] Closed firstname.lastname@example.org: +2.12 at 20:03:35
Market closed on 01-01 00:00:00 (local 00:00)
Market open on 01-03 23:00:01 (local 23:00)
Full log is attached to this post.
The manual says:
"Oanda accounts require special settings. They are NFA compliant, but Oanda works around most NFA issues on their side of the API, so the NFA flag needs not be set. Hedge must be either disabled (Hedge = 0) or in virtual hedging mode (Hedge = 4 or 5), otherwise closing trades will cause error messages.
"Compliance of the account. Affects default state of NFA flag and Hedge mode: 0 for no restrictions, 2 for Hedge = 0 (no hedging), 14 or 15 for NFA = on (full NFA compliance)."
Could it be that I have not configured the z.ini correctly?
Which combination of NFA and Hedge is correct for Oanda in the z.ini?
Is it NFA=2 and Hedge=0 or NFA=0 and Hedge=0?
Right now I do not see why the lot sizes do not match in Zorro and on the broker account.
I assume it has something to do with non-hedging on the Oanda account, but I am just too blind to see it.
Can someone give me a hint?
Thanks a lot for your help!