Announcement

Collapse
No announcement yet.

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 -

    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.

        Comment


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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          133 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          75 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          117 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          113 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          89 views
          0 likes
          Last Post CarlTrading  
          Working...
          X