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

NT Version (8.1.2.0) import error with a protected compiled assembly

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

    NT Version (8.1.2.0) import error with a protected compiled assembly

    Hi, with the new version (8.1.2.0) it is no longer possible to import a protected compiled assembly!
    Exporting works without errors, but an error is displayed when importing.
    This apparently only affects those with Agile.net protected version
    Agile.net version: 6.6.0.35

    Click image for larger version

Name:	NinjaTrader_AfB2ecUIK4.jpg
Views:	648
Size:	90.6 KB
ID:	1275181

    I have no problems with the previous version (8.1.1.7).

    Here is a video: http://www.youtube.com/watch?v=ZoO2TJ6AGFU
    Last edited by sidlercom80; 10-28-2023, 10:33 AM.
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    What exactly is the error message?

    Sorry, your video is not clear enough for me
    to read the small print of the error message.

    Comment


      #3
      Originally posted by bltdavid View Post
      What exactly is the error message?

      Sorry, your video is not clear enough for me
      to read the small print of the error message.

      you can see it in the picture, no?
      sidlercom80
      NinjaTrader Ecosystem Vendor - Sidi Trading

      Comment


        #4
        Ah yes, thank you, I can zoom in to see it ... much better.

        But, sorry, I can't read the end of the error message.

        Is that German?

        Comment


          #5
          It almost looks like the video shows you trying to
          import the same assembly you just exported.

          Is that correct?

          Comment


            #6
            Originally posted by bltdavid View Post
            Ah yes, thank you, I can zoom in to see it ... much better.

            But, sorry, I can't read the end of the error message.

            Is that German?



            It almost looks like the video shows you trying to
            import the same assembly you just exported.

            Is that correct?​
            yes, that is German, and yes same assembly
            sidlercom80
            NinjaTrader Ecosystem Vendor - Sidi Trading

            Comment


              #7
              Does your export have any enumerated types in it?

              Are you trying to import the assembly onto the same NinjaTrader that also has the source version you just exported?
              Bruce DeVault
              QuantKey Trading Vendor Services
              NinjaTrader Ecosystem Vendor - QuantKey

              Comment


                #8
                Originally posted by QuantKey_Bruce View Post
                Does your export have any enumerated types in it?

                Are you trying to import the assembly onto the same NinjaTrader that also has the source version you just exported?
                1. No
                2. Yes

                here is the script. A new empty script made by NT.
                Attached Files
                sidlercom80
                NinjaTrader Ecosystem Vendor - Sidi Trading

                Comment


                  #9
                  Originally posted by sidlercom80 View Post
                  yes, that is German, and yes same assembly
                  I don't read German, what does the error message say in English?

                  Comment


                    #10
                    NinjaTrader_ChelseaB We're going to need help with this one. I agree this protected export functionality appears to be broken on 8.1.2.0 and was able to reproduce the issue described upthread.

                    To do so, here is what I did:
                    • I downloaded your MyCustomIndicator.cs which, as you say, is a completely empty "new indicator" named MyCustomIndicator.cs with no code or variables whatsoever.
                    • I compiled it, to make sure it would compile, on 8.1.2.0.
                    • I exported it as a compiled, protected assembly. This machine has the full Agile.NET 6.6.0.37.
                    • I deleted the MyCustomIndicator.cs and recompiled without it.
                    • I attempted to import the compiled, protected assembly made in the prior step.
                    The resulting trace looks like this:

                    2023-10-29 14:29:42:333 WARNING: Error compiling import assembly: C:\Users\Bruce DeVault\Documents\NinjaTrader 8\bin\Custom\MyCustomIndicator.cs(60,21): error CS0234: The type or namespace name 'MyCustomIndicator' does not exist in the namespace 'NinjaTrader.NinjaScript.Indicators' (are you missing an assembly reference?)

                    The empty indicator looks like this:

                    Code:
                    namespace NinjaTrader.NinjaScript.Indicators
                    {
                        public class MyCustomIndicator : Indicator
                        {
                            protected override void OnStateChange()
                            {
                                if (State == State.SetDefaults)
                                {
                                    Description = @"Enter the description for your new custom Indicator here.";
                                    Name = "MyCustomIndicator";
                                    Calculate = Calculate.OnBarClose;
                                    IsOverlay = false;
                                    DisplayInDataBox = true;
                                    DrawOnPricePanel = true;
                                    DrawHorizontalGridLines = true;
                                    DrawVerticalGridLines = true;
                                    PaintPriceMarkers = true;
                                    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
                                    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
                                    //See Help Guide for additional information.
                                    IsSuspendedWhileInactive = true;
                                }
                                else if (State == State.Configure)
                                {
                                }
                            }
                    
                            protected override void OnBarUpdate()
                            {
                                //Add your custom indicator logic here.
                            }
                        }
                    }​
                    Bruce DeVault
                    QuantKey Trading Vendor Services
                    NinjaTrader Ecosystem Vendor - QuantKey

                    Comment


                      #11
                      The same procedure repeated, but without making it a PROTECTED assembly (just a compiled one, which does not use Agile.NET) works fine. To have a clean test, I recommend that after you remove the source version and recompile, you restart the platform so you're absolutely sure it isn't confused by the prior incarnation of the indicator for the testing purpose.
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment


                        #12
                        There is a chance it is failing for me on the full Agile.NET but might succeed on the NT-specific version. But, if this is what it looks like at the surface, it means all commercial projects will have to remain on 8.1.1.7 for now because we can't make a compiled protected assembly that imports.
                        Bruce DeVault
                        QuantKey Trading Vendor Services
                        NinjaTrader Ecosystem Vendor - QuantKey

                        Comment


                          #13
                          Originally posted by sidlercom80 View Post
                          Hi, with the new version (8.1.2.0) it is no longer possible to import a protected compiled assembly!
                          Thank you for taking the time to report this. But, I just want to clarify something here - it's not that it's no longer possible to import a protected compiled assembly - it's that it's no longer possible on 8.1.2.0 to PRODUCE a protected compiled assembly that imports. To the best of my awareness, all protected compiled assemblies produced on 8.1.1.7 still import correctly on 8.1.2.0.
                          Bruce DeVault
                          QuantKey Trading Vendor Services
                          NinjaTrader Ecosystem Vendor - QuantKey

                          Comment


                            #14
                            Yes, exactly. Thank you Bruce for checking and confirming the problem.
                            sidlercom80
                            NinjaTrader Ecosystem Vendor - Sidi Trading

                            Comment


                              #15
                              To me, however, that means that NT didn't check this at all before releasing the update, otherwise they would have discovered the problem themselves. just unbelievable..
                              sidlercom80
                              NinjaTrader Ecosystem Vendor - Sidi Trading

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by fx.practic, 10-15-2013, 12:53 AM
                              5 responses
                              5,403 views
                              0 likes
                              Last Post Bidder
                              by Bidder
                               
                              Started by Shai Samuel, 07-02-2022, 02:46 PM
                              4 responses
                              94 views
                              0 likes
                              Last Post Bidder
                              by Bidder
                               
                              Started by DJ888, Yesterday, 10:57 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by MacDad, 02-25-2024, 11:48 PM
                              7 responses
                              158 views
                              0 likes
                              Last Post loganjarosz123  
                              Started by Belfortbucks, Yesterday, 09:29 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post Belfortbucks  
                              Working...
                              X