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

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 r68cervera, Today, 05:29 AM
        0 responses
        2 views
        0 likes
        Last Post r68cervera  
        Started by geddyisodin, Today, 05:20 AM
        0 responses
        3 views
        0 likes
        Last Post geddyisodin  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        6 responses
        34 views
        0 likes
        Last Post JonesJoker  
        Started by GussJ, 03-04-2020, 03:11 PM
        12 responses
        3,239 views
        0 likes
        Last Post Leafcutter  
        Started by AveryFlynn, Today, 04:57 AM
        0 responses
        6 views
        0 likes
        Last Post AveryFlynn  
        Working...
        X