Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem converting a custom indicator

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

    Problem converting a custom indicator

    I have an indicator that I developed a while ago. It compiles and works. I wanted to create something new using most of the code as a basis. I "Saved As" the old indicator as the new file name and modified the new file.

    I ran into a couple of errors during compile of the new file.

    In the old file i had a series called ADIPeriod Established at the beginning as "private double", in PROPERTIES I specify

    [Browsable(false)]
    [XmlIgnore()]
    public Series<double> ADIPeriod
    {
    get { return Values[0]; }
    }
    In the new file I changed ADIPeriod to NADIPeriod in both locations and get the following error:

    The type 'NinjaTrader...' already contains a definition for 'NADIPeriod' CODE: CS0102
    Can't see what I'm missing. Any help or suggestions are appreciated.

    Thanks

    #2
    Hello dmking ,

    From whats provided I don't see what that would be. The error mentions NADIPeriod so it would relate to that code.

    You mentioned changing NADIPeriod in both locations but this is the public definition for a Plot so it would only have one definition for this property. That may be where the problem is at, you should only have the AddPlot and then this property which has NADIPeriod. There would otherwise not be a private double for this property.

    You can take a look at the Bollinger indicator for an example of what would be normally required for a plot to have a public property to see if what you have matches that format.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse for the fast response, I'll get into it.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      673 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      577 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X