Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Copy an Indicator

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

    Copy an Indicator

    I've got an indicator that is running as designed. I'd like to make a copy of it, change the name, and make some minor modifications to create a new indicator. I can't seem to figure out how to do that. Can anyone help?

    Thanks,
    Paul

    #2
    Hi Lambo,

    Open up the indicator in the NinjaScript Editor. Right click and then click "Save As". Type in a new name and it will make a new copy.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      When I do that and change all instances of the old name to the new name in the code and then compile, I get an error "The namespace NinjaTrader Indicator" already contains a definition for "Old Indicator Name".

      code CS0101

      Thanks,
      Lambo

      Comment


        #4
        You don't need to manually change anything. Just right click->Save As. Type in a new name and then everything is done.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          It doesn't work. I get the error message. I just don't know how to proceed now.

          Comment


            #6
            You got to delete that old one. Name it a different name now. You cant have multiple indicators with the same name.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Josh, I don't think you understand. First of all I copied the original one and changed the name to a new indicator. I edited out all the old references and changed them to the new indicator name. There should have been nothing left of the old indicator in the new one. The whole idea was to keep the old indicator and creating an entirely new one, which I believe I did.

              However, I get that irritating error message which makes no sense.

              Paul

              Comment


                #8
                Paul,

                The error means you have 2 definitions for the same name. You need to remove one of them before it will compile. Do this. Delete your "new indicator". Hit F5 to Compile. Your old indicator should have no problem compiling. Then open your old indicator and right click -> save as. Type in a new name. Do NOT edit anything. Just hit F5 to compile now. You do not need to change anything in your indicator to create a new copy.

                If you still have difficulties you can send me both the old and the new indicators to my email and I will take a look in fixing it up for you. I suspect it may be something you edit that may be causing conflicts.

                josh.peng [at] ninjatrader (dot] com.
                Last edited by NinjaTrader_JoshP; 09-07-2008, 12:08 PM.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Josh, I found the problem. Evidently copies of the original indicator were still in the NT directories. I got rid of all of them except for one which was stashed in ...\NinjaTrader 6.5\bin\Custom. I then went back and compiled the new indicator and it finally worked. The error message it was giving me had nothing to do with what I was currently compiling, but instead was stating that it was unhappy that there was an unresolved problem elsewhere. That doesn't seem very intuitive to me. Oh well, I'm glad I finally got it to work.

                  Thanks for your help and patience,

                  Paul

                  Comment


                    #10
                    Paul,

                    Great! Glad you got it fixed. Basically NinjaTrader needs all NinjaScript files to be free of error before it can compile.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by vantojo, Today, 06:46 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post vantojo
                    by vantojo
                     
                    Started by sidlercom80, Today, 02:40 AM
                    1 response
                    14 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by b16_aln, Today, 01:52 AM
                    0 responses
                    14 views
                    0 likes
                    Last Post b16_aln
                    by b16_aln
                     
                    Started by junkone, Yesterday, 08:55 PM
                    2 responses
                    13 views
                    0 likes
                    Last Post junkone
                    by junkone
                     
                    Started by adaeiqendqw, 01-16-2021, 02:56 AM
                    1 response
                    17 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Working...
                    X