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 LawrenHom, Today, 10:45 PM
            0 responses
            3 views
            0 likes
            Last Post LawrenHom  
            Started by love2code2trade, Yesterday, 01:45 PM
            4 responses
            28 views
            0 likes
            Last Post love2code2trade  
            Started by funk10101, Today, 09:43 PM
            0 responses
            7 views
            0 likes
            Last Post funk10101  
            Started by pkefal, 04-11-2024, 07:39 AM
            11 responses
            37 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Yesterday, 08:51 AM
            8 responses
            44 views
            0 likes
            Last Post bill2023  
            Working...
            X