Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

weird changes in data

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

    weird changes in data

    Hi,

    I am using the attached strategy file to export data from Ninja Trader (data provide is Zen Fire). I use as primary instrument "6A 12-10" AUD Futures and as secondary instrument "6C 12-10" CAD futures. When I export data say from 1 April 2008 till 8 June 2008, I get the values of AUD around 0.93 which is correct but if I export from 1 Apr 2008 till 9 June 2008 or any late date I start to get the value of AUD around 0.85 which is not correct.

    I checked this with another strategy which uses these two instruments and this problems persists in that one as well. It creates incorrect results.

    Thanks
    Attached Files

    #2
    Hello Aseke,

    I suggest simplifying your strategy and output until you can verify results are what you expect.

    You can simplify with Print() statements and only one instrument. Once you've verified values, you can can start adding complexity like the stream writer stream and the second instrument.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,

      There is nothing complex in this strategy but I simplified it to the bone for you. This is a strategy which just prints the value of the series on each bar update.

      Code:
      Print(Time[0]+" " +Close[0]);
      The results are the same. When I run this for a short period say for 2 months (I use futures whose contracts change every 3 months) the prices are different than the prices that I get for the same date and time when I run it say for a period of 4 months.

      Thanks,
      Attached Files

      Comment


        #4
        By the way I don't think it will make a difference but I use 5 minute data.

        Comment


          #5
          Thanks. I ran the test indicated and saw what you were seeing.

          It seems related to the Merge settings, when viewing back adjusted data.

          For non back-adjusted values: Click Tools > Options > Data > Set Merge policy to MergeNonBackAdjusted.

          You should then see the same output for both tests.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Thanks but could you please explain what is the difference between these two?

            Actually I realized this problem when I used the data that I export in a strategy that I created in MATLAB. When I moved my strategy to NJ the results were different even though the strategy was the same. So I realized that the data I exported and the data used by NJ for back testing were different.

            Which one should I use for back testing in MATLAB non back adjusted or back adjusted?

            Thanks

            Comment


              #7
              Rollovers are defined on a particular day. On that day, all values prior to the rollover are adjusted according to the offset. Back-adjusting will typically shift all prior values lower, and the adjustment takes place at every rollover.

              If your test doesn't include the rollover day, then they'll use values prior to the back-adjustment.

              Using back - adjusted data for backtesting is good, so that you don't have large gaps in-between rollovers. You should just consider the whole period of data you're looking to test and export at once. Doing in chunks will lead to these types of results.
              Ryan M.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              586 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              341 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              555 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              552 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X