Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Aku_Aku, ozgur), 1,095 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Interactive Brokers [Re: JanBa] #394421
02/13/12 01:35
02/13/12 01:35
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline OP
Newbie
stevegee58  Offline OP
Newbie
S

Joined: Feb 2012
Posts: 37
Sorry I was out of town at a wedding all weekend.

All of my programs for the IB TWS API were in C++. I used socket programming exclusively, not ActiveX or COM.

Re: Interactive Brokers [Re: stevegee58] #394455
02/13/12 14:01
02/13/12 14:01
Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
J
JanBa Offline
Newbie
JanBa  Offline
Newbie
J

Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
Interesting, it seems more than suitable to make an interface for Zorro. I was looking at a socket-interface for Visual Foxpro, but i think c++ works the same and probably free to use. I take a look at the C(++) interface of IB-TWS-API.
I am not a C-specialist but learn more every day.
Today i started Zorro-Z1 with 3 lots and margin 500 and let it run for a week.
Let's look on friday what the results are ?

Re: Interactive Brokers [Re: JanBa] #394470
02/13/12 16:00
02/13/12 16:00
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Originally Posted By: JanBa
Today i started Zorro-Z1 with 3 lots and margin 500 and let it run for a week.
Let's look on friday what the results are ?

Check out the risk before you try something, especially with money. Your 50,000 demo account is far too small for 3 lots and margin 500. These settings will likely wipe out your account before you can make any profit.

Ok, it's only a demo account, but I suppose you want to simulate how it feels to trade with money? If you really want to risk all your 50,000, leave the margin at 50 and set the lots to 4 or 5. Then you can win a lot, but also lose a lot. With the original settings of 1 lot, you only risk about 10,000.

Re: Interactive Brokers [Re: jcl] #394504
02/13/12 21:50
02/13/12 21:50
Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
J
JanBa Offline
Newbie
JanBa  Offline
Newbie
J

Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
Ok, i put margin at 50 and lots to 5, curious what will happen.

Re: Interactive Brokers [Re: JanBa] #394575
02/14/12 16:06
02/14/12 16:06
Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
J
JanBa Offline
Newbie
JanBa  Offline
Newbie
J

Joined: Jan 2012
Posts: 37
Zaandam, The Netherlands
Steve, i looked at the C++ interface to IB Brokers and i saw that the "requirments" are .NET and Visual Studio C++.

Do you think this is necessary to develop C++ interfacing TWS-API. ?

Or do you work more direct, straightforward ?

Re: Interactive Brokers [Re: JanBa] #394578
02/14/12 16:27
02/14/12 16:27
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline OP
Newbie
stevegee58  Offline OP
Newbie
S

Joined: Feb 2012
Posts: 37
I use Visual C++ 2010 (also called VC9).

The IB API is kind of a pain in the neck to program. However I have working example code I've written that I use for a starting point on new projects.

Re: Interactive Brokers [Re: stevegee58] #406976
09/03/12 16:12
09/03/12 16:12
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline OP
Newbie
stevegee58  Offline OP
Newbie
S

Joined: Feb 2012
Posts: 37
Haha it took a while but I started writing a broker plugin for Interactive Brokers. I'm using Visual C++ 2008 (VC9).

I created a skeleton dll based on the FXCM. I just copy/pasted the cpp file and deleted the contents of the 9 functions. I then made each function return a value that should look like everything is OK.

Here is my BrokerOpen:

DLLFUNC int BrokerOpen(char* Name,FARPROC fpError,FARPROC fpProgress)
{
strcpy_s(Name,32,"IB");
(FARPROC&)BrokerError = fpError;
(FARPROC&)BrokerProgress = fpProgress;

return 1;
}

When I put my dll in the plugin directory however, the IB entry does not appear in the Account scrollbox and it stays grayed out. In the text window it says "IB.dll opened"

Here's a screen cap:


Last edited by stevegee58; 09/03/12 16:13.
Re: Interactive Brokers [Re: stevegee58] #407002
09/04/12 08:10
09/04/12 08:10
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks - this was a bug, the scrollbox was wrongly greyed out. Please download the fix here: http://server.conitec.net/down/Zorro.zip.

It's version 0.99.2 now - unzip it into the Zorro folder.

Re: Interactive Brokers [Re: jcl] #407194
09/08/12 20:58
09/08/12 20:58
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline OP
Newbie
stevegee58  Offline OP
Newbie
S

Joined: Feb 2012
Posts: 37
I'm having a problem with BrokerTime. The time from IB is in UNIX time and that's what I'm returning in the pTimeGMT parameter of BrokerTime. However ZT says:

"Login.. at GMTInvalid DateTime"

The IB API provides this time in a long which I'm casting to the double parameter like this:

*pTimeGMT = EW.m_CurrentTime;

Re: Interactive Brokers [Re: stevegee58] #407221
09/09/12 14:09
09/09/12 14:09
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline OP
Newbie
stevegee58  Offline OP
Newbie
S

Joined: Feb 2012
Posts: 37
Never mind, I found the real format of DateTime and figured out the conversion.

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