Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator - 2nd dataseries - new panel

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

    indicator - 2nd dataseries - new panel

    Hello,

    plotting a customized indicator in a new panel below the chart I can do but how can this be done when the indicator refers to another dataseries? With Add(PeriodType.Range,80); the panel is empty.

    When I add another range bar dataseries then there is strange spacing between the bars of the primary dataseries.

    When I want to solve this within a strategy how how can I bring up please in a new panel eg

    if (Falling(MACD(BarsArray[1],12,26,9).Avg)== true)
    {BackColor=Color.MistyRose;}

    Thanks
    Tony

    #2
    Tony,

    There would be no change needed for this would work with the panel that the indicator is applied too. What indicator is it applied too?

    Have you added the Print()'s needed to make sure this code is running.

    As far as the chart looking weird this is expected with a second data series. Since both bars share the same time scale on the bottom.

    -Brett

    Comment


      #3
      Hi Brett,

      thanks for your reply.

      Its only like I wrote eg

      if (Falling(MACD(BarsArray[1],12,26,9).Avg)== true)
      {BackColor=Color.MistyRose;}

      but the panel is empty.

      When I do this in the strategy then the first panels background is changed - what do I have to add for having the panel 2 changed? (I can do my other indicators then)

      couldnīt find it on the NT-help -website

      Thanks
      Tony


      Originally posted by NinjaTrader_Brett View Post
      Tony,

      There would be no change needed for this would work with the panel that the indicator is applied too. What indicator is it applied too?

      Have you added the Print()'s needed to make sure this code is running.

      As far as the chart looking weird this is expected with a second data series. Since both bars share the same time scale on the bottom.

      -Brett

      Comment


        #4
        Please check this out, should do what you need.

        Comment


          #5
          Brett,

          not all panels! I know this indicated in your link!

          I only want to have the panel 2 (or panel 3 changed backcolor). I want to have my charts clean.

          Thanks
          Tony

          Originally posted by NinjaTrader_Brett View Post
          Please check this out, should do what you need.

          http://www.ninjatrader.com/support/h...ckcolorall.htm

          Comment


            #6
            Originally posted by tonynt View Post
            Brett,

            not all panels! I know this indicated in your link!

            I only want to have the panel 2 (or panel 3 changed backcolor). I want to have my charts clean.

            Thanks
            Tony
            You will probably have to use DrawRegion() to do that.

            Comment


              #7
              Can you clarify if you are doing this with an indicator or a strategy?

              I look forward to assisting you further.

              Comment


                #8
                No matter - if with indicator or with strategy. I will use either (I can do it as indicator or I can add it to a script) - if I know how to do this certain "problem".

                I only want to have changed backcolor of panel 2 (or 3 ...) referring to a condition in another than primary dataseries.

                (I could do in a new strategy with overlay = false; but this is really no way to add a new strategy everytime when one needs to plot something in an additional panel.)

                So please how can this be done? I really donīt know how I can explain any more the question (I canīt find an answer on the NT-help-website)

                Best
                Tony

                Originally posted by NinjaTrader_Brett View Post
                Can you clarify if you are doing this with an indicator or a strategy?

                I look forward to assisting you further.

                Comment


                  #9
                  koganam,

                  thank you very much for your reply. But I think this must be possible more easily than with drawregion. I only want to do eg

                  if (Falling(MACD(BarsArray[1],12,26,9).Avg)== true)
                  {BackColor=Color.MistyRose;} //backcolor of a new panel referring to condition in add. dataseries

                  Best
                  Tony


                  Originally posted by koganam View Post
                  You will probably have to use DrawRegion() to do that.

                  Comment


                    #10
                    Hello,

                    In this case the best way to do this will be to create another indicator. That runs on the panel you want the color changed on and use BackColor. This way you can specify the panel.

                    -Brett

                    Comment


                      #11
                      Originally posted by tonynt View Post
                      koganam,

                      thank you very much for your reply. But I think this must be possible more easily than with drawregion. I only want to do eg

                      if (Falling(MACD(BarsArray[1],12,26,9).Avg)== true)
                      {BackColor=Color.MistyRose;} //backcolor of a new panel referring to condition in add. dataseries

                      Best
                      Tony
                      I must be misunderstanding something then, so let me see if I am understanding correctly.
                      1. You have a multiseries indicaator
                      2. For the indicator, Overlay = false, so that the indicator is plotting in another panel.
                      3. You want the BackColor of the indicator panel to change, depending on the behavior of the MACD on the second barSeries.

                      If I have that right, how then does your indicator not do as you wish? What is the actual result of putting up the indicator? The BackColor does not change at all; the BackColor changes on the price chart instead of the indicator panel? What?

                      Comment


                        #12
                        koganam,

                        thank you very much for your reply!

                        Yes this sounds somehow strange maybe but I understand as follows:

                        I could do do with multi-dataseries but when I add to my 5 range bar chart another dataseries with 13 range bars then there is some nasty spacing between my bars of the primary dataseries (this is the information from NT-support: "Unfortunately there is no way to get two range-based charts to display with equal spacing as they are time-independent and thus don't have equal time intervals for each bar.")

                        If this would work fine without spacing - I could to already here.

                        So I ask how I can use eg background coloring (or indicator maybe) of another dataseries - without adding the dataseries to the chart to avoid this nasty spacing.

                        If thereīs an answer Iīm happy.

                        But if it is not possible (to color background referring to add dataseries by an indicator) I would use instead of an indicator a script-strategy as well. But I donīt know "how to change coloring of background of panel2 referring to 2nd dataseries within a NT-sript-strat" (other than with overlay = false in initialize section of the strat as I dont want to have overlay = false in general in the script but only for this condition). How can I grab the panel 2 for this?

                        Thanks
                        Tony


                        Originally posted by koganam View Post
                        I must be misunderstanding something then, so let me see if I am understanding correctly.
                        1. You have a multiseries indicaator
                        2. For the indicator, Overlay = false, so that the indicator is plotting in another panel.
                        3. You want the BackColor of the indicator panel to change, depending on the behavior of the MACD on the second barSeries.

                        If I have that right, how then does your indicator not do as you wish? What is the actual result of putting up the indicator? The BackColor does not change at all; the BackColor changes on the price chart instead of the indicator panel? What?
                        Last edited by tonynt; 01-03-2012, 04:30 PM.

                        Comment


                          #13
                          Originally posted by tonynt View Post
                          ... But I donīt know "how to change coloring of background of panel2 referring to 2nd dataseries within a NT-sript-strat" (other than with overlay = false in initialize section of the strat as I dont want to have overlay = false in general in the script but only for this condition). How can I grab the panel 2 for this?

                          Thanks
                          Tony
                          Tony,

                          I am still at a loss. You mean you want to load an indicator into the price panel, but have that indicator change the BackColor in panel 2?

                          Comment


                            #14
                            koganam,

                            maybe Iīm lost;-) Thanks for your help.

                            I want to load an indicator OF ANOTHER DATASERIES not in the price panel, but only in panel 2.

                            This is possible with adding another dataseries (I have done but there is nasty spacing with range-bars). So to avoid the spacing and do this without adding another dataseries I have to do it with a strategy "to add an indicator (or background coloring referring conditions) of another dataseries in a NT-script". But I do not know how to plot the indicator or background coloring in panel 2. (I can plot in price panel of course - but I can not grab panel 2 for this.) This is all!

                            Thanks
                            Tony



                            Originally posted by koganam View Post
                            Tony,

                            I am still at a loss. You mean you want to load an indicator into the price panel, but have that indicator change the BackColor in panel 2?

                            Comment


                              #15
                              Hi Tony,

                              The two properties discussed:
                              BackColor applies to the panel the indicator is applied in.
                              BackColorAll applies to all panels.

                              There's unfortunately no way to color the panel if the indicator is not applied to it. Hopefully that clarifies things.
                              Ryan M.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by maybeimnotrader, Today, 05:46 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post maybeimnotrader  
                              Started by quantismo, Today, 05:13 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post quantismo  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              8 responses
                              166 views
                              0 likes
                              Last Post jeronymite  
                              Started by cre8able, Today, 04:22 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post cre8able  
                              Started by RichStudent, Today, 04:21 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post RichStudent  
                              Working...
                              X