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

Using Classes with NT8

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

    Using Classes with NT8

    What is the proper process to use classes for our Indicators and or Strategies? Also what directory do we place these?

    I tried placing my partial class in the AddOn directory and it crashed my NT8.


    #2
    Hello r3n3v,

    Custom classes that do not inherit from NinjaTrader classes are fine in custom namespaces.

    The Addon directory would be the approach place.

    Partial classes can also be used. Below is a link to an example.
    Explanation: I wrote a base class Indicator class that I'm using to inherit all my other indicators from. So this baseclass is defined as: namespace NinjaTrader.NinjaScript.Indicators.AssistedTrades { public class ATBaseIndicator: Indicator { ... } } And any other indicator is defined as: namespace NinjaTrader.NinjaScr
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the link. However I noticed that attached example doesn't show a a proper example. Can you provide one?

      Comment


        #4
        Hello r3n3v,

        I'm not sure that I understand.

        The PartialClasssesIndicatorExample file has examples of partial classes for Indicators, PartialMethodCallsCustomInidcatorrExample is an indicator that uses those partial classes.

        Can you clarify how this is not an example of partial classes?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I apologize. I opened the wrong file. You are correct.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by prdecast, Today, 06:07 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Christopher_R, Today, 12:29 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by chartchart, 05-19-2021, 04:14 PM
          3 responses
          577 views
          1 like
          Last Post NinjaTrader_Gaby  
          Started by bsbisme, Yesterday, 02:08 PM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by i019945nj, 12-14-2023, 06:41 AM
          3 responses
          60 views
          0 likes
          Last Post i019945nj  
          Working...
          X