NexusFi: Find Your Edge


Home Menu

 





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 MXASJ with 1 posts (1 thanks)
      Best Posters
    1. looks_one dsherman with 3 thanks per post
    2. looks_two sam028 with 1 thanks per post
    3. looks_3 rdaytrader with 1 thanks per post
    4. looks_4 MXASJ with 1 thanks per post
    1. trending_up 8,427 views
    2. thumb_up 11 thanks given
    3. group 7 followers
    1. forum 16 posts
    2. attach_file 0 attachments




 
Search this Thread

Can you run multiday strategies on NT7/IB?

  #1 (permalink)
 richtobey 
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
Posts: 45 since Oct 2010
Thanks Given: 0
Thanks Received: 116

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 NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
 
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


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
Thanked by:
  #4 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844


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
Thanked by:
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


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
  #6 (permalink)
 richtobey 
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
Posts: 45 since Oct 2010
Thanks Given: 0
Thanks Received: 116

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 NexusFi Trade Journal Started this thread Reply With Quote
  #7 (permalink)
 richtobey 
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
Posts: 45 since Oct 2010
Thanks Given: 0
Thanks Received: 116

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 NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


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
Thanked by:
  #9 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

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
Thanked by:
  #10 (permalink)
 richtobey 
San Antonio
 
Experience: Advanced
Platform: NinjaTrader Interactive Brokers
Broker: Interactive Brokers
Trading: forex
Posts: 45 since Oct 2010
Thanks Given: 0
Thanks Received: 116


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 NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on September 23, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts