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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X