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

Set background color for different panels

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

    Set background color for different panels

    Hello,
    I have a chart with 3 panels each with a different Data series and I'd like to set the background color to be a different color for each panel.
    I'll attach an image of something I found online which is what I want to do but I can't find how to do it.
    All I can find related to this is BackBrush but I can't seem to get the same effect as the attached image. I get a left margin that I can't control and if i scroll right the BackBrush color only covers the bar background area but not the actual panel. How could this be done? Thank you.

    #2
    Hello Catalon,

    There are not any internal methods or properties documented by NinjaTrader to accomplish this.

    It would be necessary to add 3 instances of an indicator to each panel, that render a rectangle in OnRender(), that is not in the hit test, to achieve this.

    The SampleCustomRender indicator shows how to render a rectangle.

    Below are links to the help guide.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Catalon View Post
      Hello,
      I have a chart with 3 panels each with a different Data series and I'd like to set the background color to be a different color for each panel.
      I'll attach an image of something I found online which is what I want to do but I can't find how to do it.
      All I can find related to this is BackBrush but I can't seem to get the same effect as the attached image. I get a left margin that I can't control and if i scroll right the BackBrush color only covers the bar background area but not the actual panel. How could this be done? Thank you.
      A quick and easy way to do this would be to use the Repeater Indicator. Just change the start time to 00:00:01 and leave the endtime to 00:00:00
      Attached Files

      Comment


        #4
        Originally posted by cutzpr View Post

        A quick and easy way to do this would be to use the Repeater Indicator. Just change the start time to 00:00:01 and leave the endtime to 00:00:00
        That is perfect, thank you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        9 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        20 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X