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

inherit indicator from indicator

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

    inherit indicator from indicator

    I have already a indicator that can calculate mean price level recent,
    now I am thanking about another with more functions,
    I do not want to copy codes from the first,
    I am considering inherit from the first with Ninja Script.
    Could you tell me if I can?
    Thank you so much,
    Yours truely!

    #2
    maorachow, is your mean price level in the indicator a plot? Then you could readily access the return value in another script, as it's already exposed for access.

    If this is an internal data series / variable only, you can expose those with the framework from the reference sample below -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Yeah,I'v study famous BoolSeries carefully,
      I suspect it is a delicate full-fledged solution.Because,It only share a DataSeries,
      The functionality inside may be the real meat wanted,
      eg the callee indicator is chowing index and own sector instruments data and using Manmade Intelligence complex algorithm to judge a decision.
      The Callor indicator belongs to different sector of market,passing different parameter and sector information to callee,then callee indicator share the real meat.
      Question is:
      The callee must be precoded for all sector,and calculated all information,then it could make for different callors.
      That is the mess,what Class inheritage is aiming at.
      Object Oriented Programing must have trinity:Class inheritage,Class Capulation and Multiplex morphology.
      I want dig the rich mine of C# OOP,I dont want to be only shallow BoolSeries.

      Comment


        #4
        maorachow, we can unfortunately not support full inheritance. You can either access Plots or explicitly exposed values / dataseries as shown in our example.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thank you,Bertrand.
          I will try Plots.
          Yours truely.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Segwin, 05-07-2018, 02:15 PM
          14 responses
          1,788 views
          0 likes
          Last Post aligator  
          Started by Jimmyk, 01-26-2018, 05:19 AM
          6 responses
          837 views
          0 likes
          Last Post emuns
          by emuns
           
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          6 responses
          3,293 views
          1 like
          Last Post jgualdronc  
          Started by Touch-Ups, Today, 10:36 AM
          0 responses
          13 views
          0 likes
          Last Post Touch-Ups  
          Started by geddyisodin, 04-25-2024, 05:20 AM
          11 responses
          63 views
          0 likes
          Last Post halgo_boulder  
          Working...
          X