NinjaTrader Support Forum  

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 08-03-2007, 11:44 PM   #1
ccie8340
Junior Member
 
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default Unable to query COM methods via Ninjatrader at

Hello ,
I currently use a COM interface from my charting software and connect to Ninjatrader. Automatic buy/sell works fine with Forex using sim101.

However whenever I try any of the COM methods, I don't get any response back.


=========in my Amibroker charting package
//Create Static COM Object here for NinjaTrader - This will be used for calling various Methods
NTAT = CreateStaticObject("NinjaTrader.Client.Client");
RequestTimedRefresh(2);

AvgEntryPrice = NTAT.AvgEntryPrice(INSTRUMENT, "Sim101");
openpos = NTAT.MarketPosition(INSTRUMENT, "Sim101");

However I am able to place orders using
NTAT.Command("PLACE", "", INSTRUMENT,"Buy", 1, "MARKET", 0, 0, "", "", "", "", "") ;


Any ideas?. Is this because its a sim101 account.

Thanks.

Cheers,Padhu
ccie8340 is offline  
Reply With Quote
Old 08-04-2007, 12:08 AM   #2
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
Default

We experienced that the COM interface is not working as expected for some of our customers. If the issues would fail into that ressort then you still could try the DLL interface.

However: AvgEntryPrice and MarketPosition only work on orders placed through ATI. They will not work on order e.g. placed manually in NT.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 08-04-2007, 12:15 AM   #3
ccie8340
Junior Member
 
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default COM interface is not working as expected for some of our customers

Hello Dierk,

Thanks for the quick reply. Creating a COM interface was reasonably easy for me in Amibroker.

I just create a static COM object pointing to Ninjatrader by doing this:
NTAT = CreateStaticObject("NinjaTrader.Client.Client");

So I don't know what is involved is calling the methods inside the DLL.

BTW, these were orders placed via AT not manual.

Any plans on fixng this issue?. Thanks.

Placing an order without checking market position via COM is bit dangerous.
Appreciate any help you can offer.
Cheers,Padhu
ccie8340 is offline  
Reply With Quote
Old 08-04-2007, 12:17 AM   #4
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
Default

>> Placing an order without checking market position via COM is bit dangerous.
Unfortunately you can not check the market position if it was not created by the ATI. Sorry, but we have no ETA on overcoming this ATI limitation.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 08-04-2007, 10:13 AM   #5
ccie8340
Junior Member
 
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default Reply to post 'Unable to query COM methods via Ninjatrader at'

***************
>> Placing an order without checking market position via COM is bit dangerous.
Unfortunately you can not check the market position if it was not created by the ATI. Sorry, but we have no ETA on overcoming this ATI limitation.
***************

Dierk,

I want to clarify...I was asking for eta for the bugfix ONLY for orders sent via AT not manual.

So i am curious to know if there are traders out there usung COM for autotrading with Gain forex.

Thanks.
ccie8340 is offline  
Reply With Quote
Old 08-04-2007, 04:40 PM   #6
Gumphrie
Senior Member
 
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
Default

I'm using COM to trade currency futures if thats of any interest. I don't do it through Amibroker though, bit directly from my own App in C++.

I have found problems with the new MarketData() functions so don't use those. I haven't tried MarketPosition(), but that sounds like it has similar problems. Like you I found it works on Sim, but on live often doesn't survive broker reconnects. Either the information gets screwed or Ninja freezes if I call them.

Basically I don't trust any of the functions that try to get information from Ninja, I only use the new orderid functions to confirm fills, everything else is sending information to Ninja.
Gumphrie is offline  
Reply With Quote
Old 08-04-2007, 04:56 PM   #7
ccie8340
Junior Member
 
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default Using COM with NT for automated trading

Hi Gumphrie,

thanks for the reply.

With whatever information you can afford to share,

could you pls email me(ccie8340@yahoo.com) the COM functions that are working for you?. also are you implementing any checks on marketpositions before placing a buy order?.

i.e buylong only if there is no long position already or currently short.

thanks,Padhu
ccie8340 is offline  
Reply With Quote
Old 08-05-2007, 04:13 AM   #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
Default

>> I want to clarify...I was asking for eta for the bugfix ONLY for orders sent via AT not manual.
Since you already have been able to submit order via COM you likely are not facing the general COM setup issue which some users experience. This very COM installation appears not to fixable, thus we do not have an ETA for it.

>> Gumphrie: I have found problems with the new MarketData() functions so don't use those
What problem did you experience?

>> I haven't tried MarketPosition(), but that sounds like it has similar problems
Note: it only works as you have placed an order on this account. It will not work after a fresh reconnect.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 08-05-2007, 06:54 AM   #9
Gumphrie
Senior Member
 
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post
>> Gumphrie: I have found problems with the new MarketData() functions so don't use those
What problem did you experience?
In your email from the 4th June - "Possible Issue with DLL market data subscriptions"
Gumphrie is offline  
Reply With Quote
Old 08-05-2007, 10:16 PM   #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
Default

Sorry, could you please refresh my memory and send me a PM on that issue again? Thanks
NinjaTrader_Dierk is offline  
Reply With Quote
Old 08-06-2007, 04:16 AM   #11
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
Default

Thanks for PMing me the mail again.

As of now there are no known issues regarding the MarketData functions of the ATI.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 08-06-2007, 05:36 AM   #12
Gumphrie
Senior Member
 
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post
As of now there are no known issues regarding the MarketData functions of the ATI.
So you reproduced the problem and fixed it?
Gumphrie is offline  
Reply With Quote
Old 08-06-2007, 05:38 AM   #13
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
Default

I was not able to reproduce it and it works as expected in TradeStation and eSignal environment.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library of methods SuzyG Strategy Development 3 04-16-2011 08:56 PM
Where are the methods and classes references? gsmaster Strategy Development 2 07-12-2007 03:14 PM
Using StopLimit Order Methods tquinn Strategy Development 1 01-14-2007 03:18 AM
Unable to create instance of 'NinjaTrader.Indicator.BuiltInIndicator' SuzyG Indicator Development 3 01-08-2007 05:14 PM
Unable to access ninjatrader windows ninjauser Miscellaneous Support 2 10-16-2006 02:54 AM


All times are GMT -6. The time now is 04:25 AM.