Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to export indicators

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

    Trying to export indicators

    When I try to export (any of my custom) indicators, NT will show a popup reading

    "Error in compile process: The length should not be smaller than 0 (zero). Parameter name: length" (second part translated to English)

    I have not used this parameter name in any of my indicators. The message shows up for any indicator I try to export.

    Can I simply copy the indicators I want to save to another directory and then reimport them to the NT directory?

    #2
    Harry,

    Can you compile? Open any script and press F5 to compile. We do not recommend manually moving files around.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Compiling works for all indicators. Just checked with my C#editor: The only indicator that uses "length" is RSS (native NT indicator). Cannot delete it.

      Originally posted by NinjaTrader_Josh View Post
      Harry,

      Can you compile? Open any script and press F5 to compile. We do not recommend manually moving files around.

      Comment


        #4
        Please compile in the provided NinjaScript Editor instead of a 3rd party editor.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I am only compiling with NT editor. The other editor was just faster to load and search (files not saved).

          Comment


            #6
            Harry,

            Then it is evident that something may have gotten corrupted. I suggest you back up your My Documents\NinjaTrader 6.5\bin\Custom\Indicator and Strategy folders. Also backup anything else you want like workspaces.

            Then uninstall NT6.5, delete My Documents\NinjaTrader 6.5, reinstall NT6.5. To bring your files back, copy them back into the directory and then go into the NinjaSript Editor and press F5 to compile.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              That is what I would have done anyhow (if you did not tell me not to copy files around...). I just checked the logfile. Whatever indicator I try to export the logfile reads

              "Parametername: length
              Error Compiling export sources. Then listing errors CS0103, CS 0118...

              Comment


                #8
                Like I said Harry, it is evident that something has gone awry. Those types of errors should be picked up when you compile normally, not just when you try to export. You will need to reinstall.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Just reinstalled NT from scratch after renaming NinjaTrader directory. Only copied indicators and templates for charts and market anlayzer to the new installation. Now I have exactly the same problem again with the newly installed NT.

                  All indicators can be easily compiled via F5 and worl correctly on the charts. This is what the logfile shows: AutoTrendLine (downloaded from the FORUM) is just an example. All the other indicators behave in the same way.

                  02.03.2009 23:46:39|0|4|Error in compile process: Die Länge darf nicht kleiner als 0 (null) sein.
                  Parametername: length
                  02.03.2009 23:46:39|2|4|Error compiling export sources: c:\...\NinjaTrader 6.5\bin\Custom\Indicator\AutoTrendLine.cs(62,28) : error CS0103: Der Name Swing ist im aktuellen Kontext nicht vorhanden.
                  02.03.2009 23:46:39|2|4|Error compiling export sources: c:\...\NinjaTrader 6.5\bin\Custom\Indicator\AutoTrendLine.cs(63,27) : error CS0103: Der Name Swing ist im aktuellen Kontext nicht vorhanden.
                  02.03.2009 23:46:39|2|4|Error compiling export sources: c:\...\NinjaTrader 6.5\bin\Custom\Indicator\AutoTrendLine.cs(79,31) : error CS0103: Der Name Swing ist im aktuellen Kontext nicht vorhanden.
                  02.03.2009 23:46:39|2|4|Error compiling export sources: c:\...\NinjaTrader 6.5\bin\Custom\Indicator\AutoTrendLine.cs(80,29) : error CS0103: Der Name Swing ist im aktuellen Kontext nicht vorhanden.
                  02.03.2009 23:46:39|2|4|Error compiling export sources: c:\\NinjaTrader 6.5\bin\Custom\Indicator\CMIBollinger.cs(52,14) : error CS0118: NinjaTrader.Indicator.SMA ist ein Typ, wird jedoch als Variable verwendet.

                  Comment


                    #10
                    Harry,

                    Do NOT move in any of your scripts. Just leave it as a clean install and then make a new script. Then try to export the new script.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      I do not understand. I use some customized indicators, that are tested, compiled and that work reliably on my charts. I need those and to use them they need to be in that directory. That is the reason I copied them there.

                      Now, if I try to export some of these, I get funny error messages relating to a parametername length: There is no such name within the custom indicators. Some of the indicators call other indicators (such as EMA and MACD), and I can see from the logfile that one of the problems is that those other indicators being called are not recognized by the Export NinjaScript Utility.

                      The result is that none of the (rather simple) indicators can be exported. I really do not understand what NT is about. I assume that the "Export NinjaScript" Utility is not working as it should. I do not see a big problem here, because I can copy these files manually. But what is the "Export NinjaScript" utility for, if it cannot be used?

                      Comment


                        #12
                        I also have this problem and I also have german settings (and the german version of the NET framework). Maybe this causes the problem. Exporting an indicator has never worked for me!!

                        And please dont tell me to repair the database!

                        Comment


                          #13
                          @GATT1:
                          - running a German .NET version is not related
                          - not sure why you think we would recommend repairing the DB as there are issues with NinjaScript objects
                          - a member of our support team will follow up tomorrow

                          @Harry: We recommended several times not to move NS files manually (unless advised by our support team). This may cause issues down the road. I again suggest staying clear of that to avoid future trouble.

                          I suggest trying a fresh start:
                          - backup your NinjaScript objects manually copying the folder <my documents>/NinjaTrader6.5/bin/Custom to a folder of your liking
                          - uninstall NT
                          - manually remove all folders in <my documents>/NinjaTrader6.5/bin/Custom
                          - reinstall NT

                          You now should have a consistent installation. Please verify that exporting a standard indicator like SMA now works as expected.

                          If that is the case you then may manually copy your backed up custom NS objects file by file to the original destination, making sure after every file:
                          - NT still would compile
                          - you would be able to export the just copied NS object

                          Comment


                            #14
                            Exporting files does not work

                            @Dierk:

                            I had to move the indicator files manually, because the exporting utility did not work. This is what I did:

                            Saving my indicators and templates. Then uninstalled NT completely including all directories (renamed NT 6.5. as usual). Reinstalled NT completely. Reloaded all data via IB (which takes some time). Then recopied (there is no other way to do it and it was also suggested by Josh, see below) indicators and templates back into their directories. Opened indicators and saved the compiled indicators via F5 to be sure they are recognized by NT. Rebuilt all workspaces manually.

                            Still this does not help. The export utility does not work.

                            However, I was able to export some (the more complicated Pivots and Fibonacci) indicators that I coded myself. These indicators do not call other indicators or NT methods. I have a suspicion - see logfile - that indicators such as MACD or EMA called within inidcators can not be interpreted by the export utility.

                            I will send you the logfile.

                            Comment


                              #15
                              Definitely another bug

                              Hello BillCh.

                              thanks for your answer. This confirms the bug. You are right. I am always asked to reinstall NT, have done that about a 100 or more times now. The major problem with NT is : It is a fantastic tool easy to use and with potentially unlimited possibilities and a powerful scripting language. So you do not want to let it go, because it is really sexy.

                              But with all the bells and whistles it has, it is simply not reliable yet. If there is one thing I could ask support for: Please work through the code of NT and get rid of all the minor and major bugs, even if some of the new developments are postponed.

                              This is just one of the minor bugs (I do not really mind copying the indicator files ...), but it just adds to all the little nuisance.

                              I appreciate however that there is a forum, where we can openly discuss these matters, so there is still hope that NT will improve!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by CortexZenUSA, Today, 12:53 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by CortexZenUSA, Today, 12:46 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by usazencortex, Today, 12:43 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post usazencortex  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              168 responses
                              2,266 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X