Can you run multiday strategies on NT7/IB? - futures io
futures io futures trading



Can you run multiday strategies on NT7/IB?


Discussion in Brokers

Updated
      Top Posters
    1. looks_one sam028 with 5 posts (5 thanks)
    2. looks_two richtobey with 4 posts (0 thanks)
    3. looks_3 Stem1 with 2 posts (0 thanks)
    4. looks_4 dsherman with 1 posts (3 thanks)
      Best Posters
    1. looks_one dsherman with 3 thanks per post
    2. looks_two sam028 with 1 thanks per post
    3. looks_3 MXASJ with 1 thanks per post
    4. looks_4 vegasfoster with 1 thanks per post
    1. trending_up 7,115 views
    2. thumb_up 11 thanks given
    3. group 7 followers
    1. forum 16 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Can you run multiday strategies on NT7/IB?

(login for full post details)
  #1 (permalink)
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
 
Posts: 45 since Oct 2010
Thanks: 0 given, 116 received

Is it possible to run NT7 strategies on Interactive Brokers over night. The IB platform makes you disconnect each 24 hours which I'm guessing stops a running strategy. I know IB has for $150 per month a VPN connection which doesn't reset (I think). Has anybody tried this or found a workaround?

Visit my futures io Trade Journal Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #3 (permalink)
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 799 received


Just a thought but if you are running a multi-day strategy perhaps Ninja doesn't need to handle trade execution but instead signal you to trade manually? There is a lot less operational risk that way.

For example, perhaps I have a strat that uses daily OHLC. Every day I run it pre-market to load data, and it prints (or emails me) Be Long, Be Short or Be Flat. With a bit more code it could tell me entry and exit prices, and it could ask me when I fire it up what my entry prices were and my current position.

Let's say I run it every morning on IWM. These are emails I might get:

Day 1: IWM position flat. No signals generated.
Day 2: IWM position flat. Enter long limit @ 70.30.
Day 3. IWM position +100. Stop @69.20. Running P&L [whatever].
Day 4. IWM position +100. Stop @69.90. Running P&L [whatever].
Day 5. IWM position +100. Stop @ 70.30. Running P&L [whatever].
Day 6. IWM position flat. No signals generated.

At the start of each day you enter your position data manually, and you enter your GFD order as dictated by your trade logic.

Then you don't have to worry about strategy sync, etc. IF your broker can handle GFD and you are OK to have your order in the book.

Personally I use a lot of GFDs on TOS for swing trades. Strategies where Ninja (or platform x) handles execution on its own is intraday only.

I've never used a client-side app to hold overnight and can't see why I ever would.

FWIW, YMMV, etc etc.

Reply With Quote
The following user says Thank You to MXASJ for this post:
 
(login for full post details)
  #4 (permalink)
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 839 received


richtobey View Post
Is it possible to run NT7 strategies on Interactive Brokers over night. The IB platform makes you disconnect each 24 hours which I'm guessing stops a running strategy. I know IB has for $150 per month a VPN connection which doesn't reset (I think). Has anybody tried this or found a workaround?

They also have (or they use to) the IB Gateway which is free and doesn't disconnect you, but I couldn't figure how to connect ninja to it. That said, if I had a good strategy that could be automated, then I personally wouldn't using ninja but another application (multicharts?) or have someone program a black box and connect through the gateway. I can tell you that IB is a good way to go for reliability, but their data feed is highly filtered and may not be a good choice if you have a high frequency system with small stops and profit targets.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
(login for full post details)
  #5 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received


richtobey View Post
Is it possible to run NT7 strategies on Interactive Brokers over night. The IB platform makes you disconnect each 24 hours which I'm guessing stops a running strategy. I know IB has for $150 per month a VPN connection which doesn't reset (I think). Has anybody tried this or found a workaround?

You can use IB Gateway with Ninja, this is what you have to do, in this order:
- start NinjaTrader
- start TWS
- connect NinjaTrader to your IB datafeed
now, the fun begins:
- start IB Gateway, which is configured to use the same port (check IB Gateway settings, 7496 is the default port)
- then IB Gateway tells you something like "other client connected, what do I do ?" -> click OK
- this will deconnect TWs to the IB datafeed
- now you can close TWS
A bit long, but it works.

I can send screenshot, or make a movie if it's not clear.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #6 (permalink)
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
 
Posts: 45 since Oct 2010
Thanks: 0 given, 116 received

I tried the gateway but can't get it to work. When I log on and respond to the "disconnect other session" message from the gateway, NT disconnects and tells me to restart. A video would be awesome.

Rich

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #7 (permalink)
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
 
Posts: 45 since Oct 2010
Thanks: 0 given, 116 received

Sam028,

I played with this some more. I keep getting the message TWS forced your connection to close. NinjaTrader is unable to automatically reconnect. Please shut down NinjaTrader and reconnect manually to TWS: An established connection was aborted by the software in your host machine.

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received


richtobey View Post
Sam028,

I played with this some more. I keep getting the message TWS forced your connection to close. NinjaTrader is unable to automatically reconnect. Please shut down NinjaTrader and reconnect manually to TWS: An established connection was aborted by the software in your host machine.

I'm making a video, I'll post it today.

My advices were fine for NT6.5, but I had to something a bit different for NT7:
- start IB Gateway, with your live account
- create 2 account connections for IB, with different port numbers:
-> 1 for IB Gateway (port 4001)
-> 1 for TWS (port 7496)
- start NT7 "naked", no charts, T&S, nothing, just the Control Center
- connect to the first account, IB Gateway
- that will launch TWS, connect to TWS with your paper account, or the IB demo account (edemo/demouser)
- TWS is started, NT7 is connected to IB Gateway
- you can close TWS

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
The following 2 users say Thank You to sam028 for this post:
 
(login for full post details)
  #9 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received

Here is the video, please test if it works for you too.
If it works, it might be a good idea to put this in the wiki.
I can do it, but everybody can do it too.


Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
The following 3 users say Thank You to sam028 for this post:
 
(login for full post details)
  #10 (permalink)
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
 
Posts: 45 since Oct 2010
Thanks: 0 given, 116 received


Your a genius!

I think you found a bug to exploit. It took me a little while to get it to work.

You have to login to the IB gateway with the account that you want to be your permanent connection. Then you use a NT connection with the port set to the same as the IB gateway but different than the default of 7496. Then, from NT login to the connection that has the port set to the same as the gateway. Then close TWS and hit yes that you are sure you want to exit.

Hope that clarifies it for anybody else.

Rich

Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #11 (permalink)
Cairns Australia
 
Experience: Beginner
Platform: MC,NT7
Broker: Dukascopy
Trading: FX
 
Posts: 51 since Dec 2009
Thanks: 96 given, 9 received

Hi, I've been trying to get this to work, are you using the standalone Gateway or the browser version? I can't seem to get the browser version to work at all and when I try and download the standalone Gateway, the IB website directs to the TWS download page.
If the connection get lost for some reason, does it automatically log back on or does it ask for login again?
Thanks

Reply With Quote
 
(login for full post details)
  #12 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received


Stem1 View Post
Hi, I've been trying to get this to work, are you using the standalone Gateway or the browser version? I can't seem to get the browser version to work at all and when I try and download the standalone Gateway, the IB website directs to the TWS download page.
If the connection get lost for some reason, does it automatically log back on or does it ask for login again?
Thanks

I've tested it with the standalone Gateway.
You are right, it's not possible to download the IB Gateway for Windows from IB website, a mistake on their side. I can put a .zip of it here, if needed.
If the connection is lost, it will automatically reconnect itself.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #13 (permalink)
Cairns Australia
 
Experience: Beginner
Platform: MC,NT7
Broker: Dukascopy
Trading: FX
 
Posts: 51 since Dec 2009
Thanks: 96 given, 9 received

I found out the standalone Gateway gets downloaded with the standalone TWS and is accessable only thru the Start>All programs>IB menu.
I am experiencing inconsistancies with the Historical data, it loads some pairs and not others and it changes when I log off and back on again (same with some live data feeds). Also, when running the default "instrument" in the market analyzer to record historical data, I get a pacing violation before it gets thru loading. Have you found this also?

Reply With Quote
 
(login for full post details)
  #14 (permalink)
Site Moderator
 
 
sam028's Avatar
 
Posts: 3,665 since Jun 2009
Thanks: 3,786 given, 4,494 received


Stem1 View Post
I found out the standalone Gateway gets downloaded with the standalone TWS and is accessable only thru the Start>All programs>IB menu.
I am experiencing inconsistancies with the Historical data, it loads some pairs and not others and it changes when I log off and back on again (same with some live data feeds). Also, when running the default "instrument" in the market analyzer to record historical data, I get a pacing violation before it gets thru loading. Have you found this also?

I don't know, because I'm not using IB to get historical data (they are quite bad for this) or live data (bad for this too), I use IB to send orders, that's all.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #15 (permalink)
Michigan
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus/Vision & Stage5/Vision
Trading: Futures
 
Posts: 40 since Jul 2009
Thanks: 22 given, 18 received


richtobey View Post
Is it possible to run NT7 strategies on Interactive Brokers over night. The IB platform makes you disconnect each 24 hours which I'm guessing stops a running strategy. I know IB has for $150 per month a VPN connection which doesn't reset (I think). Has anybody tried this or found a workaround?

I also was extremely frustrated with IB Trader Workstation automatically shutting down every 24 hours and in the process killing any active multiday strategy I had running. I was using the workaround of changing the am to pm and pm to am every 12 hours. However, after finding this thread, I thought I would work on it some more and I have come up with two solutions that work well for me. Both solutions use the IB Gateway that is automatically downloaded when you download the Trader Workstation.

These two solutions should not have the problem many run in to (and workarounds were attempted in this thread), these two solutions do not use and will not start up Trader Workstation at all.

First start up the IB Gateway and log in (log in with your live account or the test account IB gives you). Log in with the TWS/API selected as the account type. Go in to the Configure/Settings/API menu and select the checkboxes you want. I have all selected except "Enable DDE Clients", "Create API Message log file and "include market data in API message".

Solution #1. IB Gateway and Ninja on same PC:
The key to this one is to prevent Ninja from automatically starting up Trader workstation. When you configure the Account connection and select that the provider is InteractiveBrokers, make sure that you change the host name, changing it from 127.0.0.1 to the actual IP address of your PC. To find your PC IP address, open a dos window (or cmd prompt) and type ipconfig. If you are on a home network you will typically see an address like 192.168.0.4 or something like that. Type that IP address in the Host field and change the port number to the normal IB Gateway port number of 4001. IMO, Ninjatrader should give us a checkbox to select that we do not want TWS started automatically, however changing the host name selection works for me.

Solution #. IB gateway on one PC and Ninja on second PC.
The Ninja gateway appears to use very little resources compared to the full TWS. I run it on an older PC that is running the gateway only. Once the gateway is running on that PC, I go to the PC with Ninja. Create a IB account connection and simply put in the IP address of the PC that is running IB Gateway in the Host field, since the host name is not 127.0.0.1, TWS is not automatically loaded when you start up the connection.

After connecting the first time, hardly any data was loaded or displayed. I loaded a chart and a couple T&S windows with no success. I then disconnected and reconnected and then everything fired up and has worked great.

Reply With Quote
The following 3 users say Thank You to dsherman for this post:
 
(login for full post details)
  #16 (permalink)
Chicago, IL
 
Experience: Intermediate
Platform: Ninjatrader, TOS
Broker: Amp Futures/CQG/IB
Trading: ES, ZB, ZN, Forex
 
john2000's Avatar
 
Posts: 162 since Jan 2010
Thanks: 244 given, 59 received


sam028 View Post
You can use IB Gateway with Ninja, this is what you have to do, in this order:
- start NinjaTrader
- start TWS
- connect NinjaTrader to your IB datafeed
now, the fun begins:
- start IB Gateway, which is configured to use the same port (check IB Gateway settings, 7496 is the default port)
- then IB Gateway tells you something like "other client connected, what do I do ?" -> click OK
- this will deconnect TWs to the IB datafeed
- now you can close TWS
A bit long, but it works.

I can send screenshot, or make a movie if it's not clear.

Sam,

Is it still possible to do this? I tried but when I exit out of TWS, I loose connection. I have TWS version 921.5 which is the one you're suppose to use with Ninjatrader. Also, I could not find anywhere in TWS where I could start IB Gateway. Is it now called "Market Data Connection"?

Thanks,
John
-----------------------------------------------------------------------------------------------------------
PS ----- NEVER MIND, I FOUND THE ANSWER ON POST #15. .. . THANKS!!!!!

Reply With Quote
 
(login for full post details)
  #17 (permalink)
Netherlands
 
Experience: Intermediate
Platform: TWS & SierraChart
Broker: InteractiveBrokers & Sierra
Trading: DAX & Bund
 
Posts: 275 since Jun 2013
Thanks: 640 given, 353 received


dsherman View Post
I also was extremely frustrated with IB Trader Workstation automatically shutting down every 24 hours and in the process killing any active multiday strategy I had running. I was using the workaround of changing the am to pm and pm to am every 12 hours. However, after finding this thread, I thought I would work on it some more and I have come up with two solutions that work well for me. Both solutions use the IB Gateway that is automatically downloaded when you download the Trader Workstation.

These two solutions should not have the problem many run in to (and workarounds were attempted in this thread), these two solutions do not use and will not start up Trader Workstation at all.

First start up the IB Gateway and log in (log in with your live account or the test account IB gives you). Log in with the TWS/API selected as the account type. Go in to the Configure/Settings/API menu and select the checkboxes you want. I have all selected except "Enable DDE Clients", "Create API Message log file and "include market data in API message".

Solution #1. IB Gateway and Ninja on same PC:
The key to this one is to prevent Ninja from automatically starting up Trader workstation. When you configure the Account connection and select that the provider is InteractiveBrokers, make sure that you change the host name, changing it from 127.0.0.1 to the actual IP address of your PC. To find your PC IP address, open a dos window (or cmd prompt) and type ipconfig. If you are on a home network you will typically see an address like 192.168.0.4 or something like that. Type that IP address in the Host field and change the port number to the normal IB Gateway port number of 4001. IMO, Ninjatrader should give us a checkbox to select that we do not want TWS started automatically, however changing the host name selection works for me.

Solution #. IB gateway on one PC and Ninja on second PC.
The Ninja gateway appears to use very little resources compared to the full TWS. I run it on an older PC that is running the gateway only. Once the gateway is running on that PC, I go to the PC with Ninja. Create a IB account connection and simply put in the IP address of the PC that is running IB Gateway in the Host field, since the host name is not 127.0.0.1, TWS is not automatically loaded when you start up the connection.

After connecting the first time, hardly any data was loaded or displayed. I loaded a chart and a couple T&S windows with no success. I then disconnected and reconnected and then everything fired up and has worked great.

Just an addition to this method, that still works. In the latest version of IB Gateway, you have to add the PC IP address to the section "Trusted IP Addresses" under Configure->API->Settings

Trade well!

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to rdaytrader for this post:


futures io Trading Community Trading Reviews and Vendors Brokers > Can you run multiday strategies on NT7/IB?


Last Updated on September 23, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts