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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        155 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        90 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        137 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        130 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X