Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator and Strategy Class Hierarchy

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

    Indicator and Strategy Class Hierarchy

    Hello everyone,

    I want to write a class that does stuff and I want to call it from either an Indicator or a Strategy. I also want it to have, for convenience, the strategy or indicator itself as a private field. Since both Strategy and Indicator behave in similar ways: I mean they both have sort of the same fields/methods, I suppose they both inherit the same class. Which is it? How can I explore the class hierarchy of a ninjascript class?

    Thanks!

    #2
    nicanor.babula, there are the Indicator and Strategy base classes you inherit from, for your own works you could extend them via partial classes and custom methods you want to make accessible - https://www.ninjatrader.com/support/...ed_methods.htm

    Comment


      #3
      Thanks for the reply.

      Is there a class inherited by both Indicators and Strategies?

      Comment


        #4
        Strategies would be using NinjaTrader.Indicator as well, so adding partials here would be good.

        Comment


          #5
          Thank you very much! Will do so.

          Cheers

          Comment

          Latest Posts

          Collapse

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