Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Background color based on Indicator state.

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

    Background color based on Indicator state.

    Is it possible to change the background color based on the state of an indicator / several indicators?

    For example, if (Close[0] > SMA(20)) then color.Blue background otherwise color.White background so it's easier to visually see when the price has closed about the 20 SMA.

    Or if (ToTime(Time[0]) >= 930 && ToTime(Time[0]) <= 1615) then background color.White otherwise gray to highlight RTH in a 24-hour chart.

    Thanks

    #2
    Hello 8DTK8,

    Yes, this is possible using either BackColor or BackColorAll properties.



    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      backcolorall

      If I make a blend of colors by using lineargradient brush - can you hint how I would paint the whole Canvas instead of just the chart panel - BackColorAll doesn't take non standard colors as I understand it?

      Comment


        #4
        Hello Mindset,

        Correct, BackColorAll can only take the standard color selections in the C# library.

        Anything beyond this is outside our scope of support, but you may be able to get ideas from this indicator:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        345 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        558 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X