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

Trade Fill Chart Plot Does Not Match Actual

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

    Trade Fill Chart Plot Does Not Match Actual

    Hello,

    I am running playback to test a strategy.

    Please observe attached image. The trade was filled at 58.11 which matches the purple marker but the bars never touch 58.11.
    What is the explanation for this?

    Thank you
    Attached Files

    #2
    Hello reynoldsn,

    This is may due to the bar type.

    Is the bar type a time based on movement where new bars are not created until a range is broken or something similar?

    What kind of bar type are you using?

    Are you seeing the same behavior on a 1 minute chart?
    Last edited by NinjaTrader_ChelseaB; 12-29-2019, 05:00 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, I should have mentioned I am using a range bar.

      Funny thing is, I just ran the playback again and now the bars look better (see attachment). Why would the bars not be consistently drawn?
      Attached Files

      Comment


        #4
        Hello reynoldsn,

        With bars based on movement, these will not show all of the prices that are reached while that bar is open. This means there can be fills outside of the bar.

        In historical data, intra-bar granularity allows orders to fill outside of the bar by introducing a 1 tick series used for accuracy in price fills.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I looked at the link you provide and I would like to clarify what is meant by "backtest". When I think of backtest, I think of 2 options: market replay and Strategy Analyzer. But in the referenced link, looks like "backtest" refers to use of the Strategy Analyzer (and not market replay) - is that correct?

          Comment


            #6
            Hello reynoldsn,

            Chelsea's post would be in regards to historical simulations like what would be seen in the Strategy Analyzer.

            Realtime order fill simulations would use the active price data and volume data. I would expect to see consistent results when testing and retesting a playback session. Note that if your strategy adds a timer, the timer will not update at the same pace as the Playback Controller, and this will create inconsistencies with the strategy. (Testing scripts with timers should use the Playback Connection at 1x speed.)

            Are you still seeing these issues? If so, could you test in a clean environment of the latest version of NinjaTrader 8 (Release 20.1) to ensure that there is not an installation issue causing this behavior? (Please ensure that your tests include the same data series settings and strategy settings to ensure consistency.)

            Clean environment test:

            Creating a clean environment can be done by following the steps below:
            1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
            2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from http://ninjatrader.com/PlatformDirect
            3. Import your test script and download the MArket Replay data necessary for the test. Test in Playback to check for issues.
            If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

            For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.

            Let us know if we are still experiencing issues.
            JimNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            21 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X