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

My indicator works in 6.5 but not in 7

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

    My indicator works in 6.5 but not in 7

    Hello,

    I am encountering a problem with NT 7.

    This formula works with the current NT 6.5.1000.17

    myDataSeries.Set(SMA(10)[0] - SMA(100)[0]);
    myDataSeries2.Set(SMA(myDataSeries, 290)[0]);
    Plot0.Set(myDataSeries2[0]);

    When I try to run the same formula in NT 7.0.0.21 it gives me 0 result if I enter numbers above about 280, where I now 290 in the formula.

    With lower numbers (for instance 100) it works with the same result with both NT versions.
    Does anybody have any idea why this occurs?
    Please help!!!
    Thank you.

    #2
    Hello Giorgos,

    Welcome to the NinjaTrader forums!

    Most likely this related to the MaximumBarsLookBack setting when applying the indicator. NinjaTrader 7 uses 255 as the default here. For your indicator, you would want to set this to infinite.


    You will see this setting available whenever you add the indicator. You can also hard code it.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Different indicator works in 6.5 not in 7

      The attached indicator works perfectly in 6.5 but in 7 works some portion of the time and then intermittently makes a totally erroneous plot.
      Attached Files

      Comment


        #4
        Hello ThatManFromTexas,

        You will have to debug the code:


        See here if you're looking for what has changed from 6.5 to 7:
        Contains critical information including but not limited to migration, installation, connections and changes.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          Hello ThatManFromTexas,

          You will have to debug the code:


          See here if you're looking for what has changed from 6.5 to 7:
          http://www.ninjatrader.com/support/f...ad.php?t=21016
          Thank you for that well researched , diligently expressed and insightful solution. I doubt I would have been able to come to that conclusion on my own. Not to take issue with your heavily technical proposal but would not a simpler solution be to continue to use NinjaTrader v6* until NinjaTrader v7 no longer has Beta in it's title and/or no longer has bugs in it's code? Granted, by the time that happens , most of us will be to old to type on a keyboard anyway.

          Thanks again for all the tremendous effort that obviously went into developing that astute observation.

          Comment


            #6
            ThatManFromTexas, as you may or may not be aware, we do not provide custom programming services. We also do not debug scripts, unless it is a simple programming mistake.

            I imported your indicator and plotted it and frankly, I have no idea where to start deciding what could be going wrong. To me, it looks like some dot plots to indicate overbought/oversold conditions. There were quite a few changes to session management for NT7, so perhaps that is where the error crept in.

            If you believe there is a bug in the code for NinjaTrader 7, please let us know with the exact steps necessary to re-create the situation, what you expect to happen, what you actually are observing, and how they differ.

            There have been over 4000 issues fixed since NinjaTrader 7 was initially created, but it is definitely possible for errors to still be present.

            If you want to keep using NT6.5, feel free to do so.
            Attached Files
            AustinNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Austin View Post
              ThatManFromTexas, as you may or may not be aware, we do not provide custom programming services. We also do not debug scripts, unless it is a simple programming mistake.

              If you believe there is a bug in the code for NinjaTrader 7, please let us know with the exact steps necessary to re-create the situation, what you expect to happen, what you actually are observing, and how they differ.

              There have been over 4000 issues fixed since NinjaTrader 7 was initially created, but it is definitely possible for errors to still be present.

              If you want to keep using NT6.5, feel free to do so.
              NinjaTrader_Austin, as you may or may not be aware, anyone who has used NinjaTrader for any length of time is painfully aware of the limited support available and is quite used to resolving issues on their own.

              Should NinjaTrader v7 ever become a stable product and/or you discontinue NinjaTrader v6 I will re-evaluate it.

              Comment


                #8
                This is what I am talking about.

                This is a simple indicator that is supposed to show a reversal in the weighted CCI. It is supposed to plot a green dot if a rising reversal is above "0" and a red dot if a falling reversal is below "0". As indicated in the attached image, it works correctly consistently and then has an inadvertant erroneous plot. If you refresh the indicator it will correct the error.

                The maximum lookbackbars are set to infinite.
                Attached Files

                Comment


                  #9
                  One thing I noticed is this else statement. If you wanted to use else if, then this is on the same line, not separated by a line break. If you just wanted else, then there is no further conditional statement needed.

                  Code:
                   
                  else 
                   
                  
                  if (Formula[0]-Formula[1]<= -CCIpoints && Formula[0]<0 && Formula[0]<Formula[1]&& Formula[2]<Formula[1] )
                  {
                  Values[1].Set(Linevalue);
                  }


                  If you have limited time, or are not a programmer, you may consider hiring a NinjaScript consultant to help you debug this indicator.

                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #10
                    The problem is the Color plots. If you have a condition during the bar, and you get a "dot" the dot will still be there if the condition change and the dot should have dissepared. I needed to reprogram all my indicators that use condition based colorplots to correct the problems in NT7 using indicators programmed for NT6.5. I looked at your indicator, and it's easy to fix that problem so it plots correct in NT7.

                    Best regards

                    Comment


                      #11
                      Thank you, finnbjurvoll. Correct, there is a new approach for multicolor plots in version 7. Please see here for the new multi- color approach:
                      Ryan M.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by finnbjurvoll View Post
                        The problem is the Color plots. If you have a condition during the bar, and you get a "dot" the dot will still be there if the condition change and the dot should have dissepared. I needed to reprogram all my indicators that use condition based colorplots to correct the problems in NT7 using indicators programmed for NT6.5. I looked at your indicator, and it's easy to fix that problem so it plots correct in NT7.

                        Best regards
                        Thank you for your help!

                        Comment


                          #13
                          NT7 Multi Color Plot

                          Documentation on programming differences between NTv6 and NTv7 is sketchie at best and difficult to discern. With information posted by finnbjurvoll, edanny and others I was able to resolve the issues I was having. I hope the attached code will be useful to others in their endeavor to comprehend NTv7.
                          Attached Files

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Balage0922, Today, 07:38 AM
                          0 responses
                          3 views
                          0 likes
                          Last Post Balage0922  
                          Started by JoMoon2024, Today, 06:56 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post JoMoon2024  
                          Started by Haiasi, 04-25-2024, 06:53 PM
                          2 responses
                          19 views
                          0 likes
                          Last Post Massinisa  
                          Started by Creamers, Today, 05:32 AM
                          0 responses
                          6 views
                          0 likes
                          Last Post Creamers  
                          Started by Segwin, 05-07-2018, 02:15 PM
                          12 responses
                          1,786 views
                          0 likes
                          Last Post Leafcutter  
                          Working...
                          X