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

Need to know a class that both indicator and Strategy inherit from

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

    Need to know a class that both indicator and Strategy inherit from

    Good afternoon, I have a class that collects indicator type of information. I want to set it up so that it collects the same information in both indicator and strategy classes( for different purposes). Is there a shared Interface or class that both indicator and strategy share/ inherit from?

    #2
    Hello Yandychang,

    Thank you for your post.

    I would first like to clarify since you have posted in the NinjaTrader 7 section of the forum; are you looking for this information for developing in NinjaTrader 7 or in NinjaTrader 8? There is some basic information pertaining to both versions and how they are different from each other on the Code Breaking Changes page under the header "Partial Classes (Porting methods and properties from UserDefinedMethods.cs)"


    I look forward to your clarification.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Post was meant for Ninjatrader 8.

      Comment


        #4
        Hello Yandychang,

        Thank you for your reply.

        I have moved the topic to the NinjaTrader Desktop > General Development section accordingly. My colleague has created an example of using a static property that shares information between indicator and strategy instances that may be found in the following post:


        In NinjaTrader 8, both indicators and strategies are part of the NinjaTrader.NinjaScript namespace. Adding a method to that namespace would be difficult and is not documented nor supported, so what Chelsea does in that example is used the fully qualified namespace.

        Please let us know if we may be of further assistance.
        Emily C.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Today, 09:49 PM
        0 responses
        6 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        8 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        9 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,975 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X