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 knowmad, Today, 03:52 AM
        0 responses
        14 views
        0 likes
        Last Post knowmad
        by knowmad
         
        Started by tradingnasdaqprueba, Today, 03:42 AM
        0 responses
        11 views
        0 likes
        Last Post tradingnasdaqprueba  
        Started by Haiasi, 04-25-2024, 06:53 PM
        4 responses
        63 views
        0 likes
        Last Post effraenk  
        Started by ccbiasi, 11-23-2017, 06:06 AM
        5 responses
        2,207 views
        0 likes
        Last Post leodavis  
        Started by kujista, Yesterday, 12:39 AM
        2 responses
        14 views
        0 likes
        Last Post kujista
        by kujista
         
        Working...
        X