• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color both background of price chart and indicator panel

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

    Color both background of price chart and indicator panel

    Hello,

    I have a indicator which has a panel to display plots separate from the price panel.

    I would like to be able to color both the background of the indicator and the price panel.
    When I use BackColor, it colors the background of the indicator panel (which I use for one purpose). How do I color the background of the price panel for another purpose?

    Thanks.

    #2
    Hello wintermelon,

    Thank you for your post.

    You can use BackColorAll to color all panel backgrounds on the chart. You can find information on BackColorAll at the following link: http://www.ninjatrader.com/support/h...ckcolorall.htm

    You would not be able to color the price panel alone without the indicator being plotted in that panel as well and using BackColor. Otherwise you can use BackColorAll to color all panels.

    You can take a look at the following thread for information on coloring the price panel and indicator panel differently with unsupported methods: http://www.ninjatrader.com/support/f...ad.php?t=52870

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Patrick, looks like it requires the use of unsupported methods.

      I'll expose a variable and create another indicator to read that just to paint the background of the price panel. It's probably easier than fiddling with ChartControl.

      Comment


        #4
        Hi,

        BackColor works on the indicator panel only. ChartControl.BackColor works on the entire chart - price oppanel and indicator panels. Use ChartControl.BackColor in OnStartUp() to set the color for the price and indicator panels. Then use BackColor to set the color of the indicator panels. Hope this helps.

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello wintermelon,

          Thank you for your post.

          You can use BackColorAll to color all panel backgrounds on the chart. You can find information on BackColorAll at the following link: http://www.ninjatrader.com/support/h...ckcolorall.htm

          You would not be able to color the price panel alone without the indicator being plotted in that panel as well and using BackColor. Otherwise you can use BackColorAll to color all panels.

          You can take a look at the following thread for information on coloring the price panel and indicator panel differently with unsupported methods: http://www.ninjatrader.com/support/f...ad.php?t=52870

          Please let me know if you have any questions.
          We can still use supported methods to do this, assuming that you know the background color of your chart (say White):

          BackColorAll = Color.Red; // highlight the background of the PRICE panel in red
          BackColor = Color.White; // restore the background of the INDICATOR panel
          To have a universal solution, you will still need to access the unsupported property ChartControl.BackColor to get the background color of your chart programmatically:
          BackColorAll = Color.Red; // highlight the background of the PRICE panel in red
          BackColor = ChartControl.BackColor; // restore the background of the INDICATOR panel
          The order is critical. Make sure you call BackColorAll first, and BackColor second.

          The only drawback is that if you have more than 2 panels, then all the panels (except the one where we attach our programmed indicator) will have the background effect. The solution is perfect if we have exactly 2 panels.

          Please see the attached screenshot.

          Thanks.
          Pi
          Attached Files
          Last edited by ninZa; 12-08-2014, 07:48 PM.
          ninZa
          NinjaTrader Ecosystem Vendor - Ninza

          Comment


            #6
            At one time I did have a indicator that would paint background with the 'Slope MA' It had option for selecting background or not. I'm having a hard time bringing up this indicator in the 'search' window.

            I think it was called ... ana slope .. ? something like that? I'm still looking for it.

            Comment


              #7
              Hello trdninstyle,

              Thank you for your post and welcome to the NinjaTrader Support Forum!

              I was unable to locate such an indicator based off of your description. However, one of our members may be familiar with the indicator you are looking for.
              Patrick H.NinjaTrader Customer Service

              Comment


                #8
                Thank you Patrick.. sorry it took so long to get back.. wasn't use to posting & reading responses. Just the other day you helped me over the ph. w/ adding 2 charts in one but in unirenko which we found out it can't do it. So I can read trigger lines from alt charts on 1 chart.

                Go Bears!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by martyn73, Today, 05:27 PM
                0 responses
                5 views
                0 likes
                Last Post martyn73  
                Started by MichaelAlexander, 02-22-2017, 05:06 AM
                5 responses
                1,402 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by walter739, Today, 11:56 AM
                3 responses
                10 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by kevinfloresz, Today, 09:46 AM
                4 responses
                29 views
                0 likes
                Last Post kevinfloresz  
                Started by digibob, 12-13-2019, 10:01 PM
                7 responses
                20 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Working...
                X