I came Zorro the other day and it has piqued my interest - hence I have setup Zorro with my Oanda demo account using the old REST API plugin (it's an old US domiciled account, so FX only, no CFDs/metals, etc.) and am running Z7 to see how it works, kick the tyres, etc.

Couple of questions/comments so far:

  • entry/exit prices in the Log/demotrades.csv file are truncated to only four decimals; is possible to get the full execution price (as shown in Log/Z7demo.log)?
  • the last line of Log/demotrades.csv isn't terminated (at least while Zorro is running) - is the file supposed to be flushed after every trade?
  • Z7 went long and short 1,292 GBP/USD at 9:05am this morning at the same time, buying at 1.23844, selling at 1.23816. As the long position was opened first, the short closed it out. The timestamps and entry prices for both the long and short trade in the Z7 log file match what Oanda show - however immediately after the Long/Short lines in the log file are two Close lines with some other prices and a timestamp one minute before the opening trades (at 9:04am). The Z.ini file is configured with FXOnly=1, Hedge=5 and NFA=0 (the Zorro Broker/Oanda manual page saya NFA should be zero for Oanda as Oanda handles the NFA logic internally). The real P/L from Oanda is -.2922 GBP - assuming that Zorro simulated the long and short with phantom trades, I would expect the P/L to be distributed between both positions but the trades file shows a loss of -0.39 on the long trade and -0.61 on the short trade which is a lot more than the -0.2922 that was actually lost. What is going here?
  • Is it possible to interrogate Zorro's view of its own positions and trades while it's running? The Data/Z7_d.trd file seems to have the information but it appears to be in a proprietary binary format


Any help/advice regarding the above would be much appreciated.

Cheers,
-K

Quote:
$ grep -nC2 at Log/Z7demo.log
2-Z7
3-Login Oanda V1 demo..
4:!Account 946649 at UTC 23.11. 02:54
5-Demo version
6-Z7.50: FX PH M 100 H 5 W 2 V 2
--
506-[595: Wed 23.11.16 08:05] 1.0643/1.06441.0616/1.0622
507-[596: Wed 23.11.16 09:04] 1.0622/1.06271.0607/1.0609
508:[EUR/USD:PD:S5769] Short 3771@1.06078 Risk 77$ t at 09:05:01
509:[GBP/USD:PA:L5804] Long 1292@1.23844 Risk 20$ tl at 09:05:01
510:[GBP/USD:PD:S5804] Short 1292@1.23816 Risk 27$ t at 09:05:01
511:[GBP/USD:PA:L5804] Closed 1292@1.23836: -0.39 at 09:04:06
512:[GBP/USD:PD:S5804] Closed 1292@1.23836: -0.61 at 09:04:06
513-
514-[Wed 23.11.16 09:05] 8840 -1 +0 / 1.0609/1.06091.0607/1.0607
515:[GBP/USD:PD:S7686] Short 1292@1.23794 Risk 26$ t at 09:02:01
516-
517-[Wed 23.11.16 10:02] 8838 -1 -1 \ 1.0606/1.06171.0601/1.0610


Quote:
PD,Short,EUR/USD,528105769,3771,2016-11-23 09:05,2016-11-23 16:02,1.0608,1.0539,25.87,0.00,Sold
PD,Short,GBP/USD,528107686,1292,2016-11-23 09:02,2016-11-23 16:02,1.2379,1.2424,-5.90,0.00,Sold