![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
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.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> 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
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
***************
>> 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. |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
|
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. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jul 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> 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.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
|
|
|
|
|
|
|
#10 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Sorry, could you please refresh my memory and send me a PM on that issue again? Thanks
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Thanks for PMing me the mail again.
As of now there are no known issues regarding the MarketData functions of the ATI.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jun 2007
Posts: 218
Thanks: 0
Thanked 1 time in 1 post
|
|
|
|
|
|
|
#13 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
I was not able to reproduce it and it works as expected in TradeStation and eSignal environment.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |