Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What does NinjaTrader mean by 'inheritance is not supported'?

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

    #16
    Whilst I agree with the sensible comments from bltdavid, ntbone and QuantKey_Bruce, in the context of the current implementation, the "elephant in the room" here (in this particular invocation of the discussion anyway) is that the current Desktop platform is using years-ago obsolete versions of the Actipro Editor, C#, .NET and other underlying infrastructure. Bring those up-to-date, and then see where the issues lie. They may be resolved or, at the very least, more easily "supported". Short of buying the company and doing it ourselves, what does it take for this to happen?!

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    Comment


      #17
      Hello ntbone, Bruce, jeronymite,

      Yes, these have already been requested.

      The request for supporting abstract classes is being tracked with ID # SFT-341.

      The request for supporting inheritance with indicators and strategies is being tracked with ID # SFT-5158.

      The request for updating NinjaTrader to use the latest .NET and C# versions is being tracked with ID # SFT-3124.

      I will be happy to add your votes to these.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        NinjaTrader_ChelseaB Please advise when each of these requests was first recorded.

        Thanks.

        Update [2023-04-01, NOT April Fool's post!]:
        In the absence of any update from NinjaTrader, the following dates can reasonably be inferred from historical postings:
        • The request for supporting abstract classes is being tracked with ID # SFT-341. <<< 2007-ish [16 years ago]
        • The request for supporting inheritance with indicators and strategies is being tracked with ID # SFT-5158. <<< 2022-ish [last year]
        • The request for updating NinjaTrader to use the latest .NET and C# versions is being tracked with ID # SFT-3124. <<< 2015-2016-ish [7-8 years ago]
        Accurate dates from NinjaTrader always welcome.

        Conclusion: Adjust your expectations accordingly!

        Thanks.​
        Last edited by jeronymite; 03-31-2023, 04:34 PM. Reason: Provide reasonable estimates of dates of requests
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment


          #19
          I know this is an old thread, but I found the thread helpful so I want to add to ntbone's comment

          If you want your indicator to generate the code, it needs to derive from something with the word "Indicator" in the name, and it must be in the same line as the class declaration.
          ...
          I will name my common base class with the name "Indicator" somewhere in it
          You need not name your base class that way if you use the fully-qualified inheritance. This allows unlimited flexibility in naming your base class. For example, the magic code will be generated for the following:
          Code:
              public class VsaChartData : NinjaTrader.NinjaScript.Indicators.Vsa_Base
              {}
          ​
          Second, about the workaround of putting ": Indicator" on the second line -- that does indeed seem to cause the system to believe the code is not an indicator. Not only does that suppress generating magic code (crucial for an abstract class) but it also has the often-requested beneficial side effect of not including that class as an available indicator in the indicators dialog.

          I worry that especially the next-line trick is implementation-dependent and could be seen by some well-meaning developer as a "bug" to get "fixed" in some future release. Furthermore, the parsing evidently sets not-an-indicator when it fails to find "Indicator" in the first line of the declaration. It would seem to be a very simple matter to set the same condition when it sees the word "abstract" because no abstract class can be an indicator. In other words, to be classified as an indicator (to generate magic code and to be included in the list of indicators in the dialog) it must (be derived from Indicator) && (not be abstract). This may not help non-abstract base classes, but let's at least get the simple fix done.
          Last edited by ETFVoyageur; 05-02-2024, 05:31 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          333 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X