Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling the 'OnOrderUpdate' method for strategy 'maslope': Object reference

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

    Error on calling the 'OnOrderUpdate' method for strategy 'maslope': Object reference

    Error on calling the 'OnOrderUpdate' method for strategy 'maslope': Object reference

    I get this error in the NT log when I start a strategy with the presence of (which compiles fine) in OnOrderupdate:

    if (targetOrder.Token == order.Token)
    Print(
    "Target Order " + order.OrderState.ToString());

    My goal is to show the order status and what order is being reflected. Flawed logic? Better idea?

    #2
    Please see this post for some help -

    http://www.ninjatrader-support.com/v...ead.php?t=4226
    RayNinjaTrader Customer Service

    Comment


      #3
      Guessing: "targetOrder" is null.
      DierkNinjaTrader Customer Service

      Comment


        #4
        hmmm.. figured it out, need to add the qualification ' targetOrder != null' to the if statement.

        Comment


          #5
          Originally posted by scriabinop23 View Post
          hmmm.. figured it out, need to add the qualification ' targetOrder != null' to the if statement.
          I think its finally clicking... thanks guys.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jcbinks, Today, 03:32 PM
          2 responses
          14 views
          0 likes
          Last Post jcbinks
          by jcbinks
           
          Started by Stefan Mayer, Today, 03:09 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by M_ichel, Today, 03:18 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by ralett, Today, 02:43 PM
          2 responses
          15 views
          0 likes
          Last Post ralett
          by ralett
           
          Started by Nightmaregpu, Today, 02:18 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X