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 12-10-2005, 06:38 AM   #1
werosen
 
Join Date: Dec 2005
Location: , ,
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Greetings:

I am a very experienced user of the eSignal scripting language and JavaScript having taught myself the in and outs by writing my own trading strategy and an automated interface to TradeMaven. Unfortuanately TradeMaven was a very poor choice on my part and I now want to change to NinjaTrader. I have reviewed the documentation and have not been able to put together all the pieces needed from the information.

My goal it to be able to do the following:

1. Send a Limit order to NT for 'x' number of contracts at a specific price and let NT manage all the trade functions (brackets, etc.).

2. Capture Information on the order that NT is managing to decide if I want to send a command to cancel an unfilled order, or the unfilled portion of a partially filled order, or to know when a trade has won or lost.

In other words, I'm trying to accomplish what your site states in the ATI sectionas: "You can optionally harness the power of NinjaTrader’s advanced order and position management capabilities…".

Pretty simple stuff, and the components seem to be available in NT from the documentation, but I can't find any organized info that says, Activate 'x' functions in NT, or read an order status filenamed 'z' located in the 'y' directory, and the format of the order information in the file is such-and-such, etc.

Can you shed a little light on additional documentation resources that provide a comprehensive explanation of the NT functions and ATI?

Thanks,

Warren


werosen is offline  
Reply With Quote
Old 12-10-2005, 09:41 AM   #2
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

Welcome Warren,

If you want to use NT's ASM technology you should first become familiar with it's use and application from a UI perspective.

1) You first have to create strategies (templates) that you will later reference through the ATI. Do this directly in the SuperDOM window for example. Please see the entire Position Strategy section under Advanced Strategy Management in the help guide.

2) You will need to use the NTCommand() function to initiate a limit order and reference a strategy template that will execute once the order is part filled/filled. This function takes a parameter "command", you will want to pass in "PLACE", pass in required order information including a user defined orderId value (a function exists to get a unique orderId), pass in your strategy template name andoptionally user defined unique strategy id value if you want to control stops/targets associated to the strategy through the ATI.

3) Once the order is working, you can query its state via NTOrderStatus(orderId), get the filled amount via NTFilled(orderId) and avgFill via NTAvgFillPrice(orderId)

4) You can then cancel the order via NTCancel(orderId) or change via the NTChange() function.

Hope this sheds some light.

Ray



NinjaTrader_Ray is offline  
Reply With Quote
Old 12-10-2005, 09:47 AM   #3
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

Warren,

There is also some sample EFS posted by a user in the eSignal forum.

http://forum.esignalcentral.com/show...threadid=16212

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 12-11-2005, 04:48 AM   #4
werosen
 
Join Date: Dec 2005
Location: , ,
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thanks for the references.

I would also like to confirm that your website's statement, "Your pre-defined strategy will execute and submit your exit orders once your entry order is partially filled.", means:

That if you get a partial fill, say 3 contracts on a 5 contract order, that the Profit/Loss brackets defined in the ASM strategy will be immediately placed for those 3, and then additional exit orders will be placed as the other 2 contracts when they are filled.

Further, If a send a cancel command on the order ID (not Flatten) for the 2 contracts that have not yet been filled, will the brackets stay in place for the 3 contracts that are still in play?


werosen is offline  
Reply With Quote
Old 12-11-2005, 07:04 AM   #5
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

You are completely correct in your understanding.

Ray
NinjaTrader_Ray 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 09:29 AM.