Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order placement

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

    Order placement

    Hi,

    I'm backtesting a strategy that runs on daily data and places entry orders
    via OnExecution when an exit takes place and via OnOrderUpdate when an order cancelation takes place. It works fine in general but there are a few bars where no entry orders are placed, although there is a prior exit or cancelation.
    Not sure what's the reason, is it eventually a known issue that some
    events are "missed" by NT or might that be a multithread-issue?

    It seems like that
    if (exitOrder != null && exitOrder == execution.Order)
    {}
    isn't reached in those few cases although an exit takes place.
    According issue for OnOrderUpdate() and order cancelation.

    Thanks in advance for advice,

    Stephan

    #2
    Hello Stephan,
    We are not aware of any known scenarios pertaining to the OnOrderUpdate or the OnExectution event.

    It might be the case the the orders might be rejected as per the internal order handling rules of the managed approach. Please refer to our help guide to know more.


    If you append the below code in the Initialze section of the strategy then can you get any cancelled orders in the Output window.
    Code:
    TraceOrders = true;
    For more debugging tips please refer to this post.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hallo,

      Orders are not rejected, they are not placed as can be seen
      in the output window using TraceOrders=true.
      It's the OnExecution Event and the OnOrderUpdateEvent, that seem in some cases not to be "recognized".

      Comment


        #4
        Stephan,

        Likely we would need to see your log and some example code from your strategy here.

        If the orders are not placed, it could be your conditions aren't satisfied however its hard to determine by the small sample in your original message.

        Could you post more code here, and/or provide your log?
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          I tested further and found the problem.
          There was a numerical issue with my entry trigger,
          when corrected it worked as expected.
          Thanks again, Stephan

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          672 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          379 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          111 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          577 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          582 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X