[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Re: How to switch the realtime datafeed account ?



PureBytes Links

Trading Reference Links

I did not follow this entire thread, but here's the relevant portion to get
IB running?

 

INSTRUCTIONS:

NOTE: Interactive Brokers TWS is CPU-hungry application, therefore for best
results we recommend using machine with 1GHz processor or faster.

To use Interactive Brokers data plugin with AmiBroker you need to: 

1.	download IB plugin from:
http://www.amibroker.com/bin/ib168/IB.dll
Current STABLE version of IB.DLL: 1.6.8 (October 10, 2006) 

and copy it to PLUGINS subfolder of AmiBroker directory.
2.	run web-based TWS or download standalone TWS
<http://www.interactivebrokers.com/cgi-pub/loginControl.pl> 
3.	In TWS, select Configure -> API -> Enable Active X and Socket
clients
Also enter 127.0.0.1 in TWS, Configure->API->Trusted IP addresses menu to
prevent "Allow incoming connection?" dialog.
4.	Run AmiBroker and create new database with Interactive Brokers
plugin as a data source, following these steps:

*         Run AmiBroker 

*         Choose File->New database 

*         Type a new folder name (for example: C:\Program Files\AmiBroker\IB
) and click Create as shown in the picture below:
 



*         Choose InteractiveBrokers(r) data Plug-in from Data source combo
and "Enable" from Local data storage 

*         Enter 30000 or more into "Number of bars to load" field 

*         Now choose Base time interval. Supported intervals are: EOD,
hourly, 15-minute, 5-minute, 1-minute. Professional Edition of AmiBroker
allows also to select Tick, 5-second, 15-second intervals.

Note that backfill is in bar interval of 1-minute or less (TWS limitation).

If you want to have long daily histories AND intraday charts you should
consider running TWO instances of AmiBroker. One for EOD charts and second
for intraday charting. Both instances may use IB as a data source. 

*         Click OK.

>From now on your AmiBroker reads quotes directly from the Interactive
Brokers. 

  _____  

SYMBOLOGY

Symbol format now uses the symbol mode of TWS, not the underlying mode. The
symbol mode in TWS can be seen in the 'View->Symbol Mode' menu option in
TWS.

The format is: SYMBOL-EXCHANGE-TYPE 

where

SYMBOL is the same as the symbol column as displayed in TWS while under
symbol mode

EXCHANGE (optional) is the exchange d in TWS while under symbol mode

TYPE (optional) is one the following: 

STK - stocks, FUT - futures, FOP - options on futures, OPT - options, IND -
indexes, CASH -cash (ideal FX)
Note that for stocks only the EXCHANGE and TYPE fields are optional. The
exchange will be set to BEST (SMART) and the TYPE will be set to STK.

Please take special care when typing symbols as some of them (futures) have
MULTIPLE SPACES in the symbol name. You have to type EXACTLY THE SAME number
of spaces as provided in the examples below
(see the dashes below symbol name that make it easier to see the number of
characters)

Examples:


IB SYMBOL 

Type

Description


CSCO
Stock

Cisco Corporation, Nasdaq


GE
Stock

General Electric, NYSE


VOD-LSE
Stock

VODAFONE GROUP, London Stock Exchange


ESM4-GLOBEX-FUT
Future

Emini ES Jun04 futures, Globex


QQQFJ-CBOE-OPT
Option

Jun 04, 36.0 CALL option QQQFJ


INDU-NYSE-IND
Index

Dow Jones Industrials Index


YM   JUN 04-ECBOT-FUT
  ---   -  
Future

YM Jun 04 future, ECBOT
(note 3 spaces between symbol and month and 1 space between month and year)


QMN5-NYMEX-FUT
Future

QM (Crude) June 2005 future contract, NYMEX


EUR.USD-IDEAL-CASH
EUR.USD-IDEALPRO-CASH
Cash Forex

EURUSD currency pair, IDEAL
EURUSD currency pair, IDEALPRO

Again:

ECBOT futures symbols have length of 21 characters with 3 spaces between
contract symbol and month name and one space between month and 2 digit year


Contract

3 spaces 

Month

spa
ce

Year

-

E

C

B

O

T

-

F

U

T


Z

B

 

 

 

J

U

N

 

0

4

-

E

C

B

O

T

-

F

U

T


Z

F

 

 

 

J

U

N

 

0

4

-

E

C

B

O

T

-

F

U

T


Z

N

 

 

 

J

U

N

 

0

4

-

E

C

B

O

T

-

F

U

T


Y

M

 

 

 

J

U

N

 

0

4

-

E

C

B

O

T

-

F

U

T

NOTES ON IB API LIMITATIONS:

1. Backfill is available for REAL IB accounts only (not on demo)

2. Open price is NOT provided by IB. For that reason Open field is empty in
real time quote window

3. The data from IB does not include a timestamp on the trades. The current
system time is used to timestamp each tick. 

4. IB TWS streaming data are NOT tick-by-tick, but rather 0.2-0.3 second
snapshots, read this for details:
http://www.interactivebrokers.com/cgi-bin/discus/board-auth.pl?file=/2/37364
.html

 

 

--

Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of toxutao
Sent: Wednesday, January 10, 2007 09:05
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: How to switch the realtime datafeed account ?

 

Hi, I checked the page but can not find the relevant material

 

 

----- Original Message ----- 

From: Terry <mailto:MagicTH@xxxxxxxxxxx>  

To: amibroker@xxxxxxxxxxxxxxx 

Sent: Wednesday, January 10, 2007 11:11 PM

Subject: RE: [amibroker] Re: How to switch the realtime datafeed account ?

 

Instructions about halfway down after the release notes:
http://www.amibroke <http://www.amibroker.com/ib.html> r.com/ib.html 
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
[mailto:amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com] On
Behalf
Of itmwh
Sent: Wednesday, January 10, 2007 07:24
To: amibroker@xxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx> ps.com
Subject: [amibroker] Re: How to switch the realtime datafeed account ?

I checked port of the TWS of account 2, it is 7496. But still it can 
not switch in to feed the data when TWS of account 2 has been 
closed. 

I also noticed there is a dialogue of "client ID" in the IB plugin 
setup of the database setting, but that dialogue seems unable to 
designate the Account of the datafeeder

--- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> ps.com, Wes
Smith <wes_zoltran@xxx> wrote:
>
> Check the socket port ... 
> in TWS Menus ... Configure/API/Socket Port
> 
> It should be 7496 by default, but it may have changed.
> 
> ----- Original Message ----
> From: itmwh <toxutao@xxx>
> To: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> ps.com
> Sent: Tuesday, January 9, 2007 9:41:02 AM
> Subject: [amibroker] How to switch the realtime datafeed account ?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi, I have two IB trading accounts, (say account 1 and 
account 2) 
> 
> sometimes during the session, with account 1 TWS on and acting as 
the 
> 
> realtime data source of Amibroker, I want to switch the data 
source of 
> 
> Amibroker from account 1 to account 2. I closed Amibroker, closed 
TWS 
> 
> of account 1, and opened TWS of account 2. And then I opened 
Amibroker 
> 
> again, but it seems that amibroker can not recognize the TWS of 
account 
> 
> 2, and it reminds me to £¢confirm that enable activex and socket 
> 
> clients" . But at time, I have already enabled activex and socket 
> 
> clients in TWS of account 2. What should I do to make the switch 
> 
> between two datafeed sources ?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> <!--
> 
> #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-
serif;}
> #ygrp-mlmsg table {font-size:inherit;font:100%;}
> #ygrp-mlmsg select, input, textarea {font:99% 
arial,helvetica,clean,sans-serif;}
> #ygrp-mlmsg pre, code {font:115% monospace;}
> #ygrp-mlmsg * {line-height:1.22em;}
> #ygrp-text{
> font-family:Georgia;
> }
> #ygrp-text p{
> margin:0 0 1em 0;
> }
> #ygrp-tpmsgs{
> font-family:Arial;
> clear:both;
> }
> #ygrp-vitnav{
> padding-top:10px;
> font-family:Verdana;
> font-size:77%;
> margin:0;
> }
> #ygrp-vitnav a{
> padding:0 1px;
> }
> #ygrp-actbar{
> clear:both;
> margin:25px 0;
> white-space:nowrap;
> color:#666;
> text-align:right;
> }
> #ygrp-actbar .left{
> float:left;
> white-space:nowrap;
> }
> .bld{font-weight:bold;}
> #ygrp-grft{
> font-family:Verdana;
> font-size:77%;
> padding:15px 0;
> }
> #ygrp-ft{
> font-family:verdana;
> font-size:77%;
> border-top:1px solid #666;
> padding:5px 0;
> }
> #ygrp-mlmsg #logo{
> padding-bottom:10px;
> }
> 
> #ygrp-vital{
> background-color:#e0ecee;
> margin-bottom:20px;
> padding:2px 0 8px 8px;
> }
> #ygrp-vital #vithd{
> font-size:77%;
> font-family:Verdana;
> font-weight:bold;
> color:#333;
> text-transform:uppercase;
> }
> #ygrp-vital ul{
> padding:0;
> margin:2px 0;
> }
> #ygrp-vital ul li{
> list-style-type:none;
> clear:both;
> border:1px solid #e0ecee;
> }
> #ygrp-vital ul li .ct{
> font-weight:bold;
> color:#ff7900;
> float:right;
> width:2em;
> text-align:right;
> padding-right:.5em;
> }
> #ygrp-vital ul li .cat{
> font-weight:bold;
> }
> #ygrp-vital a {
> text-decoration:none;
> }
> 
> #ygrp-vital a:hover{
> text-decoration:underline;
> }
> 
> #ygrp-sponsor #hd{
> color:#999;
> font-size:77%;
> }
> #ygrp-sponsor #ov{
> padding:6px 13px;
> background-color:#e0ecee;
> margin-bottom:20px;
> }
> #ygrp-sponsor #ov ul{
> padding:0 0 0 8px;
> margin:0;
> }
> #ygrp-sponsor #ov li{
> list-style-type:square;
> padding:6px 0;
> font-size:77%;
> }
> #ygrp-sponsor #ov li a{
> text-decoration:none;
> font-size:130%;
> }
> #ygrp-sponsor #nc {
> background-color:#eee;
> margin-bottom:20px;
> padding:0 8px;
> }
> #ygrp-sponsor .ad{
> padding:8px 0;
> }
> #ygrp-sponsor .ad #hd1{
> font-family:Arial;
> font-weight:bold;
> color:#628c2a;
> font-size:100%;
> line-height:122%;
> }
> #ygrp-sponsor .ad a{
> text-decoration:none;
> }
> #ygrp-sponsor .ad a:hover{
> text-decoration:underline;
> }
> #ygrp-sponsor .ad p{
> margin:0;
> }
> o {font-size:0;}
> .MsoNormal {
> margin:0 0 0 0;
> }
> #ygrp-text tt{
> font-size:120%;
> }
> blockquote{margin:0 0 0 4px;}
> .replbq {margin:4;}
> -->
>

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroke <http://www.amibroker.com/devlog/> r.com/devlog/

For other support material please check also:
http://www.amibroke <http://www.amibroker.com/support.html>
r.com/support.html

Yahoo! Groups Links

 




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007 2:52 PM