Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

chart & orders tab out of sync

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

    chart & orders tab out of sync

    Hi NT support,

    I am wondering if anyone is seeing an errors where the traceorders function is saying that an order is active, then the strategy analyser tab says the order was filled, then the Chart tab on the strategy analyser is not logging the order or position?

    Here I’m showing a screen shot of the order tab showing that an order was filled on the 17/08/2007 (N.B. date in UK format), the following screen shot is showing the chart section of the surrounding dates, which notes no order being evaluated, filled, or otherwise.

    However, I can change the order by altering the evaluation of a condition of BarsSinceExit(), which means the error does not occur, which I have shown in the output and screen shots as well.

    I have attached the traceorder output which shows the relevant order being submitted.

    In the absence of an known error database I need to ask if are there any known errors in this area of execution?


    (Please note that I have deleted some of the output window output to keep it below the file size limit of the forum).

    Kind regards,

    Dan
    Attached Files

    #2
    drolles,

    You are going to need to provide more info. What exactly was the sequence of events you are expecting? What is the first screenshot you have of? When did it switch to screenshot two?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      Thank you for the impressively prompt reply.

      The expected behaviour is that in the second screen shot firstly the order should not be placed into the market at all. I am using a BarsSinceExit() criteria so the entry conditions should not be evaluated if we have just exited a position. Extract of the code here:

      Code:
      [COLOR=blue][FONT=Courier New]if[/FONT][/COLOR][COLOR=black][FONT=Courier New] ((Position.MarketPosition == MarketPosition.Flat) && (BarsSinceExit() != [/FONT][/COLOR][COLOR=purple][FONT=Courier New]0[/FONT][/COLOR][COLOR=black][FONT=Courier New])){[/FONT][/COLOR]
       
      [COLOR=blue][FONT=Courier New]if[/FONT][/COLOR][COLOR=black][FONT=Courier New] (entry_order != [/FONT][/COLOR][COLOR=blue][FONT=Courier New]null[/FONT][/COLOR][COLOR=black][FONT=Courier New] && entry_order.OrderState == OrderState.Working) {[/FONT][/COLOR]
      If you see the orders tab screen shot it talks of long stop being cancelled, however it then talks of a stop order being filled on the 24/08/2008. This is not shown on the chart screen shot (which I think you are referring to as the second – i.e. with no orders post the short target being met).

      The strategy is running on the AUDUSD between the dates of 01/05/07 – 31/10/2008. I would be happy to email the code if that helps so we can talk to specific lines of code & order of execution.

      Kind regards,

      Dan

      Comment


        #4
        Dan,

        What I need to know is how you went from the first screenshot with the trade to the second screenshot without the trade. Did you change code? I also need to know if the orders tab screenshot is in relation to the second screenshot or the first. Same for the output logs. Was that for first or second?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,

          Yes, the code change that changes the output is the condition being taken out of BarSinceExit () != 0 (see the extract from the orders tab & the code extract below). If you take this out the orders behave differently.

          I think this is a red herring though, all this does is show that the order executes as per the first screen shot – i.e. the screen shot with the follow along order in it, then being stopped out on the 24/07/2008.

          Does that help with the evaluation? I suspect the best option might be for me to email over the code so we can see if you are getting the same error in the same conditions.

          Kind regards,

          Dan

          Comment


            #6
            Dan,

            If you changed the code then I am not sure what you are asking for. Since you added the condition for screenshot 2 for sure you will not trade on the the bar you traded on in screenshot 1. What exactly is the concern?
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks for the response. I’m sorry if I’m not being clear here, hopefully I can get the point across better this time. However, I do suspect it would be best to see if you can recreate the error at your end with my code. So let me be clear with the scenarios I am seeing the error in.

              In summary; I think there is an error in NT about how orders are being evaluated. There seems to be a mismatch between the chart tab (i.e. showing the orders) and the orders tab (i.e. recording orders as filled) under specific circumstances. I am try to demonstrate that with the code changes are the conditions are which the error generates. That is, it behaves normally under one set of conditions, then doesn’t behave normally under another. Yes, the behaviour changes when the code is changed, however in the first instance (i.e. with the BarsSinceExit != 0 condition in) should not be occurring – as there is a discrepancy between the orders tab and the chart display of the orders executing. I believe this is a symptom of some sort of issue with the order evaluation.

              Or put another way:

              Scenario A - BarSinceExit != 0

              Error and mismatch between Orders tab and Chart Tab in Strategy Analyser

              Scenario B – removed BarsSinceExit != 0

              No error and nor mismatch between Orders tab and Chart tab in Strategy Analyser.


              I’ve attached a screen short (Scenario A from above) which aligns with the second screen shot on the original post(i.e. the one of the chart tab output) which shows an order being placed and filled. However, it does not show this on the chart (see the second screen shot on the original post).

              So again, in summary what I am saying, I suspect (please note suspect – I certainly haven’t ruled out this being an error with the my code) that there is an error with how NT is evaluating this order. It doesn’t appear to be handling the orders as expected. It is posting the order to the order tab of the strategy analyser, however it is not pushing in onto the chart, there then are resulting errors (I think related but not the root cause of the problem) in other orders.

              Does that help what I am trying to communicate?

              Kind regards,

              Dan
              Attached Files

              Comment


                #8
                drolles,

                Please send a note into support [at] ninjatrader [dot] com with your strategy. Please make it as simple as possible by removing all extraneous code that does not matter for the reproduction of this scenario and I will try it on my end.

                Please put Attn: Josh in the subject line and also mention this thread. Thank you.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                558 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                545 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X