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

compiling errors that make no sense

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

    compiling errors that make no sense

    I am getting compiling errors that make no sense (note that I'm using the wizard not manually writing code). The errors all refer to the "name not existing in the current context", when clearly they do.

    I just tried re-compiling a strategy which was successfully created and compiled via the wizard a week ago and got the same "name/context" errors.

    Note that I also conducted back tests and optimizations so I know for a fact that the code is perfectly fine and should compile (as it did a week ago) without such errors.

    I'm quite puzzled.
    Is this a common occurrence?
    Should I re-install the program - or is there an easier fix?

    #2
    Zigman,

    Reinstalling the program wouldn't fix compile errors.

    Is the error you're receiving coming from the strategy you are working with? Or is it from another NinjaScript file? Do you see repeated errors on multiple indicators/strategies or is just one?

    When you compile the strategy, please provide me with the exact error you are receiving.
    MatthewNinjaTrader Product Management

    Comment


      #3
      "name does not exist" screen capture

      Hi Matthew,

      Please see the attached screen capture of entire (very basic) strategy w. compiling errors at bottom.

      Same sort of "name does not exist" errors every time I create/compile code (using wizard all the way thru).

      Attached Files

      Comment


        #4
        Zigman,

        The Compile errors you are receiving are not coming from the strategy you have opened.

        These errors are coming from a strategy named TwoEMAs. Please double click on these errors which should open the strategy that contains the compile error. From there you will need to either debug this strategy or delete it from your system.

        More information on resolving NinjaScript compile errors can be found below:

        MatthewNinjaTrader Product Management

        Comment


          #5
          strategy cannot be deleted

          Second strategy cannot be deleted.

          I followed the instructions here:


          But when I do I get a message saying it cannot be deleted because it is being referenced by other indicators/strategies (which is not true)...

          Comment


            #6
            Zigman,

            If the error states that it is being referenced by another file, this would indeed be the case. You would first need to delete the file that this particular file is using.

            If you're unsure how to proceed to debug these, I would suggest following the instructions to reinstall NinjaTrader without your custom indicators. This should allow you to proceed without the compile errors, however you will lose all custom NinjaScript.

            1) Create a backup file with 'NinjaScript files' unchecked.


            http://www.ninjatrader.com/support/helpGuides/nt7/index.html?creating_a_backup_archive.htm


            2) Uninstall NinjaTrader via the Windows Control Panel-->Add/Remove Programs (XP), Programs and Features (Vista/7).


            3) Delete the My Documents-->NinjaTrader 7 folder. Do not delete the NinjaTrader backup folder.


            4) Clear your browser cache and download and install NinjaTrader at the link below.




            5) Restore your settings and test again for further issues.


            MatthewNinjaTrader Product Management

            Comment


              #7
              strategy is being referenced by another strategy/indicator

              Sorry in advance if this is a NOOB question, but I don't understand how it is possible that the offending strategy is being referenced by another strategy/indicator because it was the one most recently created.

              - That's just not logical.

              To be clear - the strategy I'm trying to delete was the last (i.e. most recent)strategy created (and it was created via the wizard - not coded manually in the editor).

              Your thoughts before I uninstall would be appreciated...

              Comment


                #8
                Hello,

                I would like to remote into your PC to look at this further.

                Please send an email to support[at]ninjatrader[dot]com with Attn: Matthew in the subject line and a reference to this thread.

                Please include a land line phone number and a good date/time you can be reached. I will respond with instructions for remote assistance at that time.
                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by elirion, Today, 09:32 PM
                0 responses
                2 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by cre8able, Today, 09:15 PM
                1 response
                5 views
                0 likes
                Last Post bltdavid  
                Started by cummish, Today, 08:43 PM
                0 responses
                10 views
                0 likes
                Last Post cummish
                by cummish
                 
                Started by Option Whisperer, Today, 07:58 PM
                4 responses
                21 views
                0 likes
                Last Post Option Whisperer  
                Started by ETFVoyageur, 05-07-2024, 07:05 PM
                13 responses
                87 views
                0 likes
                Last Post ETFVoyageur  
                Working...
                X