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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          65 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          149 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X