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

Multiple DataSeries Indicator on Indicator

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

    Multiple DataSeries Indicator on Indicator

    Hello Everyone,

    I am fairly new to programming in NT, I have seen the example of Indicator on Indicator and that seems simple to understand when the second indicator has only one DataSeries in it.

    What I am trying to do is this; lets say Indicator B has 4 DataSeries in it and Indicator A is trying to reference Indicator B DataSeries 4

    How can I do this?

    Thank you fro your Time
    EK

    #2
    Hello Emerald King,

    A good way to find out the syntax for multiple nested indicators is with the Strategy Wizard condition builder. You can select another indicator for the input series as many times as you like. After you've nested a few indicators you can then view the syntax by clicking view code.

    This help guide article can help with this.

    Example SMA nested:
    SMA(SMA(SMA(SMA(SMA(20), 20), 20), 20), 20)[0]


    If you're instead looking for the syntax for multi plot indicators, see this help guide article and use the same principle - Create in condition builder and then view code.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hello Ryan,

      Thanks for taking the time to post a reply. I might have posted this in the wrong forum thread. I am using the Beta of NT7 and cant find anything about the condition builder

      Comment


        #4
        Not What I am looking for I think

        Hello Ryan,

        Ok I found the Conditions Wizard and was able to try to compare my indicator to itself but still didn't see where I could select which plot to compare which plot too even when looking at the code there is no syntax to tell the complier which Plot to use.

        In my Indicator I have this;

        Under Variables
        private DataSeries TA_Yearly; // Yearly
        private DataSeries TA_Quarterly; // Quarterly
        private DataSeries TA_Monthly; // Monthly
        private DataSeries TA_Weekly; // Weekly
        private DataSeries TA_Daily; // Daily

        under the init function
        TA_Yearly = new DataSeries(this, MaximumBarsLookBack.Infinite);
        TA_Quarterly = new DataSeries(this, MaximumBarsLookBack.Infinite);
        TA_Monthly = new DataSeries(this, MaximumBarsLookBack.Infinite);
        TA_Weekly = new DataSeries(this, MaximumBarsLookBack.Infinite);
        TA_Daily = new DataSeries(this, MaximumBarsLookBack.Infinite);

        Add(new Plot(Color.Orange, "Yearly TA"));
        Add(new Plot(Color.Orange, "Quarterly TA"));
        Add(new Plot(Color.Orange, "Monthly TA"));
        Add(new Plot(Color.Orange, "Weekly TA"));
        Add(new Plot(Color.Orange, "Daily TA"));

        Now in my second indicator, I call my first indicator like this
        CD = BarInfo(Adj,N,S,UseMeta)[0];

        And it always returns with the values in TA_Yearly, what I am asking is how to I call BarInfo and return with the TA_Daily?

        does this make sense?
        Thanks
        EK

        Comment


          #5
          Hello EK,

          Great you found the condition builder. It's useful for indentifying syntax created in a point and click interface.

          Here's a couple notes on DataSeries and plots:
          • DataSeries aren't automatically exposed for other indicators.
          • Plots are available, but all the components are needed. You may be missing some.

          See this reference sample for exposing indicator values that are not plots.

          For creating additional plots, the easiest way is with the indicator wizard. It then adds the needed properties section for specifying plots. When you create plots like this through the wizard, you can set the value of the plot without having to create DataSeries.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Thank you

            I have it now, Thank you
            EK

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by geotrades1, Today, 10:02 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by ender_wiggum, Today, 09:50 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by rajendrasubedi2023, Today, 09:50 AM
            1 response
            12 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by bmartz, Today, 09:30 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by geddyisodin, Today, 05:20 AM
            3 responses
            27 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X