Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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?
Can you help answer these questions from other members on NexusFi?
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.
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.
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.
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.
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.
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
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.
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.