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)
Between NT and IB they have failed to fix this since at least April of this year and neither party can give me any idea of when it might be. So if I want to trade in this way I have to use an alternative to NT (with which I have, as have many, invested a massive amount of time) or change my broker.
The purpose of bringing this all up here is to see if anyone else has suffered this, and if so, how they got around it. It seems to me that the combination of NT auto strategy, IB and energy futures are not compatible. Are there any workarounds out there?
-thanks
Can you help answer these questions from other members on NexusFi?
Thanks for the reply. I have previously reviewed that thread and tried downgrading to TWS890 that was reported by a user as working. It didn't work and IB subsequently told me: "Unfortunately, the related change is within our server side. It is not feasible to fix this issue by downgrading to the 890 version of TWS. We have to provide a new API component in order to fix the issue."
Is this what you were referring to when you said there may be a solution?
No. I think the solution might be something like:
- the strat is running with the simulation account, then:
-> a small program wrote in Java/C++ with the TWS API libraries read every x seconds the NT Access database, then send the order with the right contract to the TWS. I have a piece of Java code somewhere, which were doing something similar
or, maybe simple (and simple==reliable)
-> the strategy wrote in a text file what to do, then another simple Java/C++ (always with the TWS API lib) read this file every second, then send the real order to TWS.
But all these will only works with simple order management/simple money management, because NT will be lost, its position will be false, the truth will be in TWS only.
I'm testing this bug right now with TWS demo account and a basic strat, scary...
Got it. Run NT and TWS separately with NT putting order information in a text file and a standalone program polling it and posting orders through the TWS API. I am an amateur programmer and will give it a try, maybe in C#. I will report back if I get it to work. I would welcome if you could share any of your success and/or challenges along the way. Thanks for your help.
Writing a basic text file within a strategy is quite easy in C#, there is an example in the official NT forum, here.
For reading this file, you can also have a look to trading-shim, which is made to talk with a TWS, and can read "orders" files. But I only played with it on Linux boxes, I'm not sure it can be run safely under Windows.
Anyway, the "reader" part might not be very hard to write in Java, there is some examples on how to use the TWS API, after reading the text file, it's something like:
Hi,
have a look at this : Interactive Brokers C# Api | Dinosaur Technology and Trading
the c# could be the basis of your polling app, and there is only one programming language for your whole trading system. Its simpler.
Nt exports all executions in the "outgoing" directory, I remember that two files were involved. You will have to check yourself.
But there is more :
you can import all this interface source code to NT, compile, and run it directly from NT (from within a strat or an indic). You would place your code in the Onexecution().
Wow, great link, powerful things can be done with this, without too much headaches. And not only for solving CL contract dates issue.
A strategy which is hedging stock trades with options looks possible now, and using IB combos, etc.
I can't export the strategy, so I just past the code :
I works on ES 1209
It has a problem : the system is SAR, so always in the market. If you don't match manually the strategy starting position with the account position, it does not work, because the first order of the strategy closes the current position (which does not exist if not entered manually) and then opens a new position in the opposite direction. Non SAR does not have this problem by starting the strategy when it is flat.
Dec 17 2009 I also have this same problem. I was doing fine then bang no stops entered. Ninja nor IB have of this date fixed the the problem. Has anyone ever recieved a notice from either IB or ninja that this might happen? I am looking for a credit since this is a known problem. Any one ever got a credit on this type of thing?