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 fernlicht, Today, 01:59 AM
        0 responses
        12 views
        0 likes
        Last Post fernlicht  
        Started by space_trader, Today, 12:52 AM
        0 responses
        6 views
        0 likes
        Last Post space_trader  
        Started by soon123, Today, 12:18 AM
        0 responses
        6 views
        0 likes
        Last Post soon123
        by soon123
         
        Started by AxelrodWins, Yesterday, 07:07 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by StockJock, Yesterday, 11:05 PM
        0 responses
        14 views
        0 likes
        Last Post StockJock  
        Working...
        X