Auto trading CL futures with Ninja and IB - NinjaTrader | futures io social day trading
futures io futures trading


Auto trading CL futures with Ninja and IB
Updated: Views / Replies:10,400 / 22
Created: by goforbroke01 Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Auto trading CL futures with Ninja and IB

  #11 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

NinjaTrader/IB with CL and other energy futures

Just read the chat and took note of webart's problems today, so here is a short attempt to explain the issue:


NinjaTrader 6.5 / IB and Energy Futures

I started a thread on this issue in April 2009 on the NinjaTrader forum, which has 137 posts now and can be found here:

Open position not displayed for CL and COIL - NinjaTrader Support Forum

The problem is quite simple. It is just the definition for "contract month" used by the API.

Interactive Brokers API -> contract month is the month of the last trading date (expiry month)
NinjaTrader -> contract month is the nominal contract month

Now for most of the futures contracts, you will find that the last trading date falls within the nominal contract month, for example the last trading date for ES 06-10 is the third Friday of June, so both NinjaTrader and Interactive Brokers agree that it is June.

However, for the most liquid energy futures traded at NYMEX (including CL, NG, RB, HO) and for IPE traded Brent Crude (BC) and WTI Crude (WTI), the expiry month is just prior to the nominal contract month. These futures cannot be traded through NinjaTrader 6.5 and Interactive Brokers. I think that this is ridiculuous, and that NT should have provided a solution since a long time instead of explaining again and again that it is all the fault of Interactive Brokers.


NinjaTrader 7.0 / IB and Energy Futures

For NinjaTrader 7 developpers made a small workaround, which requires an alternate symbol mapping, so for Interactive Brokers the correct symbol mapping would be

WTI Crude (Nymex) -> CL||||1
RBOB Gasoline (NYmex) -> RB||||1
Heating Oil (Nymex) -> HO||||1
Henry Hub Natural Gas (Nymex) -> NG||||1
Brent Crude (NYBOT/IPE) -> COIL||||1

However, NT 7.0.0.16 still had problems correctly backfilling these contracts, when Merge Policy was set to "MergeBackAdjusted". My record was 58 data loading requests for my default workspace just to backfill one day of data....


Other cases

The IPE Gasoil contract does not suffer from this problem, as the July contract expires in July, so the symbol mapping would just be GOIL.

The problem might also apply to Nybot Sugar Futures (SB), so in case you want to trade sugar futures through NinjaTrader and Interactive Brokers, you would also need to check which of the two symbol mappings, SB or SB||||1 produces the correct result. I cannot do it now during the weekend, but when the market is open, it is easy to check.

In any case, be careful and first do some simulation trading before you put real money at risk. All problems also occur with the IB simulation account.

Reply With Quote
The following 5 users say Thank You to Fat Tails for this post:
 
  #12 (permalink)
Elite Member
Australia
 
Futures Experience: Intermediate
Platform: NT
 
Posts: 106 since Apr 2010
Thanks: 48 given, 84 received

Thanks for the info Fat Tails. I can't believe that Ninja Trader would allow their customers to use their platform for months and months when it has a known issue of not reporting an open position and I believe that stops are not entered either.

Not only has the issue not been fixed in the production version of NT, but no warning or popup has been issued to advise their clients of this potentially serious issue. This is an issue that could send you bust !

I've asked for compensation for my loss from the issue, but havn't heard back from them for a week.

Reply With Quote
 
  #13 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


Hi webart,

this is the main problem of NinjaTrader. They are sort of jack of all trades trying to make their product work with any data feed and every broker around. But their developpers are not up to this task. In the end there are hundreds of little problems and bugs that they cannot manage.

Also, depending on your time zone, NinjaTrader cannot correctly display daily data of Interactive Brokers for a different definition of time stamps. So I currently do not have daily data for TF, BC or DX.

There are also some really weird bugs. Two days ago my indicator code did not compile. The compiler errors pointed to the NinjaTrader generated code. Finally I found that the editor also checked the outcommented code in the properties region for syntax errors. I had outcommented with "/*" and "*/" as opposed to "//". Developpers confirmed the bug and that I am not allowed to outcomment with "/*" and "*/" in the properties region. This is standard syntax for C#, you are not allowed to use it, and you will not find any information on this.

So expect the unexpected and never use NT for automated trading.


webart View Post
Thanks for the info Fat Tails. I can't believe that Ninja Trader would allow their customers to use their platform for months and months when it has a known issue of not reporting an open position and I believe that stops are not entered either.


Reply With Quote
 
  #14 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


Fat Tails View Post
So expect the unexpected and never use NT for automated trading.

Any suggested alternatives?

Reply With Quote
 
  #15 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

I am not into automated trading systems, this is far beyond my capacities.

For discretionary trading NinjaTrader remains an option, as long as you know all the little tricks. As far as I understood MultiCharts might be more reliable and I will probably use it as an alternative front end for my trading account, when it comes with a DOM.


MXASJ View Post
Any suggested alternatives?


Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #16 (permalink)
Elite Member
Queensland, Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader, ProRealtime, Others
Broker/Data: IB
 
Posts: 94 since May 2010
Thanks: 102 given, 47 received


Fat Tails View Post
when it comes with a DOM.


Thats a good question, I downloaded MC trial, and then upon hearing what Big Mike had to say then downloaded the Beta, but I cannot find any DOM on it.

Is there any plan that you now of with MC having a DOM (eventually)?

Reply With Quote
 
  #17 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


studio88 View Post
Thats a good question, I downloaded MC trial, and then upon hearing what Big Mike had to say then downloaded the Beta, but I cannot find any DOM on it.

Is there any plan that you now of with MC having a DOM (eventually)?

It's supposed to be here for the version 7 (the latest version available is 6 Beta 3), so not before some months (years ?).

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #18 (permalink)
Elite Member
Queensland, Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader, ProRealtime, Others
Broker/Data: IB
 
Posts: 94 since May 2010
Thanks: 102 given, 47 received


sam028 View Post
It's supposed to be here for the version 7 (the latest version available is 6 Beta 3), so not before some months (years ?).


Fingers crossed for the months over years there Sam. Thanks for the approximation.

Reply With Quote
 
  #19 (permalink)
Elite Member
San Francisco Bay Area
 
Futures Experience: Intermediate
Platform: NT,TOS,IB
Favorite Futures: ES,CL,TF
 
Posts: 278 since Jun 2010
Thanks: 154 given, 267 received

I for sure can not figure out why NT can not fix this. It can not be something so big. All it perhaps requires an additional software layer to do the correct translation.

I hope they do realize that people will get fed-up and some one will write their own API for IB orders and publish it.

Once you can place orders directly with IB by linking in your own code, the need for Ninja's paid license goes away to a large extent. Of course you will not get the trade performance metrics etc but you can still trade!

Reply With Quote
 
  #20 (permalink)
Elite Member
oakland
 
Futures Experience: Intermediate
Platform: ninjatrader, thinkorswim
Broker/Data: IB
Favorite Futures: GC, CL, ES, ZF, ZN, DX, 6E
 
Posts: 15 since May 2010
Thanks: 8 given, 0 received


I wrote an automated system for CL, the strategy is mainly based on range bar with ninjatrader. I just found out IB doesn't provide "real" tick and historic tick data, guys any suggestion?

Reply With Quote

Reply



futures io > > > > Auto trading CL futures with Ninja and IB

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading CL (Crude Oil futures) #2 Big Mike Commodities Futures Trading 95 March 18th, 2015 08:13 PM
IB Trading Currency Futures Massive l Currency Futures 38 July 15th, 2011 12:30 PM
Auto futures trading on ThinkorSwim optionzen ThinkOrSwim Programming 6 June 3rd, 2011 04:36 PM
Futures -- ES vs. CL , HFT/algo trading josh The Elite Circle 1 January 27th, 2011 01:16 AM
Trading CL (Crude Oil Futures) tzachi Traders Hideout 145 September 4th, 2009 11:57 PM


All times are GMT -4. The time now is 01:52 AM.

Copyright © 2017 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
Page generated 2017-12-13 in 0.15 seconds with 19 queries on phoenix via your IP 54.92.201.232