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

Force indicator to plot in specific panel

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

    Force indicator to plot in specific panel

    I have an indicator which puts arrows on the price panel.
    But I would like to plot some other values unrelated to price in a separate panel
    with that same indicator
    As it stands now, regular plot now comes out in the price panel.
    Because the values are not like prices, the price panel gets out of alignment
    and I have to manually move the plot to a new panel when I load the indicator.

    Is there a way in an indicator to say xxx.Panel=2 as when adding a plot to a strategy?

    Thanks in advance.

    #2
    Roland, you could unfortunately not dictate it in the same way when adding indicators to strategies here. Some members have reported success though with dynamically changing the DrawOnPricePanel property in OnBarUpdate to draw on price and non price panels from the same script.

    For the main plots, you would need to set overlay to false in Initialize() to not have it drawing on price per default and 'scrunching' the scales.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Force indicator to plot in specific panel

      As always, thanks Bertrand. I will give these ideas a run.

      Comment


        #4
        Bertrand,

        I have done so, but as I work with different dataseries I´m faced with restrictions now.

        Therefore I have the idea not to plot as indicator but in a strategy because of differnt dataseries I can add there (rangebars that will cause problems in the chart)

        EG "&& (Rising(MACD(BarsArray[8],12,26,9).Avg) == true)
        {BackColor=Color.LightGreen;}

        But how to do for having backcolor in panel2 and not in panel 1?

        Thanks
        Tony

        Originally posted by NinjaTrader_Bertrand View Post
        Roland, you could unfortunately not dictate it in the same way when adding indicators to strategies here. Some members have reported success though with dynamically changing the DrawOnPricePanel property in OnBarUpdate to draw on price and non price panels from the same script.

        For the main plots, you would need to set overlay to false in Initialize() to not have it drawing on price per default and 'scrunching' the scales.

        Comment


          #5
          Originally posted by tonynt View Post
          Bertrand,

          I have done so, but as I work with different dataseries I´m faced with restrictions now.

          Therefore I have the idea not to plot as indicator but in a strategy because of differnt dataseries I can add there (rangebars that will cause problems in the chart)

          EG "&& (Rising(MACD(BarsArray[8],12,26,9).Avg) == true)
          {BackColor=Color.LightGreen;}

          But how to do for having backcolor in panel2 and not in panel 1?

          Thanks
          Tony
          The behavior of BackColor is to color only the Panel in which the indicator is loaded. What am I confused about?

          ref: http://www.ninjatrader.com/support/h.../backcolor.htm

          Comment


            #6
            Tony, were you perhaps using BackColorAll here instead in your scripts?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Hello,

              thanks for you replies.

              To answer in order of appearence;-)

              koganam, this was an example. When I post here eg the MACD avg to plot in another panel and something is not correct or clear 100% (this can be very easy because I can not post the whole coding of an idea) then there will be discussion about the correct syntax. To avoid some misinterpreting and to focus on the core I took "kindergarden-background-coloring". Got me?

              Bertrand with BackColorAll there will be the background of all panels colored, but not eg only panel2 (of 4 panels). How to select one (x) of more (y) panels please? (And I can not have any color more in my price-chart, already looks like Carneval-Rio-Indicator;-)

              Best
              Tony
              Last edited by tonynt; 04-02-2013, 08:32 AM. Reason: typing error

              Comment


                #8
                Thanks Tony, I would do the coloring then in one of your Add()ed indicators and drive to a desired panel as needed - http://www.ninjatrader.com/support/f...ead.php?t=3228
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by DJ888, 04-16-2024, 06:09 PM
                3 responses
                10 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by RookieTrader, Today, 07:41 AM
                0 responses
                3 views
                0 likes
                Last Post RookieTrader  
                Started by maybeimnotrader, Yesterday, 05:46 PM
                1 response
                18 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by Perr0Grande, Yesterday, 08:16 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by f.saeidi, Yesterday, 08:12 AM
                3 responses
                27 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X