Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Static classes and interfaces with NT 8

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

    Static classes and interfaces with NT 8

    with NT 7 I had a static methods that was available to many others indicators.
    I have read somewhere that with NT 8 we have to put these static classes into the AddOns folder. If I do that I do not compile.

    I have put my static class as well as interfaces in the NinjaTrader.NinjaScript.Indicators namespace.

    Is that what I have to do... ? It compiles this way.

    Thanks

    #2
    Yes, assigning the correct Indicators namespace should do the trick and should then be accessible. There is a section on the code breaking changes that covers over this if you have not seen that:



    "Partial Classes (Porting methods and properties from UserDefinedMethods.cs)"
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi blar58,

      I just wanted to add in that you need to put these in the Addons folder so that NinjaTrader does not try and add auto-generated code to the script file.

      Also, yes, the code you add to this file will need to be in the same namespace as the script that will use it.
      So if the script is an indicator that you want to use this class add this to the NinjaTrader.NinjaScript.Indicator namespace.
      If you want the class available to both indicators and strategies, add it to both the NinjaTrader.NinjaScript.Indicators namespace and the NinjaTrader.NinjaScript.Strategies namespace.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thank you for helping me out guys

        Comment

        Latest Posts

        Collapse

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