![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| 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 |
|
Member
Join Date: Jul 2007
Posts: 92
Thanks: 0
Thanked 0 times in 0 posts
|
For the following example:
function NTBuyMarket(orderId, quantity) { return NTCommand("Place", "", "Buy", quantity, "Market", 0, 0, "", "", orderId, "", ""); } Am I to assume that 0 is successfully placed, and -1 is not placed? Is that the general return code behind all of the functions which use NTCommand? I am using this link for the order status: http://www.ninjatrader-support.com/H...html?AppendixA Is there another link which explains what these functions are supposed to return to signal success or failure? Something similar to: // Indicates if the connection to NinjaTrader is established. 0 = connected, -1 not connected. function NTConnected() { return (dll.call("Connected") == 0) } would be nice to have documented for examples of each function. Regards, Thomas |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
0 means that there were no errors generated by calling the function, and in general means that the order likely was placed.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Market analyzer and chart return different values | nicko9 | Market Analyzer | 5 | 08-04-2010 05:26 AM |
| Positions[0].Quantity return negative value when short? | Folls | Strategy Development | 2 | 10-23-2007 01:13 PM |
| Code->test/debug->change code->retest ... cycle process | bbarroux | Strategy Development | 3 | 10-02-2007 12:44 PM |
| standard ATM settings | T4M | ATM Strategies (Discretionary Trading) | 1 | 04-09-2007 03:11 AM |
| Return values for NTOrderStatus() | ccooper | Automated Trading | 2 | 11-11-2006 11:47 AM |