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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X