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 Waxavi, Today, 02:10 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        8 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X