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

CS0246: The namespace could not be found while exporting of the working indicator.

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

    #31
    "It may or may not be in NinjaTrader code."
    The behavior of the NT8 is contradictory
    Different parts of the application consider the same script as correct (script editor and charting system) and incorrect one (exporting module).
    the Visual Studio does not see any errors in the script.

    It means the exporting module has a bug with the high probability.

    As I said you may select where the bug is located. It may be the charting system or the exporting module. But the bug is obviously persists.
    The dll does not matter antill you fix the inconsistency between the script editor and the exporting module.

    The dll MAY be not ideal of course. But it works with charts and .... MS VS.
    You cannot explain the message from the exporting module. MS VS does not see this error.

    You have the exported file. It means you can check and see what was changed in your code.
    As I understand your code should work the same way as MS VS does. The case is trivial and it is unlikely MS VS has a bug in this place.

    Is my point of view clear?
    Last edited by AlexMocc; 05-14-2021, 03:10 PM.

    Comment


      #32
      Originally posted by bltdavid View Post
      So far, it is clear proof of nothing.
      But I know you are frustrated, that part is very clear.
      See the trivial VS project with the dll and trivial indicator in the zip, please.
      All source files are included, of course.
      I hope you can export this indicator as an assembly.

      Let me know if you need my assistance to install it, please.

      Attached Files

      Comment


        #33
        Excellent!

        The real goal is to get NT Support to look at this, too.

        Thanks for putting this together!

        Comment


          #34
          Originally posted by bltdavid View Post
          Excellent!

          The real goal is to get NT Support to look at this, too.

          Thanks for putting this together!
          Really? Is it too hard to create a such type of the test case?
          I am really disappointed with your approach...

          Comment


            #35
            Hello AlexMocc,

            Thank you for the reply.

            I tried the minimal sample but I see that I was able to export it as a compiled assembly.
            1. I built the vs project, placed the resulting dll into the folder Documents\NinjaTrader 8\bin\Custom
            2. Referenced the dll
            3. Placed the indicator in the Documents\NinjaTrader 8\bin\Custom\Indicators
            4. Compiled
            5. Tools -> Export
            6. Check compiled assembly
            7. Add indicator
            8. Add Reference to dll
            9. Export

            Are these the same steps you followed? I see it exports successfully and then we see the following in the log:

            Time Category Message
            5/17/2021 6:58:40 AM Default Please be aware that the exported NinjaScript Archive File can only be imported if the target PC has the following assembly(s) loaded: NT8 _bugDemo

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #36
              "Are these the same steps you followed? I see it exports successfully and then we see the following in the log:"
              Exactly
              See pictures, please.

              Attached Files

              Comment


                #37
                Hello AlexMocc,

                In the image you are not selecting the dll reference, you just selected the indicator. You need to also add the dll reference to the export list, you should see 2 files listed. Select the Type dropdown and select references, then add your dll.

                7. Add indicator
                8. Add Reference to dll

                If that does not help I would suggest doing a clean install then to verify you can export from that.

                To do a clean install please follow these steps:
                1. Help -> License key -> copy your key
                2. Visit https://ninjatrader.com/PlatformDirect enter your key and download the current release
                3. Exit NinjaTrader
                4. Uninstall NinjaTrader using the windows programs and features menu
                5. Open the folder Documents and rename NinjaTrader 8 to NinjaTrader 8.Old
                6. Install the platform using the setup you downloaded
                7. Re test the situation, you will need to re import the source code and dll from the NinjaTrader 8.Old folder.

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #38
                  It works.
                  Thank you!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by cmtjoancolmenero, Yesterday, 03:58 PM
                  1 response
                  17 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by benmarkal, Yesterday, 12:52 PM
                  3 responses
                  23 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by helpwanted, Today, 03:06 AM
                  1 response
                  20 views
                  0 likes
                  Last Post sarafuenonly123  
                  Started by Brevo, Today, 01:45 AM
                  0 responses
                  11 views
                  0 likes
                  Last Post Brevo
                  by Brevo
                   
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  244 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Working...
                  X