Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Long period Moving Averages are -not- the same on NT8 vs NT7.

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

    Long period Moving Averages are -not- the same on NT8 vs NT7.

    Hi - I use some very long term moving averages and in trying to convert some charts from NT7 to NT8, I noticed NT8 produces quite different results. Therefore, pls run the following test, using NT7 and identical NT8 charts concurrently thru the regular trading session(9:30-16:00, NYC time) and lemme know what you get:

    - AAPL stock.
    - 1m chart
    - lookback 180 days.
    - moving average periods = 5000, 10000, 20000, 40000. Yup, long periods...four moving averages oughta be enough to check results...
    - IQFeed as the data source. I know you all have IQFeed and it should be no problem hooking up NT7 & NT8 at the same time to the same IQFeed. That's what I do.

    I get diff results regardless of whether I use the Indicator setup wizard or code up the moving averages myself. I specifically checked and both programs use the closing price of the bar, which is usually the default for most charting programs I've examined and is what I want, so good there.

    For my purposes, NT7 is correct and NT8 is wrong. I can't migrate to NT8 until NT8 produces the same results as NT7.

    Thanks...


    #2
    Are you using MaximumBarsLookback.Infinite?

    Comment


      #3
      Hello AMATX,

      Thanks for your post.

      I have attached screenshots showing my test with IQFeed data.

      I have also added a modification of the NinjaTrader 8 SMA indicator that is forced to use the older NinjaTrader 7 code for all barstypes. (This is in the IsRemoveLastBarSupported section of the NinjaTrader 8 indicator beneath line 59.)

      My results are matching. I would suggest ensuring that the data series parameters match and to make sure that you have reloaded historical data to ensure the difference is not caused by a gap in data.

      We look forward to assisting.

      Attached Files
      JimNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Jim View Post
        I have also added a modification of the NinjaTrader 8 SMA indicator ...
        What modification?

        Comment


          #5
          I don't understand what you mean by

          "I have also added a modification of the NinjaTrader 8 SMA indicator that is forced to use the older NinjaTrader 7 code for all barstypes. (This is in the IsRemoveLastBarSupported section of the NinjaTrader 8 indicator beneath line 59.)"

          I found Is RemovedLastBarSupported in the NT8 manual, but nothing about a 'line 59' and nothing about adding a modification, etc.

          ???

          I'll retry comparing NT7 & NT8 with some fresh data and see if that fixes things. And, tomorrow, I'll compare my setup panels to make sure they match yours in the pics. Otherwise, pls explain exactly what you mean.

          Comment


            #6
            Originally posted by AMATX View Post
            pls explain exactly what you mean.
            I suspect Jim forgot to attach his modified SMA.cs file ... otherwise, yeah,
            it is pretty darned confusing, and completely unclear.

            We'll find out tomorrow.

            Comment


              #7
              If you compare the SMA from NinjaTrader 7 against NinjaTrader 8, you can see there is a performance optimization for bars that are not RemoveLastBarSupported. Bars that are RemoveLastBarSupported do not use this performance optimization and use the same code as NinjaTrader 7.

              The modified indicator was in my screenshot so we had an apples to apples comparison but I did not attach it because it was just one line of code changed at line 59, and the original indicator was already matching output with NinjaTrader 7.

              It's attached here if you need further context, but since everything is lining up for me, it looks as though you have some data missing on your end.
              Attached Files
              JimNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Jim View Post
                but since everything is lining up for me, it looks as
                though you have some data missing on your end.
                Just so I understand, OP first needs to apply the one line change to his SMA.cs on NT8
                and then "everything should line up" between NT7 and NT8 -- am I understanding you
                correctly?

                Originally posted by NinjaTrader_Jim View Post
                Bars that are RemoveLastBarSupported
                Yep, clear as mud there.

                So, it is true ,,, you failed to say so, but the OP's issue is, well, completely valid, right?

                Using unmodified code -- no changes to SMA.cs for either NT7 or NT8 -- the OP is
                seeing differences, and he's not insane, right?

                Jim, you make it sound like, "oh, just change this one line of code here on NT8, and then
                we get an apples to apples comparison with NT7, and everything lines up" -- is that your
                answer? Seriously?

                It didn't line up for the OP probably because he wasn't using your modified SMA trick.

                Jim, your answer is inadequate. I mean, how many other moving average indicators would
                have the same problem? Does the OP need to inspect every indicator for any that are using
                RemoveLastBarSupported? Does the OP need to make a one-line code change to every
                indicator (an outrageous suggestion) that uses RemoveLastBarSupported? What if the
                OP would like to share his indicator, or sell it ... how should OP compensate for the
                factory installed SMA.cs on other people's machines that need changing?

                Jim, I really don't comprehend your answer. You provide a cosmetic solution, but
                don't really explain any of the underlying issues surrounding your solution, and you've
                completely ignored the potential enormity of the problem within the larger NT8 indicator
                universe. Is the issue with SMA just the tip of the iceberg? Are we expected to do
                our own research to find out?

                In the broad sense, your answer only brings up more questions.
                It certainly does not inspire confidence in NT8.

                Like, why is your modified SMA.cs trick even necessary?

                I mean, why does NT8, a globally competitive product, need a one-line change
                in SMA.cs order to produce the same correct result as NT7?


                Am I missing something?



                Last edited by bltdavid; 06-18-2021, 09:13 AM.

                Comment


                  #9
                  Hello bltdavid,

                  We can look past the code change here as it is not relevant to the issue at hand which would be data/settings. Had my results not matched between NinjaTrader 7 and NinjaTrader 8, checking the code would be the next thing to verify. The results did match though, so we do not need to worry about the code.

                  Regardless of using the optimized code or forcing to use the NinjaTrader 7 style code, my results match between NinjaTrader 7 and NinjaTrader 8. As long as the code, settings, and data are the same, the results will match. Checking my screenshots, my results match with those settings (and also the NinjaTrader 7 style code in NinjaTrader 8.) The data/settings then must be different.

                  Renko and LineBreak are examples of bars that are RemoveLastBarSupported.

                  I hope this makes things clearer for you. If you would like to continue discussion with me directly, you can reach out to me over email.

                  AMATX if you are still having issues after reloading data and checking the settings as I have, please reach out to me over email so we can schedule a remote support session. You can email me at platformsupport [at] ninjatrader [dot] com with the text "Attn Jim 3146788" with a link to the thread. I can schedule a call between 9AM EST and 5:30PM EST.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    Thx, Jim - it will be late next week before I can delve into this more, but I'll post when I know something. Nice to know NT7 & NT8 actually match, as that indicates there's something on my end that needs to be changed.

                    Comment


                      #11
                      Good news, Jim
                      Turns out you were right - I have a data mismatch issue going on here, between NT7 and NT8.

                      Had a couple minutes, thought I'd run the following test:

                      - Stock = 'CAT'
                      - This is a stock I don't follow and had -no- data downloaded to my hard drive.
                      - Setup 1m charts for CAT on NT7 and NT8.
                      - Therefore, both NT7 and NT8 would have to issue requests to IQFeed for fresh historical data, which they did.

                      Checking the two charts, the moving averages matched

                      So, I'll spend some time in the next week or two seeing if I can get historical data to match between NT7/NT8.

                      If more problems, I'll report back, but for now, I'm good.

                      Thanks for your help.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Segwin, 05-07-2018, 02:15 PM
                      14 responses
                      1,789 views
                      0 likes
                      Last Post aligator  
                      Started by Jimmyk, 01-26-2018, 05:19 AM
                      6 responses
                      837 views
                      0 likes
                      Last Post emuns
                      by emuns
                       
                      Started by jxs_xrj, 01-12-2020, 09:49 AM
                      6 responses
                      3,293 views
                      1 like
                      Last Post jgualdronc  
                      Started by Touch-Ups, Today, 10:36 AM
                      0 responses
                      13 views
                      0 likes
                      Last Post Touch-Ups  
                      Started by geddyisodin, 04-25-2024, 05:20 AM
                      11 responses
                      63 views
                      0 likes
                      Last Post halgo_boulder  
                      Working...
                      X