Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 pechtri, 06-22-2023, 02:31 AM
    9 responses
    122 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by frankthearm, 04-18-2024, 09:08 AM
    16 responses
    66 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by habeebft, Today, 01:18 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by benmarkal, Today, 12:52 PM
    2 responses
    18 views
    0 likes
    Last Post benmarkal  
    Started by f.saeidi, Today, 01:38 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X