PDA

View Full Version : ATI Specified argument was out of the range


whitmark
06-14-2006, 03:15 AM
I am testing the latest NinjaTrader version (5.2.1000.1) on an IB Paper Trading account (TWS Build 858.6) with a NeoTicker strategy that submits orders via the ATI DLL. Can you tell me what the following error message implies and how to remedy?

11:10:48:000 ERROR: 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.

11:10:50:718 ERROR: 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.

11:11:25:140 ERROR: 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.
Thanks

Regards,

Whitmark

whitmark
06-14-2006, 04:40 AM
While I have not resolved the problem listedbelow, I am able to connect Ninja to the IB paper trading account and can place trades off the Ninja DOM. However, I am not able to return a connection status of 0 (connected) from the connected(1) DLL function when calling it from a NeoTicker strategy to place automated trades. I haveAutomated Tradingselected.

Has anything changed in the last couple of Ninja versions that require modifications on my end to enable myDLL calls to work with thecurrent version?

Regards,

Whitmark

whitmark
06-14-2006, 04:57 AM
Attached is the connection error I receive when I bring up my NeoTicker strategy even though Ninja is up and running and connected to an IB paper trading account.

NinjaTrader_Ray
06-14-2006, 06:34 AM
We did not make any changes. Can you try a reboot and see, the IB socket communication could be out of sync.

whitmark
06-21-2006, 06:09 AM
Ninja Support,

Any thoughts as to what causes the error message I attached in my previous posts. Its the connection error I receivewhen I load the NeoTicker strategy that calls the DLLeven though Ninja is up and running regardlessif I am connected to IB, an external data stream, ornotat all.

Thanks,

Whitmark

NinjaTrader_Ray
06-21-2006, 06:24 AM
Could you disable any firewalls and try?

whitmark
06-21-2006, 07:01 AM
No luck on taking down the firewall. Where should the ntdirect.dll be located? I see it in the c:\program files\ninjatrader 5\bin\ subdirectory and I have it in the c:\windows\system32\ subdirectory too.

Any other thoughts why I can't connect or how to diagnose? Thanks.

Regards,

Whitmark

NinjaTrader_Ray
06-21-2006, 07:19 AM
Should be in both. Try copying over the one from the NT installation folder into the system folder.

whitmark
06-21-2006, 08:07 AM
I pulled togetheratest dll to test the connection betweenNeoTicker and Ninjathat plots the connection status and market postion as follows:

LIBRARY W_Test_Ninja_Connection;

uses
ShareMem, SysUtils, Math, Classes, Graphics, NeoTicker_TLB, StrUtils, Variants;

{$R *.RES}
//------------------------------------------------------------------------------
// Ninja DLL Calls
//------------------------------------------------------------------------------
FUNCTION Connected ( ShowMessage : integer ) : integer; stdcall; external 'NtDirect.dll';
FUNCTION MarketPosition ( Instrument: string; Account: string ) : integer; stdcall; external 'NtDirect.dll';

//------------------------------------------------------------------------------
// NeoTicker IDL Call
//------------------------------------------------------------------------------
FUNCTION idlcallex(NTIndicatorObjects : INTIndicatorObjects) : double; stdcall;
BEGIN
NTIndicatorObjects.ItSelf.Plot[1] := Connected ( 1 ) ;
NTIndicatorObjects.ItSelf.Plot[2] := MarketPosition ('ER2 09-06', 'Sim101');
END;

EXPORTS
idlcallex;
BEGIN
END.I am getting thesame error (attached) when is Ninja up, connected, andautomated trading selected.

I've already tried your suggestion regarding the NtDirect.dlls andthey have the same date time stamp. I noticed that earlier versions of my code that worked didNOT have an argument for connected( )but now I see in help that a showmessage argumentis needed. Was that a change?

Any other thoughts or ways to diagnose would be appreciated.

Regards,

Whitmark

NinjaTrader_Dierk
06-21-2006, 08:57 AM
Tool->Options->ATI tab->ATI server port should be 36973.

NinjaTrader_Ray
06-21-2006, 11:19 AM
I believe that change was quite some time ago.

whitmark
06-21-2006, 10:21 PM
Thanks guys, that did the trick. Perhaps additional information on that error message would be helpful.

Regards,

Whitmark