NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 10-04-2006, 06:51 AM   #1
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

I keep getting the following error message on the Ninja Log when I use the DLL interface, apparently only when using mypaper IB trading account but not when I use my live IB trading account.

Code:
IB.Globals.MessageLoop msg='12': Specified argument was out of the range of valid values.
Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.

IB.Globals.MessageLoop msg='12': Specified argument was out of the range of valid values.
Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.

IB.Globals.MessageLoop msg='12': Specified argument was out of the range of valid values.
Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.
Any thoughts as to what causes this or how to remedy?

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-04-2006, 06:54 AM   #2
NinjaTrader_Vincent
NinjaTrader Customer Service
 
NinjaTrader_Vincent's Avatar
 
Join Date: Mar 2005
Location: Amsterdam, The Netherlands
Posts: 2,042
Thanks: 0
Thanked 3 times in 3 posts
Post imported post

Hi Whitmark,

Can you reset your Simulator and then try again.

Go to Tools--> Options--> Simulator tab--> Reset

Vince
NinjaTrader_Vincent is offline  
Reply With Quote
Old 10-04-2006, 07:16 AM   #3
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

Hi Vince,

Thanks for the quick response. Tried that again and no luck . . . any other suggestions?

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-04-2006, 07:31 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Hi Whitmark,

This problem is related to the depth of market information being sent from the IB demo system. It appears that TWS is not sending correct depth position information to us which generates these errors. I am curious if this happens if you just use the SuperDOM?


Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-04-2006, 07:41 AM   #5
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

It would appear to work fine on the SuperDom and does not seem to be a critical error per se on the ATI as I can tell yet. What next?

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-04-2006, 07:50 AM   #6
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

To clarify:
- as you have DOM open and no ATI running, all is fine
- as you have DOM open an ATI running, problem is there
- as you only have ATI running and no DOM, all is fine

Curious: What do you trigger trhough ATI? A lot of activity which might load the CPU and cause TWS to get out of sync?
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-04-2006, 10:34 AM   #7
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

I always have the DOM up whenI run theATIso I will need to test with the DOM closed. Also, the error seems appear when the DOM is up and regardless of whether the ATI is activated or not, but I will need to reconfirm this.

Regarding what Iam pushing through theATI, its only end of bar processingof the Command function for PLACE, CANCELALLORDERS, CLOSEPOSITION, REVERSEPOSITION and a checkof the MarketPosition functionmake sure its flat under certain conditionsbefore I place a new order, so I suspect the load is light.

Let me experiment tomorrow more to see if I can pin down the symptoms and report back.

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-04-2006, 06:52 PM   #8
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

Great, also:

- which instrument do you have on the DOM?
- is that the same instrument you trade thru ATI?
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-05-2006, 02:26 AM   #9
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

When using the IBpaper trading account, the error message only occurswhen I have the dynamic DOM up (I am not subscribed to the static DOM) regardless of whether the ATI is activated. Please see attached. I am testing the IB 'ER2 12-06' symbolon the Both the ATI andDOM concurrently.

When a manual order isplaced on the DOM the error persists before the entry order is filled, after the entry order is filled, and after the trade is closed out. Likewise, when an ATI order is placed, the error appears before, during, and after a position is taken while the dynamicDOM is up. It doesn't appear the error impacts proper fill, targets, stops, etc from what I can tell.

Hope that helps. Let me know if you need additional testing to resolve this.

Regards,

Whitmark
Attached Images
File Type: png IB 12 Error Test.png (24.2 KB, 10 views)
whitmark is offline  
Reply With Quote
Old 10-05-2006, 03:18 AM   #10
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

I'm on a loss. Live account works fine. We don't have paper trade account access though. As stated below, likely an issue on TWS's end.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-05-2006, 04:20 AM   #11
whitmark
Certified NinjaScript Consultant
 
Join Date: Nov 2005
Location: Virginia, USA
Posts: 441
Thanks: 0
Thanked 12 times in 7 posts
Send a message via Skype™ to whitmark
Post imported post

Setting up a paper trading account is as easy as making a selection in the IB Account Manager . . . very easy to do and thepaper trading account'sfill model is as good, IMO, as the Sim101 sim account in Ninja. Check it out, its a free feature.

Regards,

Whitmark
whitmark is offline  
Reply With Quote
Old 10-09-2006, 02:24 AM   #12
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

I can acknowledge, that there is a problem with inconsistent L2 data coming from TWS paper trade account. However, this is out of our control.

I suggest using your IB live account and trade against Sim101.
NinjaTrader_Dierk is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:12 AM.