Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order objects must be private, why?

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

    Order objects must be private, why?

    Hello,

    I read somewhere in the forums from the support team that the usage of orders must or should be limited to private fields only, otherwise it causes problems.

    Code:
    private Order myOrder1, myOrder2;
    Can't seem to find the forum link, and the reference docs don't say a thing.

    I wonder why? I'd like to have the option to have them as public properties, is there an alternative?

    Regards,

    #2
    Hello Waxavi,

    Thanks for your post.

    There may be some types of objects which cannot be serialized, such as order objects, or you may not wish for this property to be saved/restored. Should that be the case, you can optionally set the object to be ignored by defining the XmlIgnore attribute.

    To have the order objects be public instead of private, you would need to make sure to use the [XmlIgnore] attribute.

    See this help guide documentation for more information: https://ninjatrader.com/support/help...eattribute.htm

    Let us know if we may further assist.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks, I thought it was something more complex will try it out.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by chrischongpdx, Today, 09:39 PM
      0 responses
      7 views
      0 likes
      Last Post chrischongpdx  
      Started by Mountain_cast, Today, 12:41 PM
      2 responses
      9 views
      0 likes
      Last Post Mountain_cast  
      Started by dontpanic, 04-07-2015, 04:42 AM
      4 responses
      1,322 views
      0 likes
      Last Post BeachTrader11807  
      Started by algospoke, Today, 07:54 PM
      0 responses
      5 views
      0 likes
      Last Post algospoke  
      Started by Rxxar, Today, 06:26 PM
      0 responses
      10 views
      0 likes
      Last Post Rxxar
      by Rxxar
       
      Working...
      X