![]() |
|
|||||||
| 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 |
|
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
|
I'd like to simplify my process for acquiring an Open Orders List. (Hint: It would be useful for NJ to create a function to return this list.)
I was thinking that I would parse the Order Function return string and then stop after some number of orders known to be open. But this presumes that the order string is constructed according to some sort order. What is that order? Any other ideas on how best to get that list of OpenOrderIds? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Hi,
Not sure what you mean: 1) ATI function "Orders" returns a "list" of order IDs submitted via ATI. 2) ATI function "OrderStatus" returns the order state per order. Using both functions you should be able to achieve what you are looking for.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Yes. I understand. But consider this. I want to my systems to ensure that no orders are left hanging in an "Active" state inadvertently. For me to write code that manages orders in the "Active" state I need to get that list of "Active" orders. ("Active" being a state of several different OrderID states documented in the Help File.) But the current ATI Orders function returns the entire list of orders whether Active or not and includes those orders placed hours and hours in the past. The current ATI Orders function is going to be returning a very long string when it is called especially as the trading day progresses and the number of orders placed via the ATI increases. I think the ATI function list is missing a function that only returns strings of OrderIDs with specific statuses AND includes the "Active" status. But until that exists, I need to process that very long Orders string myself to ensure that I have the complete list of Active orders. It makes no sense for my system to maintain a list of OrderIDs and Statuses when Ninja Trader has them. But I don't want to have to process the COMPLETE string of OrderIDs for status every time I need a status update. I would prefer NOT to have to: 1 ) check the status of every order returned as part of that string through a call to OrderStatus. 2 ) keep an array of OrderIDs and statuses myself so I know what orders are still Open and what orders are closed So, I was thinking that if the Order String was constructed according to some specific sort order that I could reasonably limit my search of Order Status to those OrderIDs that might be Open and NOT have to search the whole string. Think about it... You would never expect discretionary traders to search through the complete list of orders to be able to see just the ones that are "Active". In fact, you've already developed a method for limiting the list of Orders appearing on the Orders tab to those that are Active. But system traders must currently do their own churning of OrderIDs and Statuses to get the list of Active Orders. I just want access to THAT method available to discretionary traders or a suggestion from you about how I might NOT have to check 100 Order Statuses to find the 2 OrderIDs that are Active. |
|
|
|
|
|
#4 |
|
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
|
Hi guys...
Thoughts about this? |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Dierk is on vacation and will likely provide thoughts on this later this week.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
There is no performance impact. The information you are looking for already is in the address space of the requesting app (e.g. TradeStation). It really does not matter (from NT's perspective) if you process 10 or 1000 order status requests. I guess you would not even notice if you would run a timer on it.
However, I see your point and will put it on the list for future considerations.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
|
I understand.
But I'm not using Tradestation. And I've written my own interface to Ninja Trader from within NeoTicker. So, the only Order List I have accessible to me is the one within Ninja Trader. What I did was create a set of string lists for Orders in various states. But reconciliation with the Order List in Ninja Trader including the states of those Orders isn't a simple thing. So, it would be EXTREMElY handy to be able to get the "Open Order List" from Ninja. Thanks. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|