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 mattbsea, Today, 05:44 PM
        0 responses
        3 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        31 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,282 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        20 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Working...
        X