Interactive Brokers A.P.I.

RedE

Junior member
Has anybody with an Interactive Brokers account any experience of using their API in an automated trading system.

For those not so technically minded API stands for Application Programming Interface - it is a little box of tricks that allows programmers to integrate IB's trading platform into their own applications.

For example one could use Excel, with some programming, as your trading platform, placing two big buttons on a spreadsheet BUY and SELL!!

In my case, I need to "knock up" a small and private website which will allow me to trade thru IB from behind a firewall at a clients office. Don't worry I will not be trading actively but I do need to be able to enter orders and check executions etc. and have realtime access to data and my strategies.

In time I will consider creating a fully fledged automatic trading system: give it the rules, set the position sizing algorithm, insert the risk management rules and .... off we go.

Anyone's experience of the technicalities or other useful advice on automated trading would be greatly appreciated.

Also, the Lime Brokerage in the US offer similar functionality.
 

JonnyT

Senior member
It is true my leige, I have automated trading through IBs API.

Its very simple if I can do it.

Step 1 is to download the API from IB
Step 2 is to install the API
Step 3 is to look at the sample code installed in c:\Jts
Step 4 is to decide whether to use Excel, C++ or Java (I chose Java for the challenge)
Step 5 is to obtain a compiler oe MS Excel (I use Suns free Forte Java development tool)
Step 6 is to hack the sample code into what you want
Step 7 is to use IBs API forum for any required advice on the API
Step 8 is to be aware that updates to TWS or the API can do many strange things with your application
Step 9 is play golf whilst your system autotrades profitably for you
Step 10 is to retire to the sun.

I'm currently on step -1, Bankrupt quicker than I imagined possible.

JonnyT
 

Henry

Active member
I used VB, but as JonnyT says you can use pretty much anything (Delphi, C#, or any other such new fangled language will work too).
Getting the machine to trade for you is simple enough, coming up with the rules to generate consistent profits from a totally mechanical system is a whole different ball game though . . .
Best of luck.

H.
 

RedE

Junior member
Henry & JohnnyT

Thanks.

Do either of you know if it is possible to trade thru a "demo" account while I am debugging my HG3M (Holy Grail Money Making Machine).
 

JonnyT

Senior member
IB do have a demo account ans server for such purposes.

There are not many symbols you can use and I cannot remember the details other than username is demouser.

To be honest I have tested live, nothing like seat of the pants stuff!

Try IBs API forum

JonnyT
 

Henry

Active member
Demo account username "edemo" password "demouser". Beware that although it claims the quotes in that account are 15 minute delayed, they are in fact almost entirely manufactured by the activity of other users also logged in as the demo user. Therefore sometimes you'll get no movement in prices at all, and when you do, the fills you get will be from another planet! Better to use a live account and simulate your trades for testing purposes.

H.
 

osho67

Well-known member
Dear Henry

I am in the process of opening a/c with ib. How do I simulate for testing purposes. Thanks for helpful advise
 

JonnyT

Senior member
Hi Peter,

It was a joke!

But I am currently in an evaluation/testing phase before committing further funds.

I have an automated system that over the past 4 FTSE contracts averages between 4 and 5 points a trade but I need to fund my account correctly before implementing.

However the system doesn't work on other markets which concerns me a little.

The focus of my current research is a system to daytrade the ES and position trade the ES. This is rather more difficult than people imagine, I just cannot seem to achieve an edge that I think is plausible.

What I will say though is forget CCI...

JonnyT
 

Henry

Active member
Osho, have PM'ed you.

H.
 

fowkesp

Active member
mmillar - for your interest, I am using TradeStation 2000i to backtest with eSignal for real-time data and Genesis for EOD data; IB for trading and have used TradeBolt to automate the trades from TradeStation. Beware the bug though, whereby TS mistakenly issues multiple orders and you end up in 4 contracts instead of one. Nasty :( Have to keep an eye on it all the time.

PM me if you want the technical details.

Paul
 

mmillar

Guest
JonnyT - so when you say CCI doesn't work, you have actually programmed a CCI indicator in Excel? that sounds like hard work to me :) How many other indicators have you programmed in VBA? I don't suppose you would like to make your VBA indicators available to us mere mortals?

fowkesp - thanks for your reply but you are confusing me even more now :confused: Why use eSignal and TS 2000i? Doesn't TS 2000i support real time data? And I've never heard of Genesis. Did you know you can pull the data out of eSignal into flat files using QCollector - I assume (but am probably wrong) that TS2000i can import flat files. FYI I'm using eSignal but now they've done the 'our server crashed and we lost all our historical data' thing I'm looking for something else to do backtesting. It's either going to be TS2000i, TS 7.2 (when it's out in June), or nice Mr JonnyT is going to be very charitable with his VBA stuff.
 

osho67

Well-known member
Dear Henry
Thanks for your pm and I wpuld suggest that anybody interested in simulated trading should contact you. There is no charge for any product. I hope this will not be any advertising.
 

fowkesp

Active member
mmillar,

Sorry to confuse you. My real-time datafeed is eSignal which I connect to TradeStation's GlobalServer. As you probably know, GlobalServer can be connected to a variety of datafeeds, including satellite links, internet feeds etc. It comes with built-in support for eSignal. It could also be connected to IB using a software add-on. The data is then displayed/back-tested using TradeStation 2000i. The signals from TradeStation are then automated into IB using TradeBolt <url>http://www.investlabs.com/tradebolt.htm</url>

Of course, eSignal also supplies its own software for displaying charts etc, and its own language (EFS) for trading, so I am spolit for choice really.

I also collect EOD for position trading futures, which I get cheaply from Genesis <url>http://www.gfds.com/</url>

You may be confusing TS2000i with the later versions (TS6 and TS7), which have their own integrated data-feed and trading platform supplied exclusively by the vendors of TradeStation.
 
 
Top
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock    No Thanks