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

Import DLL failed

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

    #16
    Hi Chelsea,
    Thank you for checking.

    On my side importing the source (No-logig.no-references.exports.folder.rar > All.CS.no-references.zip) worked OK as too.

    On my side the DLL (No-logig.no-references.exports.folder.rar > All.DLL.no-references.zip) produced the error CS2046 you mention, please see the attached screenshot.
    The enum instrumentType in question is defined in the AddOn JWcommons.cs, please see the attached screenshot.

    The JW namespace is referenced in the indicator JimUptrent1.cs and all three strategies
    as
    using JW;

    Why the structures in the same namespace(i.e. JW) do not produce an error, but only instrumentType?
    What is wrong with it? thanks
    Attached Files

    Comment


      #17
      Hello utilizator,

      Likely if you use the fully qualified namespace for the instrumentType enum and correct it, there will be an error on the next one down, and then the next one, until all of the calls are changed.

      Remove the using statement. Use a fully qualified namespace when calling that enum.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Hi Chelsea,
        I performed the change, i.e. removed the using statement and using a fully qualified namespace(attached image). I get the same error when trying to import the DLL though.
        The updated CS and DLL archives can be downloaded at https://app.box.com/s/3ms88g2my64daur2g1kr3wjhvng7gszi
        Thank you.
        Attached Files

        Comment


          #19
          Hello utilizator,

          Have you uploaded the incorrect files?

          I started to examine the files and found 'using JW;' in JimUptrend1.

          After seeing this, I didn't keep looking because this may have been the incorrect upload. However, if this was unintentional I would recommend you examine each file and ensure the using 'using JW;' is removed from all files including all indicators.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            Hi Chelsea,
            You are right, I missed to update that file; after correction the DLL successfully imported. Thank you very much!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,605 views
            0 likes
            Last Post aligator  
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            8 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            4 views
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            13 views
            0 likes
            Last Post Javierw.ok  
            Working...
            X