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

misplaced orders

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

    misplaced orders

    Hello,

    Attached is an example of a minimal strategy that buys and sells at specific bar numbers.
    I ran it in Playback mode.
    While the Print statements in OnOrderUpdate & OnBarUpdate indicate the orders are placed and filled where intended, the actual orders on the chart are totally misplaced.
    What is the explanation for this? Is it because of a setting in ControlCenter > Tools > Options maybe?

    Thank you for your help.
    Attached Files

    #2
    Hello utilizator,

    Can this only be reproduced in real-time and not historically?

    I am not able to reproduce this behavior.

    Below is a link to a video of the test.


    The prints show the time most recent fully closed bar.

    (If you want the execution fill time, print this from OnExecution())
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea B.,

      Thank you for your reply.

      I can see that you actually reproduced the issue I was referring to (attached screenshot from the movie):
      * Print() says that BUY is filled at bar# 96375 and SELL is filled 20 bars later, at bar# 96395
      * on chart though we see BUY and SELL on the same bar, not spaced 20 bars one from another ...

      Shouldn't we see on chart a BUY at bar# 96375 followed by a SELL 20 bars later?

      Note: on the movie, what is bar# on chart where the BUY & SELL are drawn? 96375 or 96395? My guess is that neither of the two ...

      Thank you.
      Attached Files
      Last edited by utilizator; 08-03-2020, 10:57 AM.

      Comment


        #4
        Hello utilizator,

        It takes time for an order to go through order states and fill, this means that the fill can be several ticks after the entry was submitted. This can change the amount of ticks between the orders fills on the chart.

        Zooming in closer, we can see that the entry order has filled a few bars after the entry was submitted, and the exit has as well. Further we also see there are usually many ticks that can be received all at the same time.


        You are looking at the amount of ticks that can be received while an order is being processed and filled.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea B.,

          According to this,

          the delay should not exist with Playback:
          "The Sim101 account adds a simulated random delay for processing execution events, but the Playback connection triggers executions immediately"

          The delay happens though with Playback, and it is a normal NT8 behavior, not an issue, as I understand.

          Thank you for clarification.

          Best regards.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GLFX005, Today, 03:23 AM
          0 responses
          2 views
          0 likes
          Last Post GLFX005
          by GLFX005
           
          Started by XXtrader, Yesterday, 11:30 PM
          2 responses
          11 views
          0 likes
          Last Post XXtrader  
          Started by Waxavi, Today, 02:10 AM
          0 responses
          7 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          14 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          3 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Working...
          X