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

The namespace `NinjaTrader.Strategy´ already contains...

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

    The namespace `NinjaTrader.Strategy´ already contains...

    Hi There

    I am just trying to compile my first NT7 script and am getting this error " The namespace ´Ninja Trader.Strategy´ already contains a definition for `Div1728Stop20Target50` "

    That is despite there being no reference to that strategy in my code below??

    Thanks for the help in advance.
    Attached Files

    #2
    Hello GKonheiser,
    You have used the OnBarUpdate twice.

    Line no. - 67 protected override void OnBarUpdate()

    Line no. - 82 protected override void OnBarUpdate()

    You can only use it once. Please rectify it and try to recompile your code.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi JoyDeep

      Thanks for the help. Have corrected that but still have the same Error as before?

      Comment


        #4
        Also where it lists the NT Script errors it refers to the file Div1728Stop20Tarrget50.cs when I have saved this strategy as DIVEMA, (See attachment)?
        Attached Files

        Comment


          #5
          Hello GKonheiser,
          The error is coming from another NinjaScript code namely Div1728Stop20Tarrget50.cs

          You have to rectify or remove that NinjaScript code to compile it successfully.
          JoydeepNinjaTrader Customer Service

          Comment


            #6
            I am getting an error when I try and delete any strategy. Driving me nuts!

            Comment


              #7
              Hello GKonheiser,
              Are you using any third party NinjaScript code?

              Can you upload a screenshot of the error you are receiving.

              To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

              For detailed instructions please visit the following link

              How to take a screenshot on your smartphone, tablet, notebook or desktop computer
              JoydeepNinjaTrader Customer Service

              Comment


                #8
                No 3rd party code. just stuff that I and a college and written. Here is the screen shot.
                Attached Files

                Comment


                  #9
                  Hello GKonheiser,
                  The Div1728Stop20Tarrget50.cs file is referenced to other NinjaScript files. Unless you remove all dependency NinjaScript files, you cannot delete it.

                  If you are not sure how to rectify it, please send your contact number to support[AT]ninjatrader[DOT]com

                  Please append Attn:Joydeep in the subject line of your email and give a reference of this thread in the body of the email.

                  I look forward to assisting you further.
                  JoydeepNinjaTrader Customer Service

                  Comment


                    #10
                    Have sent number.

                    : )

                    Comment


                      #11
                      Top rate fast support. Thank you very much JoyDeep. ; )

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by TradeForge, 04-19-2024, 02:09 AM
                      2 responses
                      28 views
                      0 likes
                      Last Post TradeForge  
                      Started by aprilfool, 12-03-2022, 03:01 PM
                      3 responses
                      327 views
                      0 likes
                      Last Post NinjaTrader_Adrian  
                      Started by giulyko00, Today, 12:03 PM
                      1 response
                      5 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by f.saeidi, Today, 12:14 PM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by AnnBarnes, Today, 12:17 PM
                      1 response
                      2 views
                      0 likes
                      Last Post NinjaTrader_Zachary  
                      Working...
                      X