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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        27 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        17 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        9 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        10 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        17 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X