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 11-28-2005, 08:32 AM   #1
aspTrader
 
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

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?
aspTrader is offline  
Reply With Quote
Old 11-29-2005, 12:50 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
Post imported post

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.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 11-29-2005, 01:56 AM   #3
aspTrader
 
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

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.
aspTrader is offline  
Reply With Quote
Old 11-30-2005, 06:45 AM   #4
aspTrader
 
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi guys...

Thoughts about this?
aspTrader is offline  
Reply With Quote
Old 11-30-2005, 07:34 AM   #5
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

Dierk is on vacation and will likely provide thoughts on this later this week.


Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 12-02-2005, 12:09 AM   #6
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
Post imported post

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.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 12-02-2005, 02:09 AM   #7
aspTrader
 
Join Date: Mar 2005
Location: Walnut Creek, California, USA
Posts: 74
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

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.
aspTrader 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 01:41 AM.