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

indicator plot

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

    indicator plot

    how do u get one set of values in an indicator to plot on the chart panel 1 and another set of values to plot as oscillator on panel 2

    #2
    Hello fiddy,


    This can't be done from a single indicator. You would have to create two seperate indicators to accomplish plotting two values, where one is in the Price Panel and one is in the Indicator Panel.


    Here is the DrawOnPricePanel Help Guide to assist you further.
    Shawn B.NinjaTrader Customer Service

    Comment


      #3
      shouldnt it be technically still be doable in a single indicator? ofc you would still have to apply the indicator 2 times to the chart. one time for each panel. so its basicly the same has having too diffrent indicators. but at least you could contain all the code in that one indicator file if you so wish to.
      Last edited by BigRo; 12-22-2015, 02:46 PM.

      Comment


        #4
        Originally posted by BigRo View Post
        shouldnt it be technically still be doable in a single indicator? ofc you would still have to apply the indicator 2 times to the chart. one time for each panel. so its basicly the same has having too diffrent indicators. but at least you could contain all the code in that one indicator file if you so wish to.
        You can certainly do the latter. Pretty much that is what the first response said that you should do.

        Comment


          #5
          how can u make a dataset within an indicator accessible to other indicators without plotting them.

          below is what i currently have.
          i can make StDevi accessible to other indicators by plotting them in the origin indicator. i would like to make it accessible but not have to plot Stdev in the original indicator. (i am plotting other datasets in the origin indicator which use StDevi set as part of the calculations)

          protected override void Initialize()
          Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "StdDevi"))

          protected override void OnBarUpdate()
          StdDevi .Set(StdDev(trueRange, LookBack)[0]);

          #region Properties
          public DataSeries StdDevi
          {
          get { return Values[0]; }
          }

          Comment


            #6
            Originally posted by fiddy View Post
            how can u make a dataset within an indicator accessible to other indicators without plotting them.

            below is what i currently have.
            i can make StDevi accessible to other indicators by plotting them in the origin indicator. i would like to make it accessible but not have to plot Stdev in the original indicator. (i am plotting other datasets in the origin indicator which use StDevi set as part of the calculations)

            protected override void Initialize()
            Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "StdDevi"))

            protected override void OnBarUpdate()
            StdDevi .Set(StdDev(trueRange, LookBack)[0]);

            #region Properties
            public DataSeries StdDevi
            {
            get { return Values[0]; }
            }
            You set it up as a DataSeries, not as a Plot.

            ref: http://ninjatrader.com/support/helpG...ries_class.htm

            Comment


              #7
              thanks Koganam for advice. i did try this but then when i created another indicator and refered back to the dataseries i got msg when i tried to compile

              "is inaccessible due to its protection level"

              Comment


                #8
                Originally posted by fiddy View Post
                thanks Koganam for advice. i did try this but then when i created another indicator and refered back to the dataseries i got msg when i tried to compile

                "is inaccessible due to its protection level"
                You must have its access level as public if you want to access it from outside. Let us see your sample code.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by frankthearm, Today, 09:08 AM
                8 responses
                31 views
                0 likes
                Last Post frankthearm  
                Started by NRITV, Today, 01:15 PM
                2 responses
                9 views
                0 likes
                Last Post NRITV
                by NRITV
                 
                Started by maybeimnotrader, Yesterday, 05:46 PM
                5 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by quantismo, Yesterday, 05:13 PM
                2 responses
                20 views
                0 likes
                Last Post quantismo  
                Started by adeelshahzad, Today, 03:54 AM
                5 responses
                33 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X