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 algospoke, Yesterday, 06:40 PM
          2 responses
          23 views
          0 likes
          Last Post algospoke  
          Started by ghoul, Today, 06:02 PM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          45 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          22 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          181 views
          0 likes
          Last Post jeronymite  
          Working...
          X