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 type 'NinjaTrader.Indicator.Indicator' already contains a definition for

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

    The type 'NinjaTrader.Indicator.Indicator' already contains a definition for

    Hi

    i just started to program in NT7.
    i tried to create a very simple strategy using the wizard.
    after pressing the compile button, i got a lot of errors on the NinjaTrader.Vendor file all looks like the following (with slight change):
    The type 'NinjaTrader.Indicator.Indicator' already contains a definition for 'cacheJurikDMX'.

    this is not file written by me and i dont understand what is is.

    please help

    #2
    kiss987, please try deleting the NinjaTrader.Vendor.cs file from the My Documents/NinjaTrader 7/bin/custom folder and recompiling and see if that fixes the issue.
    AustinNinjaTrader Customer Service

    Comment


      #3
      i did that and also moved other files which caused problems.
      my strategy uses RSI and now i get 3 errors on the RSI file:


      1. The name '_indicator' does not exist in the current context
      2. 'NinjaTrader.Indicator.Indicator' does not implement inherited abstract member 'NinjaTrader.Indicator.IndicatorBase.Initialize()'
      3. 'NinjaTrader.Indicator.Indicator' does not implement inherited abstract member 'NinjaTrader.Indicator.IndicatorBase.OnBarUpdate() '


      thanks in advance

      Comment


        #4
        kiss987,

        Would you be able to post a snippet of the code that is generating errors? If you do not want to post the entire code, you can just send us the lines that are throwing the error or take a screen shot of the errors.
        MatthewNinjaTrader Product Management

        Comment


          #5
          this is the code

          these are the parts which generates the errors. all errors are from the @RSI.cs
          which wasn't written by me - it came with NT7:

          1.
          namespace NinjaTrader.MarketAnalyzer
          {
          public partial class Column : ColumnBase
          {
          /// <summary>
          /// The RSI (Relative Strength Index) is a price-following oscillator that ranges between 0 and 100.
          /// </summary>
          /// <returns></returns>
          [Gui.Design.WizardCondition("Indicator")]
          public Indicator.RSI RSI(int period, int smooth)
          {
          return _indicator.RSI(Input, period, smooth);

          2+3.
          namespace NinjaTrader.Indicator
          {
          public partial class Indicator : IndicatorBase
          {

          3.

          Comment


            #6
            kiss987,

            Thanks for the information - strange this is coming from a system indicator.

            Please try the following steps to reinstall NinjaTrader without your 3rd party add-ons. Note that you will lose all custom and third party NinjaScript files.


            1) Create a backup file with 'NinjaScript files' unchecked.
            http://www.ninjatrader.com/support/helpGuides/nt7/index.html?creating_a_backup_archive.htm
            2) Uninstall NinjaTrader via the Windows Control Panel-->Add/Remove Programs (XP), Programs and Features (Vista/7).
            3) Delete the My Documents-->NinjaTrader 7 folder. Do not delete the NinjaTrader backup folder.
            4) Clear your browser cache and download and install NinjaTrader at the link below.
            http://www.ninjatrader.com/webnew/download_download.htm
            5) Restore your settings and test again for further issues.


            MatthewNinjaTrader Product Management

            Comment


              #7
              new problem

              now it's working, however, now i want to edit my strategy.
              i go to "edit strategy" and press view code, but when i press next...finish, the editor window for some reason is closed.

              Comment


                #8
                found the solution but...

                i had to unlock the code. however i tried to run it just to see how to run a simple strategy.
                i changed the code a bit (see below) and placed the straegy on a chart and enabled it and nothing happen:

                protected override void Initialize()
                {

                CalculateOnBarClose = false;
                }

                protected override void OnBarUpdate()
                {
                // Condition set 1
                if (true)
                {
                DrawArrowDown("My down arrow" + CurrentBar, false, 0, 0, Color.Red);
                }
                }

                Comment


                  #9
                  Kiss,

                  Your Y value draws at 0 so objects will not be visible. Try modifying to use this instead to draw at High + 1 tick:

                  DrawArrowDown("My down arrow" + CurrentBar, false, 0, High[0] + TickSize, Color.Red);
                  Ryan M.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by rocketman7, Today, 01:00 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post rocketman7  
                  Started by wzgy0920, 04-20-2024, 06:09 PM
                  2 responses
                  27 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 02-22-2024, 01:11 AM
                  5 responses
                  32 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 04-23-2024, 09:53 PM
                  2 responses
                  74 views
                  0 likes
                  Last Post wzgy0920  
                  Started by Kensonprib, 04-28-2021, 10:11 AM
                  5 responses
                  193 views
                  0 likes
                  Last Post Hasadafa  
                  Working...
                  X