No announcement yet.

Partner 728x90


display orders inverse

  • Filter
  • Time
  • Show
Clear All
new posts

    display orders inverse


    I am testing my strategy with playback. the strategy properties:
    start behavior - wait until flat
    Exit on session close - enable
    Exit on session close second 30
    Time in force - GTC.

    The order window in the control center display the order in reverse ,
    the first order was sell short type in order to enter to short position,
    and in the OnExecutionUpdate() I sent a market order to exit - buy to cover.
    the print in the out windows is OK.
    but the order tab windows of the main windows display that I sent first buy to cover order and after that it display the sell short order, why??
    I sort the time columns as well.


    Hello Kobi,

    Thanks for opening the thread.

    I tried to reproduce this occurrence by exiting my position in OnExecutionUpdate(), or immediately after I have entered. The list of orders in the Control Center looks as I would expect it and is reflecting what I see in the Output window.


    I have also tested the inverse using EnterShort() and ExitShort() for Sell Short and Buy To Cover orders and I am not seeing questionable order times.

    Could you provide a simple example like I have put together that demonstrates the issue? Please include a screenshot that shows the complete time of the order submission in case there is some significant digit that is being over looked in the time of the order.

    Also, could you please confirm if you are seeing this on the latest build of NinjaTrader 8? (Version

    I look forward to being of further assistance.
    JimNinjaTrader Customer Service


      display orders inverse

      Hello Jim

      Thank you for your response,

      I am providing screenshot of Ninjascript output window,orders tab windows, exexcution tab windows.
      as you can see the order tab and the execution tab are not reflected the NinjaScript output windows.
      The NinjaScript output windows describes the sequence OK!!.
      I don't know if its matter In your example you in the OBU you used the condition "if(Position.MarketPosition == MarketPostion.Flat) Enter long

      The Scenario is like the follow
      In My strategy If my indicator is signaling to Enter to short I send the following command From the OBU:

      EnterShort(order_A.barsInProg,order_A.Quantity,ord er_A.EntrySig);

      The order_A input is my internal structure\object which contains the EnterShort parameters.

      In OnExecutionUpdate() I called the following order

      ExitShort(order_A.barsInProg, order_A.Quantity,order_A.ExitSigName, order_A.EntrySig);

      The order_A input is my internal structure\object which contains the ExitShort parameters.

      The problem occurs in and in the previous version 8.0.9 as well.

      Attached Files


        Hello Kobi,

        Thanks for the reply, I've been able to reproduce.

        It looks like this is only occurring in playback for NinjaTrader 8 when times match to the second and the behavior is different from NinjaTrader 7.

        Before I send this report further, could you describe the impact of this issue further? The development team will want to know why an exit is being made immediately upon the execution of an entry so the issue can be prioritized.
        JimNinjaTrader Customer Service


          Thank yo for your response.
          I don't understand what you mean by "describe the impact of this issue further" ,I think it is obvious I I would expected to see that the order and execution tab reflect the real sequence orders and executions. thought that I had a bug.

          my strategy logic is to place a stop order immediately after execution of enter order.
          by mistake I sent a market order type and I encountered this issue.
          so I had a logic bug!!.

          Sincerely, Kobi


            Thanks for the additional information, Kobi.

            Something is up with the account reporting. It is useful for us to know if the issue extends past the occurrence we just saw. Thanks for reporting. I'll write back with a ticket ID for tracking once I receive it.

            When a new release contains an a fix, the ticket ID can be found publicly on the Release Notes page of the help guide. I'll provide a link below.

            Release Notes:

            12/7/2017 - Ok, so as it turns out, this is because the database is only recording timestamps down the second. So this behavior would be considered an expected limitation, and we will move forward with a feature request for millisecond granularity in the database to fix this issue.

            I have submitted a vote on your behalf and the ticket ID for the feature request is SFT-2873. It can be found in the Release notes once it is implemented in a new release.

            Thanks again!
            Last edited by NinjaTrader_Jim; 12-07-2017, 07:51 AM.
            JimNinjaTrader Customer Service


            Latest Posts


            Topics Statistics Last Post
            Started by Aramunno, Yesterday, 10:11 PM
            2 responses
            Last Post Aramunno  
            Started by sdauteuil, Yesterday, 09:38 PM
            0 responses
            Last Post sdauteuil  
            Started by fscabrera03, Yesterday, 09:23 PM
            0 responses
            Last Post fscabrera03  
            Started by WeyldFalcon, Yesterday, 07:03 PM
            0 responses
            Last Post WeyldFalcon  
            Started by Seastragg, Yesterday, 04:01 PM
            3 responses
            Last Post Seastragg