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

Re: [amibroker] LAN Computers + IB RT-Data



PureBytes Links

Trading Reference Links

Hi Herman
127.0.0.1 is the internal address for the computer you are on. So the default for the IB plugin is to connect to this 127.0.0.1 address because you usually have both AB and TWS on the same machine.  It means 'connect to myself' . 

You want to configure the IB plugin to connect to another machine.
To do this, you need to find the IP addreses of both computers and configure the AB/IB plugin and TWS appropriately.
Sounds complicated, but it's quite simple really.

Find it's IP address of the computer running TWS ...(let's call it TWS-Computer for this example)
by doing the following.
1) open a cmd prompt (start /AllPrograms/Accessories/cmd prompt
2) In that cmd prompt type 'ipconfig /all'.   This will display the machines real IP address (see display below)
3) Write this address down.  (for this example, let's say it's IP is 192.168.0.100  )

Find the address of the computer running running AB, ..  (lets call it AB-Computer)
1) Find it's IP address the same way as above. .,. and write it down.  .. Lets say it's 192.168.0.101
2) In Amibroker,  go to Menu FILE/Database Settings
3) On the Database Settings dialog, click Configure to display the IB Plug-in settings
4) Here's you will see a line that says 'TWS Host or IP'.  It will be defaulting to 127.0.0.1
5) Change this to the IP address of Computer1 (the one running TWS)
6) Leave the other stuff alone.
7) This tells AB to go use the TWS on the other computer

TWS on the first computer may display the 'Accept incoming connection'  dialog.  Just answer 'OK'
You can prevent this dialog by configuring TWS to trust the IP address of the AB-Computer.
You do this in TWS using the Configure/API/Trusted IP address menu.  Just add a new entry with the address of your AB-computer. (192.168.0.101 from our example above)

Here's an example of the 'ipconfig /all' command.  You're looking for the IP Address field

C:\>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : Rocket
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : NVIDIA nForce Networking Controller
        Physical Address. . . . . . . . . : 00-15-58-04-A0-8D
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.1.9
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
        DNS Servers . . . . . . . . . . . : 192.168.1.1

C:\>

One last thing .. if your using a home router, such as a Linksys, DLink, Belkin etc, then there's a good chance that these IP addresses may change from time to time.  This is because the router dynamically assigns you a new address when needed.
They don't change often if the machines are used frequently, but it is something to consider if this stops working one day.
I can help you nail down the IP address so it doesn't change if you want, but it should be necessary right away.

Wes


----- Original Message ----
From: Herman <psytek@xxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, October 26, 2006 8:21:30 PM
Subject: RE: [amibroker] LAN Computers + IB RT-Data









  


    
            



OK, I 
got my computers running again. AB. I have the TWS 
running on one and the TWS on the other... Problem is that my AB IB plugin 
status stays Red.

 

Seems 
like this is working for you, I may need a bit more basic instructions. .. could 
you tell me what else i have to do?

 

If i 
understand you correctly you collect data on one computer from a 
TWS running on the other - is this correct?

 

What 
if both my computer use the IP 127.0.0.1 ? should i change one? How do i do 
that?

 

many 
thanks for you help...

 

herman


  -----Original Message-----
From: amibroker@xxxxxxxxx ps.com 
  [mailto:amibroker@ yahoogroups. com]On Behalf Of Wes 
  Smith
Sent: October 26, 2006 2:02 PM
To: 
  amibroker@xxxxxxxxx ps.com
Subject: Re: [amibroker] LAN Computers + 
  IB RT-Data


You can connect to a TWS on another 
  computer.
File\Database\ DatabaseSettings ... Configure .. and put the IP 
  address of the computer running TWS.  Usually is 127.0.0.1 which is the 
  local computer.

Not sure if this is what you want to do though, but it 
  might be a work-around.

Herman <psytek@xxxxxx ca> 
  wrote:
  
    
    

    Hello,

    I am using IB real time data and have 
    three computers on my LAN. Typically I trade one or two 
    computers and do developement on my laptop. I use my Real Account, 
    Simulated account, and the eDemo account. This way of becoming RT funtional 
    on each computer is not optimum and I would much 
    prefer to have access to the same 
    IB data on each of my computers. I assume many users use a LAN and have 
    the same problem...

    Technically data-sharing over the 
    LAN should be very easy to implement since IB data dribbles in at about 
    two quotes per second, plenty slow for my main computer to publish data 
    on my LAN and to be used by my other computers with virtually 
    no degradation.

    Has Anyone done this?

    Thanks and best regards,

    herman

     

     

    


 

    
  

    
    




<!--

#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;}
-->






Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006