Jump to content
Medved Trader Forums

Just Verifying on Read-Only Accounts


Doug Hayman

Recommended Posts

Just want a confirmation on this to be sure please:

I had 2 MT IB accounts set up (Live and Demo), and somehow I must have deleted the IB Demo Account in MT.  So, I re-created the Demo account in MT.   I seem to remember in the past that the Live and Demo IB versions had distinct API Port #'s, but logging into IB Live/Demo back-ends respectively, they seem to use the same API port # now, by default.

Just want to make sure - there is a "Read-only" flag associated with accounts.  By setting this flag for my IB Demo acct, will that ensure that any trades made against it, when my IB Demo account is the selected acct for trading in MT, will:

1) Go to my IB Demo account?

2) Allow me to simulate trades against this account?

Thanks in advance.

P.S. As an aside, I tried changing the IB Demo account API Port # to a different # from the default 7496, but MT didn't connect to it.  Maybe you guys are always assuming the default API Port #.

Link to comment
Share on other sites

as far as using different ports for different accounts, that is up to you. You can change the port used for connecting on a per login basis in TWS settings. in MT, you just specify the same port in the MT settings. Please refer to https://medvedtrader.com/ib - note that the port specified in TWS must match the port specified in MT and you do have to setup TWS API settings for each account, not just once.

If you login to TWS with a paper trading account, then when you connect to that account in MT and send orders, those will be paper trading too - it just sends the orders to TWS. 

 

Link to comment
Share on other sites

OK, I just wanted to be sure, because I regularly use both Live/Demo.  Bottom line is if I'm logged into TWS demo on the back-end, and MT connects, there is no way I can submit a trade to the Live back-end TWS in that scenario, correct?   The reason I ask is that the MT account config looks exactly the same to me, except for the possible enabling of the "read-only" flag.

Again, I've been using this for awhile, but I inadvertently deleted my MT IB demo account somehow.   I tried changing port # for the IB demo acct (just to be safe), but couldn't connect with MT last night.  I'll try again, after hours today.

Link to comment
Share on other sites

OK, I think I'm going nuts, and can't figure this out.  Per above, I changed my TWS IB Simulated account to Port # 7495 (from default 7496).  I changed Simulated Config session on TWS to match that port #.   When I fire up TWS Simulated and try to connect MT to it, I'm not getting any data feed data.  If I look in Sources in MT, IB Simulated is listed as "Streaming", and IB Live is listed as "Faulted".  When I switch back TWS Live/MT Live all works fine.  When I go back to TWS Simulated/MT with port # restored to default port 7496, it appears to be working fine. 

I'm sending you my log file; if you get the chance, I'd appreciate if you can tell me what I'm doing wrong.  TIA.

Link to comment
Share on other sites

with the log, I can only half the picture. And, if you have both live and paper trading TWS  running, data will only work in the live one. Also, remember that in MT, there are two places for the setup - quotes and trading.  Best thing to do is

1) run 2 instances of TWS - one with live login and one with paper trading login. Make sure they are setup to use different ports

2) set MT quotes to connect to the live  instance of TWS (SETTINGS / Data Sources / Configure Accounts)

3) Set up both live and paper trading accounts in SETTINGS / TRADING / ACCOUNTS

Link to comment
Share on other sites

Dang!  That's it.  I didn't know I had to set the port # on Settings / Data Sources / Config Accounts.  I thought my selecting the Source to Interactive Brokers, it took care of itself.

Thank you very much for setting me straight!   I had been running with existing accounts for so long, before accidentally deleting my Simulated acct, that I forgot about that setting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...