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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    194 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    355 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X