Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I place an order during a BarUpdate() event but it shows up on the next bar

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

    I place an order during a BarUpdate() event but it shows up on the next bar

    So I have a strategy that places an order during a bar update event, which is set to calculate on close. However the order seems to be showing up on the following bar when I look at the chart.

    Is this how it works? Or am is it likely that my calculations are off and the order is in fact being placed on the next bar? I suppose debugging this in VS.NET would make this an easy thing to determine, are there any good guides on how to debug NinjaScripts?

    Thanks

    #2
    That is how it works. When you calculate at the bar close there is no available ticks to have an order execute on that bar anymore. It is closed. The next available time for an order is the next bar's open.

    To debug: http://www.ninjatrader-support.com/v...splay.php?f=31
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok thanks. Just a suggestion, it might make sense to indicate the order in between the bars, or make this an option. This was driving me nuts I thought my code logic was wrong.

      Comment


        #4
        Thanks for the suggestion. We will put it up for future considerations.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        87 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        106 views
        0 likes
        Last Post CarlTrading  
        Working...
        X