Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order submitted in OnBarUpdate() method is not reflecting in OnOrderUpdate() method

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

    Order submitted in OnBarUpdate() method is not reflecting in OnOrderUpdate() method

    Hi,
    I am currently developing my strategy in ninjatrader8.
    When I analyze my strategy in Strategy Analyzer, I found out that even though most orders are captured correctly, few orders which I submitted in OnBarUpdate() method are not reflecting (or maybe I can say they are not captured) in OnOrderUpdate() method.
    Is there anything special with submitting order in onBarUpdate() method which I omitted here. Appreciate your support. Thank you.

    This is the command I used to submit order in OnBarUpdate() method:
    EnterShortStopMarket(0,true,Convert.ToInt32(Defaul tQuantity), (Low[0] - (TickSpace * TickSize)) , @"IB Short");

    And this is the command which I expect to be executed in OnOrderUpdate() method:
    if(order.Name=="IB Short")
    {
    shortOrder = order;
    Print(string.Format("{0} | IB Short Counter: {1} | On Order Update: {2} ", Time[0], barCounter, shortOrder.ToString()));
    }

    #2
    Hello OnyxGuy,

    Welcome to the NinjaTrader forums!

    Are you using a print to determine the condition to place the order is evaluating as true?

    Is TraceOrders enabled to see the order is submitted?

    Is TraceOrders showing the order is being ignored?

    If you print the order object from OnOrderUpdate() do you see the order updating?

    Below is a link to a forum post that demonstrates using prints and TraceOrders to understand behavior.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X