Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PlotBrushes

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

    #16
    I swapped out the OnBarUpdate code that plots the PlotBrushes from
    PlotBrushes[i][0] = (i < numberOfEMAPerRibbon) ? (IsRising(Values[i]) ? EMA1RibbonUpColor : EMA1RibbonDownColor) : (IsRising(Values[i]) ? EMA2RibbonUpColor : EMA2RibbonDownColor);
    to
    Plots[i].Brush = (i < numberOfEMAPerRibbon) ? EMA1RibbonUpColor : EMA2RibbonUpColor;

    The first code plotted and gave me the ability to have different colors if it was rising or falling.
    The second code actually succeeded in allowing me to use Plots[0].Brush = Brushes.Transparent; in the same way I could with my other indicator.

    So until I figure out how to get that to work with PlotBrushes, I have to sacrificing being able to hide the EMA lines or being able to visually see it changing colors.

    Comment


      #17
      Hello rockmanx00,

      IsVisible is a property of your overall indicator, if you want to hide its plots you can toggle that property to hide them with no looping or changes

      Comment


        #18
        I see. So in my case, if my indicator makes two ribbons and I only want to hide one, then the way I'm doing it is the way to go. I'll keep that in mind in the event I have something less complex. Thank you for your patience and input. I appreciate it.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        227 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        146 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        160 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        237 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        197 views
        0 likes
        Last Post CarlTrading  
        Working...
        X