Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Placement Location Keeps Moving

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

    Order Placement Location Keeps Moving

    Good morning,

    Has anyone else experienced this issue? I am backtesting my strategy on a SIM account during live markets, and I've noticed a change since the latest update.

    Previously, when an order was entered, the price/location/placement of the order would remain on the candle where the trade was initiated. However, with the latest update, this behavior has changed. Now, when a trade is entered, it no longer stays on the candle where it was placed. The same issue occurs for trade exits.

    In the first picture, you can see the current (incorrect) behavior, and in the second picture, you can see how it used to look (correct behavior). Interestingly, if I disable and re-enable the strategy, the entry and exit locations are corrected.

    I have already tried uninstalling and reinstalling the prior version of NT, but the issue persists. Is there a way to fix this and restore the original functionality?


    Thanks in advance

    #2
    Hello,

    Thank you for your post.

    When exactly is this change occurring?

    Interestingly, if I disable and re-enable the strategy, the entry and exit locations are corrected.
    The strategy will recalculate the historical orders so it is expected that historical orders will not be exactly the same as orders placed in real-time. In order for the orders to remain the same, you would need to implement 1-tick intrabar granularity in the script and enable Tick Replay.

    Comment


      #3
      Thank you for getting back to me. But this occurs with every trade. The problem is, when I'm trying to review my strategy during the live markets it hard to make sure a trade should take place when it's supposed it.

      Comment


        #4
        From your description it sounds like what is happening is that the strategy is calculating differently historically as opposed to what occurred when you ran the strategy live. It is important to note that a strategy running real-time (live brokerage account, live market simulation, Playback connection etc...) will produce different results than the performance results generated during a backtest (when the strategy re-calculates historically on the chart).

        When in historical data, only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

        Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.

        Calculate - https://ninjatrader.com/support/help.../calculate.htm

        To improve the accuracy, you may use Tick Replay along with an added 1-tick series to have logic processed intra-bar and have orders filled intrabar. Tick Replay would be used to have the logic process OnEachTick or OnPriceChange with historical data, but this does not allow for intra-bar order fills. You would need to add a single tick data series and submit orders to that single tick data series for a strategy that uses Tick Replay.

        Please reference the SampleIntrabarBacktest example and the following Help Guide links for more information.

        SampleIntrabarBacktest 'Backtesting NinjaScript Strategies with an intrabar granularity' - https://ninjatrader.com/support/helpGuides/nt8/backtesting_ninjascript_strate.htm

        Please let me know if you have any further questions. ​

        Comment


          #5
          Hi, Thank you for replying. I understand that I could get different results based on live, back testing, SIM market etc... That's not my issue, my issue is when an order is placed (entry price doesn't change) but the candle I entered on keeps moving to the right. As I presented in the pictures. Prior to the newest NT update I never had this issue. That's the only thing I'm trying to figure. Prior to the update everything was working fine. As I mentioned before I uninstalled NT and downloaded and installed the prior release and I'm still getting the issue.

          Comment


            #6
            Hello,

            It's not clear when this change is occurring - can you please answer my previous question about when exactly you are observing this change occur?

            The screenshot shows a change but it is not clear when this change is triggered.

            If possible please provide a video.

            Comment


              #7
              Hi Gaby,

              I thought I did answer but this change happens on every order based on my strategy's inputs. As I mentioned before I didn't have this "visual error" prior to the update. This only starting to happen once I updated NT to the newest version. Even after I uninstalled and installed the prior version I am still getting these issues. But after talking to someone they mentioned that it could be a "visual error" on the charts only.

              Thank you

              Comment


                #8
                Hello lacerda4269,

                I understand the change happens to every order - but when exactly is the change occurring?

                For example, does it happen after reloading historical data?

                Please provide a video of this behavior, as it seems that would be the most helpful course of action in order to understand what exactly is going on.

                Comment


                  #9
                  Hi Gaby,

                  I was able to get a video as requested. But I am unable to upload the file since it's an mp4 file and it's unsupported. Is there an email address or another way I can get you the video?

                  Thank you

                  Comment


                    #10
                    Hello,

                    Thank you, you can send it to scriptingsupport[AT]ninjatrader[DOT]com.

                    In the subject of the email please include "Case Number: 05890921"

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    57 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    37 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    18 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    20 views
                    0 likes
                    Last Post TheRealMorford  
                    Started by Mindset, 02-28-2026, 06:16 AM
                    0 responses
                    49 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Working...
                    X