Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaScript Import Error

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

    NinjaScript Import Error

    I would like to import this script:


    I downloaded the zip file and import that zip file.

    However Ninjatrader complained.

    Please note that this is a fresh install of NT 7.0.0.15 with no custom script installed!! I wonder why this conflict would happen.

    How can I troubleshoot it so I can find out which name(s) has/have been duplicated?
    Attached Files

    #2
    Profitmake, you would have to extract the .cs file from the .zip archive and then manually copy that indicator file to My Documents/NinjaTrader 7/bin/custom/indicator and then you can open it up in NinjaTrader (Tools -> Edit NinjaScript -> Indicator -> select the indicator) and make the necessary corrections.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply.

      Could you test it on your side to see if you get the same error message too? It's really weird that the indicator will conflict with a clean and fresh installation of NinjaTrader.

      The developer shouldn't be so careless to use a name which every customer has it by default.

      Comment


        #4
        Upon importing the file directly into the indicator folder, I tried compiling it and got a specific set of errors. These errors are actually addressed in the NT7 Code Breaking Changes:

        Changed Volume from type "int" to type "long"
        This is code breaking. To remove size limitations with using an integer, we switched to a "long" data type. Existing NinjaScript objects that use Volume will have to be tweaked.


        The developer created a wonderful script, and it was due to changes made at NT that it doesn't work "out of the box" with NT7.
        AustinNinjaTrader Customer Service

        Comment


          #5
          I have manually imported it. I can go and edit the indicator file via ""Tools > Edit ninjascript > indicators...". I fixed the obvious two errors. But I have no clue how to fix the last threee errors.

          Also when you create a new indicator and follow the wizard, you are not allowed to select "long" as the type (you have only four choices in the list). Shouldn't the type "long" be added to the list?

          Comment


            #6
            Profitmake,

            Can you please provide the exact messages of the last 3 errors you see?

            For the most part, you would not need a long type variable unless you have a very specific need to address. In such cases you would currently need to unlock your code to use such a type.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              1. Here's the errors:
              Click image for larger version

Name:	error message.png
Views:	1
Size:	4.8 KB
ID:	856820

              I have no idea whether it can be easily fixed. Forget it if not. Otherwise it would be great if you could tell me how to fix/workaround the errors (so I can import that indicator).

              2. You forget to answer me this question:
              "when you create a new indicator and follow the wizard, you are not allowed to select "long" as the type (you have only four choices in the list). Shouldn't the type "long" be added to the list?"

              Please fix it since we need type 'long' for some new indicators in v7.

              3. Since some existing indicators will be broken in the new v7, what are you going to do about it? Could your team do something or create some tools to help people to convert v6 indicators into v7?

              Comment


                #8
                1. Unfortunately we would not know as that would be related to one of your custom indicators.

                2. Long would not be in the list because it would not be in use except for specialty case scenarios which would exceed the use case of the Strategy Wizard. Strategy Wizard's purpose is to not confuse people with the ins and outs of programming classifications like int vs long and as such is not in there.

                3. Unfortunately the indicators that are broken will have to be addressed by the original author. For information on what has changed please see here: http://www.ninjatrader.com/support/f...ad.php?t=21016

                For your long vs int error, please see the prior link on what needs to be changed. You will need to change those int variables to longs to match the correct variable type and then it should compile afterwards.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  1. Unfortunately we would not know as that would be related to one of your custom indicators.
                  No this is not my custom indicator. I always refer to the same indicator which is downloaded from your site:


                  It works fine in v6.5 but not v7. That's why I ask if there is any easy fix for that one. It's pity quite a few indicators have been broken in v7.

                  2. Long would not be in the list because it would not be in use except for specialty case scenarios which would exceed the use case of the Strategy Wizard. Strategy Wizard's purpose is to not confuse people with the ins and outs of programming classifications like int vs long and as such is not in there.
                  Thanks for your clarification. But I think the wizard is still too "cryptic" for the laymen. Bool/double/int/string already sounds too complicated.

                  3. Unfortunately the indicators that are broken will have to be addressed by the original author. For information on what has changed please see here: http://www.ninjatrader.com/support/f...ad.php?t=21016
                  Thanks for the link. I will try to see if I can fix some v6.5 indicators downloaded on your place by myself. I'm not really a programmer so |I can only fix the most obvious ones.

                  Comment


                    #10
                    Profitmake,

                    What I meant was that it is a custom indicator you have installed on your system. Unfortunately NT does not manage custom indicators created by other users and as such your best bet would be to try and contact the original author of it to see if they have a version which has already addressed NT7's changes.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      I think you should have realised it. This is an indicator created by your fellow member on this forum. Well this is a popular indicator with several thousand hits.

                      Curiosity speaking how do you normally manage the databse on your forum during each upgrade? I don't know how big the change is and how many indicators/strategies etc. are affected this time. Do you just let those valuable assets obsolete and depends solely on community members to update them? If not what measures you may take to rescue some of the valuable assets?

                      Thank you for your answer.

                      Comment


                        #12
                        Profitmake,

                        NinjaTrader does not manage any custom indicator on our forums. We provide a repository for people to share indicators they have made themselves to the community. This is a community managed directive and as such NT cannot comment on how or what any of those various indicators do code wise.

                        What NinjaTrader does is make efforts in educating the programmers on what has changed and how to properly adjust their code to be NT7 compatible, but unfortunately we do not make the changes on the actual indicators.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          Thank you for your answer. Simply put it's solely the community to maintain the repository and make sure they are forward compatible. The team takes no part in it no matter how valuable the indicator is or how easy the changes are.

                          I asked because I see some staff members posted their indicators on the repository so I wonder whether they may help a bit with updating the indicators even if it's done at minimum effort or on an adventitious and occasional basis.

                          Thank you for your clarification.

                          Comment


                            #14
                            Profitmake,

                            The reason we cannot maintain the code is because we will not be able to go through hundreds and hundreds of indicators and decipher hundreds of lines per indicator for what the original author was intending to do with their code. Thank you for the suggestion though. It may be something we can look into when not all of our resources are tied up on critical NT7 tasks.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Yes it's reasonable not to promise yourself to do it. But don't be too rigid on that because sometimes it may only require an easy or quick fix (well maybe just some small things are broken). Why not just fix it for the benefits of all customers if it only takes a few minutes to do?

                              I realise not all situations are equal. Of course you shouldn't try hard to do if the indicators are really complicated or the codes are too messy to decipher. Thus it should be only done on occasional basis or case by case at best.

                              Thank you for your answer. Have a nice day.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
                              23 responses
                              121 views
                              0 likes
                              Last Post cmtjoancolmenero  
                              Started by Quanto, Today, 02:17 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Quanto
                              by Quanto
                               
                              Started by Skifree, Today, 11:21 AM
                              3 responses
                              9 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by manueldecastro, Today, 01:16 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by tradingnasdaqprueba, Today, 03:42 AM
                              9 responses
                              35 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X