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 MatthewLesko, Today, 07:59 PM
        0 responses
        1 view
        0 likes
        Last Post MatthewLesko  
        Started by VolatyTrading, Today, 07:57 PM
        0 responses
        1 view
        0 likes
        Last Post VolatyTrading  
        Started by RookieKiwi, Today, 06:53 PM
        0 responses
        2 views
        0 likes
        Last Post RookieKiwi  
        Started by kazisl, Today, 05:52 PM
        0 responses
        4 views
        0 likes
        Last Post kazisl
        by kazisl
         
        Started by andrewjoseph939, Today, 02:39 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X