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

Duplicate Method Names

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

    Duplicate Method Names

    Hi,

    I am getting the duplicate method names error when importing my custom indicator.

    I have scanned the forums and the suggested fixes have not helped me, but I can add that -

    - The error occurs whether or not I use CliSecure to encrypt
    - I have tried importing my indicator into a fresh and clean installation of NT, with no custom source files installed
    - I can copy the source file to the fresh NT installation and compile it without error
    - the source file includes one public enum
    - the source file uses the VOL.cs file which it says it needs to include when it exports

    Any suggestions?

    Thanks,
    Will.

    #2
    Will,

    Thank you for your posting.

    I believe this is because of the public enum that you are calling. If you are calling that public enum from any other indicator NinjaTrader will see this as a duplicate method error.

    Is this being called within the Indicator class or outside of it?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,

      I doubt that there is another indicator with the same name because I am trying to install it on a clean installation of NT.

      It is declared outside the namespace, and used only within the indicator.

      note that it compiles and run's fine, its only when I export it and then try to import it that the problem occurs.

      Will.

      Comment


        #4
        Will,

        Are you importing the system on the same computer you have the source code?
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          No, its a different computer with a fresh install of NT.

          Comment


            #6
            Will,

            Can you send me the exported zip folder, so that I may test it on my end?

            You can send the folder to support[at]ninjatrader[dot]com with ATTN Cal in the subject and a reference to this thread in the body.

            Thank you for your patience.
            Cal H.NinjaTrader Customer Service

            Comment


              #7
              Was a solution found for this? Is there a particular coding practice that causes this to happen?

              Fortunately, I know how to undo the problem (if the import breaks NinjaTrader), but not prevent it from happening.

              The behavior seems to vary from machine to machine as well, which makes it difficult to debug.

              Thanks!

              Comment


                #8
                No,

                I did not find a solution. From memory I think I ended up renaming the enum and the problem went away... even though I could not find that enum anywhere else.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Waxavi, Today, 02:10 AM
                0 responses
                3 views
                0 likes
                Last Post Waxavi
                by Waxavi
                 
                Started by TradeForge, Today, 02:09 AM
                0 responses
                7 views
                0 likes
                Last Post TradeForge  
                Started by Waxavi, Today, 02:00 AM
                0 responses
                2 views
                0 likes
                Last Post Waxavi
                by Waxavi
                 
                Started by elirion, Today, 01:36 AM
                0 responses
                4 views
                0 likes
                Last Post elirion
                by elirion
                 
                Started by gentlebenthebear, Today, 01:30 AM
                0 responses
                4 views
                0 likes
                Last Post gentlebenthebear  
                Working...
                X