Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Order Object

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

    Order Object

    In the Order object there is a property called 'ClientID'. I cannot find any reference to it in the Help documentation. It seems to be always set to -1.

    Is this used by the NT strategy engine or is it a property I can 'Set' and use in my own strategy?

    Thanks,



    #2
    Hello ChazJ,

    Thanks for your question.

    As the property is not documented, it is not supported for regular use. I also could not comment on the internal use of the property as it is undocumented. The property has a getter and a setter so it could be assigned, but I would not recommend setting this property for your own purposes as it could interfere with internal functionality.

    I would instead recommend creating class level variables to track additional information that you would like tracked with orders. You could, for example, create a dictionary that holds information associated with an order's Order.Id property. Whenever orders are submitted or cancelled/filled, you can add the order Id and associated information to your dictionary, or remove that entry from your dictionary.

    Please let us know if we can be of further assistance.
    Last edited by NinjaTrader_Jim; 12-09-2019, 10:27 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thank you Jim.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by trilliantrader, 04-18-2024, 08:16 AM
      4 responses
      18 views
      0 likes
      Last Post trilliantrader  
      Started by mgco4you, Today, 09:46 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by wzgy0920, Today, 09:53 PM
      0 responses
      9 views
      0 likes
      Last Post wzgy0920  
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      10 views
      0 likes
      Last Post Rapine Heihei  
      Working...
      X