Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro S, IB API and Z strategies #460876
07/19/16 05:09
07/19/16 05:09
Joined: Jun 2016
Posts: 9
A
alpha_Johnny Offline OP
Newbie
alpha_Johnny  Offline OP
Newbie
A

Joined: Jun 2016
Posts: 9
The IB Api requires a bit of setup before it becomes operational.

I had to modify a few settings in the API before I was able to do transactions with included TradeTest script. I am attaching screenshots to help anyone else who may find this helpful. I also changed the Lot Amounts to 25,000 in AssetsFix trying to imitate what was in AssetsIB. This was required as IB was treating orders below this as odd lots and was cancelling those orders.

However I found that strategy Z12 was not doing any transaction for over two weeks of continuous running. I thought this maybe because the strategy is not in the market all the time. But with recent huge changes in FX markets due to Brexit, I feared something else was wrong.

To be compliant with license, I bought an S license and ran it on another machine with an FXCM demo account which started producing transactions within 12 hours.

Trying to debug I compared *.ini files and AssetsFix.csv.

I did not find anything different in *.ini files except for AssetList parameter which I had modified on the IB machine.

NFA = 0
FXOnly = 0
MMax = 100
Phantom = 1
Hedge = 5
Weekend = 2
Verbose = 2
BrokerPatch = 0
Preload = 0
AssetList = "AssetsIB";
Cancel = 0

In Assets fix, most things were routine except
a) I had removed a lot of Assets from AssetsFix, this was required as IB API was throwing an error providing Historical data for more than 30 seconds. I had overridden this value to 120 seconds in IB's API configuration (screenshot attached) but despite that IB gave a throttling error. For a large well reputed broker, I found IB very stingy in providing market data. So my list was down to just the 6 FX majors.

b) I found that LotAmount was a much higher figure in IB configuration (25,000 instead of 1,000). IB demo account is 1,000,000 of paper money, so I assumed that % of portfolio might still be fairly reasonable and may allow for transactions to go through.

- Is that not the case ? Any other reason that Zorro may not be doing transactions on IB ?

I will really appreciate your time in responding to this. Thank you.

Attached Files API Settings.PNGAPI Settings2.PNG
Re: Zorro S, IB API and Z strategies [Re: alpha_Johnny] #460878
07/19/16 06:48
07/19/16 06:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks for the test. When you run Z12 with default settings on IB, it will probably trade very rarely due to the high required volume. You should get many "Skipped" messages. Set the Margin slider to a high value, like 1000$, for letting it trade regularly. I have not tried this yet. IB is not really recommended for Z12.

Re: Zorro S, IB API and Z strategies [Re: jcl] #460885
07/19/16 17:50
07/19/16 17:50
Joined: Jun 2016
Posts: 9
A
alpha_Johnny Offline OP
Newbie
alpha_Johnny  Offline OP
Newbie
A

Joined: Jun 2016
Posts: 9
jcl,

Fistly, thank you for developing something as simple and elegant as Zorro. I am an ex-developer and software architect for last 20 years. Looking at your software, I am just in awe of it's technical strengths, simplicity and yet feature completion.

I Agree that IB may not ideal for Z12 execution. I used it only as a test case. I am biased against java despite being certified on it, which makes IB's environment something I don't enjoy.

However over the years, I found IB to be an honest broker with good execution. My goal is to run Z8 on it and grow a long term portfolio. Here are a couple of screenshots of both strategies.

I believe IB might have changed their API in current release and therefore it's doing a couple of odd things

#1 - [JTS-EServerSocket-79] - [0:63:76:1:0:0:0:ERR] Invalid incoming request type - 0

#2 - Error 053 - Not available at this time [[Solved]] This is an IB issue. This happens if you are logged in with a production account on another machine and a Demo account on the Zorro machine. IB will not provide market data to both the machines. I will call IB support to see if this can be fixed.

#3 - I get this unique error trying to Train Z8. Is that unique to IB settings? I tried training on another machine hooked onto FXCM demo account and that worked.

#4 - Despite me setting a higher number in Z8 Capital slider, it snaps back to 1000 as it starts running.

Attached Files Margin and JTS-EServerSocket-119 ERR.PNGZ8 train issue.PNG
Re: Zorro S, IB API and Z strategies [Re: alpha_Johnny] #460886
07/19/16 18:03
07/19/16 18:03
Joined: Jun 2016
Posts: 9
A
alpha_Johnny Offline OP
Newbie
alpha_Johnny  Offline OP
Newbie
A

Joined: Jun 2016
Posts: 9
Resolved #4
My fault for not reading the manual completely. Set it, run it once and then run it again. Zorro picks up settings from the previous run.

Re: Zorro S, IB API and Z strategies [Re: alpha_Johnny] #460897
07/20/16 07:22
07/20/16 07:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Z8 contains no training method, therefore the error. The Z systems are generally not for training by the user, but Z8 has nothing to train at all.

The "invalid request" is not due to API change. The used API library sends intentionally invalid requests.


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