Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Counting the number of orders sent

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Counting the number of orders sent

    As I'm begging to hit the messaging limit on CME, what's the best way to count the number of orders (new / replace / cancel) that NT actually sends?

    (I was thinking counting them in OnOrderUpdate(), but perhaps there is a simpler solution).

    Boaz

    #2
    Hi Boaz,

    OnOrderUpdate is the best place if you are interested in monitoring order state changes. Each category you list there can probably be associated with a specific order state.
    new = PendingSubmit
    replace = PendingChange
    Cancel = PendingCancel or Cancelled
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      While we're at it, what's the best way to determine the order's signal (meaning Entry, Profit Target or Stop Loss). Right now I'm doing
      Code:
      if (order.Name == "Stop loss") {...}
      , but is there somthing more generic and efficient than string comparison?

      Comment


        #4
        boaza, this would be what you need to use with the Set() methods that do not offer IOrder returns, if suitable the IOrder returns offer a more elegant way with the .Name property : http://www.ninjatrader.com/support/h...nt7/iorder.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        49 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X