NexusFi: Find Your Edge


Home Menu

 





Ninja can't catch limit orders through TWS


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one Fat Tails with 6 posts (6 thanks)
    2. looks_two trigon with 4 posts (1 thanks)
    3. looks_3 gulabv with 3 posts (0 thanks)
    4. looks_4 redratsal with 3 posts (2 thanks)
      Best Posters
    1. looks_one Fat Tails with 1 thanks per post
    2. looks_two sam028 with 1 thanks per post
    3. looks_3 redratsal with 0.7 thanks per post
    4. looks_4 trigon with 0.3 thanks per post
    1. trending_up 8,035 views
    2. thumb_up 11 thanks given
    3. group 5 followers
    1. forum 18 posts
    2. attach_file 1 attachments




 
Search this Thread

Ninja can't catch limit orders through TWS

  #11 (permalink)
 
gulabv's Avatar
 gulabv 
Dallas, TX
 
Experience: Beginner
Platform: Ninjatrader
Broker: Zen-Fire
Trading: ZN, 6E
Posts: 286 since May 2010
Thanks Given: 161
Thanks Received: 169

Sam - are you referring to the physical delivery of oil barrels to your door step on expiry of the contract

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Better Renko Gaps
The Elite Circle
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
 
  #12 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


gulabv View Post
Fat Tails - can you elaborate why it is not possible to trade CL with NT 6.5 ???

The API of IB and NinjaTrader 6.5 use different definitions for the contract month. The API transmits the month of the expiry date, and NinjaTrader 6.5 interprets this as the nominal contract month. This works for most of the futures contracts, but not for all contracts.

ES 03-11 expires in the beginning of March, so the last trading date is in March and the nominal contract month is March as well. No problem here.

However CL 02-11 expires in the end of January, so the last trading date is in January and the nominal contract month is February. This causes a problem. You can try this, open the NinjaTrader 6.5. DOM and open a position for CL 02-11. Then close the position via the close button and look what happens. Also make sure that you have a chart open to see the results.

For NT 7.0 there is a workaround via the symbol mapping. The IB symbol should be CL||||1 instead of CL. You need these symbols for all futures contracts that expire prior to the contract month. Examples are most of the energy contracts and sugar.

gasoline RB||||1, heating oil HO||||1, WTI crude CL||||1, Brent crude COIL||||1, natural gas NG||||1 and sugar SB||||1

For these futures you need to test first, whether your orders will be executed in the selected contract month or another one.

Reply With Quote
Thanked by:
  #13 (permalink)
 
gulabv's Avatar
 gulabv 
Dallas, TX
 
Experience: Beginner
Platform: Ninjatrader
Broker: Zen-Fire
Trading: ZN, 6E
Posts: 286 since May 2010
Thanks Given: 161
Thanks Received: 169


Thanks FT is this issue specific to IB or all data vendors (ZenFire, Rithmic) ?

Reply With Quote
  #14 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


gulabv View Post
Thanks FT is this issue specific to IB or all data vendors (ZenFire, Rithmic) ?

I'm not FT, and it's the great FT himself found this issue (if my memory still good), so I'm maybe wrong, but it was a specific Ninja/TWS issue, the other vendors where not involved.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #15 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


sam028 View Post
I'm not FT, and it's the great FT himself found this issue (if my memory still good), so I'm maybe wrong, but it was a specific Ninja/TWS issue, the other vendors where not involved.

Yes, it is a specific issue between Interactive Brokers and NinjaTrader. It lasted for years, as none of the warlords wanted to take responsibility.

The issue was finally solved by NinjaTrader developpers with the introduction of NT 7.0.

Reply With Quote
  #16 (permalink)
trigon
Czech Republic
 
Posts: 24 since Dec 2010
Thanks Given: 9
Thanks Received: 6


Fat Tails View Post
(1) Do you use NT 6.5. or NT 7.0? It is not possible to trade CL via NT 6.5.

(2) What are the exact symbol settings that you have selected for CL in the instrument manager?

(3) I think you are not talking about limit orders, but about stop limit orders. If you use a stop limit order with a small offset, this can easily happen, as CL is a very volatile instrument. The solution would be to use stop market orders to enter or exit positions instead of stop limit orders. You can select this under the DOM properties (last line). The market order will be executed as market order with protection. This means, that it is effectively a stop limit order. which uses the no-bust range as the offset.

OK thank you for this. It works...or it looks like it works. I replaced stop limits with stop market... I use NT 7 so there should not be a problem. I have a CL 02-11 right now in my Instrument Mger.

Reply With Quote
  #17 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


trigon View Post
OK thank you for this. It works...or it looks like it works. I replaced stop limits with stop market... I use NT 7 so there should not be a problem. I have a CL 02-11 right now in my Instrument Mger.

Just check the symbol mapping for CL in the instrument manager. Should be CL||||1 for Interactive Brokers. Otherwise you will run into trouble.

Reply With Quote
Thanked by:
  #18 (permalink)
trigon
Czech Republic
 
Posts: 24 since Dec 2010
Thanks Given: 9
Thanks Received: 6

Ok I will try that and let you know. :-)

Reply With Quote
  #19 (permalink)
trigon
Czech Republic
 
Posts: 24 since Dec 2010
Thanks Given: 9
Thanks Received: 6

Well, I checked it and its OK. Already correctly mapped in newest version of NT. There is mapping for IB - it says CL||||1. Thank you for everything. :-)

If anyone want to know more about this here is a thread from Fat Tails explaining everything (hope you don't mind I posted it here):


Reply With Quote
Thanked by:




Last Updated on January 13, 2011


© 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