NexusFi: Find Your Edge


Home Menu

 





Strategy to monitor ALL account orders?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MXASJ with 5 posts (2 thanks)
    2. looks_two Maza with 3 posts (2 thanks)
    3. looks_3 traderwerks with 2 posts (0 thanks)
    4. looks_4 ratfink with 2 posts (2 thanks)
    1. trending_up 8,438 views
    2. thumb_up 6 thanks given
    3. group 8 followers
    1. forum 18 posts
    2. attach_file 1 attachments




 
Search this Thread

Strategy to monitor ALL account orders?

  #1 (permalink)
SetFreeByTruth
Minneapolis Minnesota
 
Posts: 5 since Mar 2011
Thanks Given: 2
Thanks Received: 0

I need to design a strategy that monitors all orders on an account, regardless of which strategy entered the orders, or if they were entered manually.

Is is possible to "globally" monitor orders? I experimented with the OnExecution() event but it only fires for order events created by its own strategy. If no such event is available, I would be fine with looping through an array of orders to check for changes, if such an array exists.

Again, I need to monitor all orders on the account. The goal is to upload any account changes to a signal server for distribution to signal subscribers.

Kind Regards

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
Battlestations: Show us your trading desks!
26 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
The Program
17 thanks
  #3 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


Have a play with this:

 
Code
Print("Total Open Positions: " + Account.Positions.Count);
System.Collections.IEnumerator ListPositions = Account.Positions.GetEnumerator();
for (int i = 0; i < Account.Positions.Count; i++)
{
ListPositions.MoveNext();
Print("Open Position: " + ListPositions.Current);
}
Please post back if you come up with something useful. I need to send position information to another computer and have not come up with an elegant way to do it yet.

Reply With Quote
Thanked by:
  #4 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


MXASJ View Post

Please post back if you come up with something useful. I need to send position information to another computer and have not come up with an elegant way to do it yet.

What type of computers ? Windows/Linux ? Windows/Windows ? Same network or over the internet? Maybe I have some ideas.

Math. A gateway drug to reality.
Reply With Quote
  #5 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


traderwerks View Post
What type of computers ? Windows/Linux ? Windows/Windows ? Same network or over the internet? Maybe I have some ideas.

Windows(NT)/Windows(OMS). Same subnet/LAN. Sockets or any TCP/IP ideas would be great to keep it platform agnostic... but a Windows only solution would be fine. Thanks.

Reply With Quote
  #6 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686

Have you guys considered the Automated Trading Interface? The DLL interface I believe you have a function to get market position but you need the account and instrument as parameters. The file interface deposits a file with market position interface named by instrument.

Automated Trading Interface (ATI)

Follow me on Twitter Reply With Quote
  #7 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


NinjaTrader View Post
Have you guys considered the Automated Trading Interface? The DLL interface I believe you have a function to get market position but you need the account and instrument as parameters. The file interface deposits a file with market position interface named by instrument.

Automated Trading Interface (ATI)

I've played with the DLL as part of my C# learning process here



And showed how to do some creative things using Powershell here



The ATI might not be the best solution for this, and it seems to have been deprecated from an official NT Support standpoint. Or am I wrong?

I am far from expert but getting NT to talk to an upstream OMS has been a challenge for me. If I have a room full of NT users I can use Rithmic's tools or TT's tools on an account level but the "roll my own" OMS/Risk system has been a challenge. I'm now considering vanilla FIX as quickFIX is part of the default NT install, but it goes back to the OP question of a global OnExecution() as opposed to a strategy-specific method.

Let's see what the community comes up with.

BTW its great to see you and DTN and a few of the other major vendors chime in here. It speaks loads to your commitment to your product.

Reply With Quote
  #8 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465


MXASJ View Post
Windows(NT)/Windows(OMS). Same subnet/LAN. Sockets or any TCP/IP ideas would be great to keep it platform agnostic... but a Windows only solution would be fine. Thanks.

What about something like zeromq in brokerless mode ? Also, there is the windows messaging framework, but I haven't kept up with that one.


NinjaTrader View Post
Have you guys considered the Automated Trading Interface? The DLL interface I believe you have a function to get market position but you need the account and instrument as parameters. The file interface deposits a file with market position interface named by instrument.

Automated Trading Interface (ATI)

The file interface does not look as interesting as the DLL interface.

Math. A gateway drug to reality.
Reply With Quote
  #9 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,713 since May 2010
Thanks Given: 203
Thanks Received: 2,686


MXASJ View Post
and it seems to have been deprecated from an official NT Support standpoint. Or am I wrong?

No, it has not been deprecated although we used to have a .NET interface in additional to the DLL and File approach and this has been deprecated. Putting things into perspective, the ATI was originally built to support users of TradeStation and eSignal as a pipe to get signals over to NinjaTrader for order execution. Since we introudced our own scripting years back, more users have opted to use our application instead of trying to bridge it with other applications..so the ATI is not as heavily used as in the past.



Quoting 
BTW its great to see you and DTN and a few of the other major vendors chime in here. It speaks loads to your commitment to your product.

We are happy to be here and help where and when we can.

Follow me on Twitter Reply With Quote
  #10 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800



traderwerks View Post
What about something like zeromq in brokerless mode ? Also, there is the windows messaging framework, but I haven't kept up with that one.



The file interface does not look as interesting as the DLL interface.

0MQ (and its competitors) is something I'm spending a lot of time on. But it goes back to the OP question about a global OnOrderUpdate() or OnExecution() method. There isn't one.

I'm quietly hoping the OP looks at my snip, writes some code that does a time-based array check of open positions and creates a new event-driven method, and posts it here to make the world a better place .

Or user NinjaTrader gets the dev guys to add a OnAccountOrderUpdate() and a OnAccountExecution() method.

Reply With Quote




Last Updated on November 14, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts