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 CortexZenUSA, Today, 12:53 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by usazencortex, Today, 12:43 AM
      0 responses
      5 views
      0 likes
      Last Post usazencortex  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,265 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X