Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Plot data from Original Class Instance

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

    Using Plot data from Original Class Instance

    Hello!


    I would like to create few indicators (IndicatorA , IndicatorB, etc) based on Plot's data , calculated in one base Indicator and use all Indicators on the same chart.

    Let's say for example that I would use MACD as my Base Indicator and use Avg values in IndicatorA.

    I could use in IndicatorA formula MACD(12,26,9).Avg[0] to reach element 0 in DataSeries containing historical values for Plot Avg.
    In IndicatorA I'll create PlotA.

    In IndicatorB I will use formula to reach PlotA data as IndicatorA.PlotA[0].

    In my understanding all these calls will create few instances of Classes defining MACD and IndicatorA and forcing system to use extra memory and processor power, recalculating the same values few times.

    Do you have way to access data created by original Class Instance(MACD) used to plot actual MACD Indicator on chart?

    Thanks
    YB

    #2
    Unfortunately not. These will be separate instances.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Maybe there is some way to expose IDataSeries object representing The Plot globally?

      Thanks
      Yuliy

      Comment


        #4
        Yuliy,

        Unfortunately this is not supported. I suggest merging your calculations into one script if feasible for what you are trying to do and use multiple plots in the same script.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,

          In this case, could I place Plots from one script on few Panels.

          Thanks
          YB

          Comment


            #6
            Unfortunately not. A single indicator can only populate a single panel. If you instead worked with a strategy, you could however use the StrategyPlot() technique to plot on multiple panels. This would consolidate all your calculations into one script which would not require multiple instances. http://www.ninjatrader.com/support/f...ead.php?t=6651
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              The latest approach sounds promissing.

              Thank you, Josh!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              607 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              353 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              560 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              561 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X