Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarBrush Question

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

    BarBrush Question

    I am trying to adjust the bar paint on my chart to be able to see things quicker. I would like to have code that say if the current bars highs and lows are between the previous bars highs and lows color the bar the same color as the previous bars. I'm pretty sure I have the if statement part right but can't figure out how to say set the current Brushes to the previous Brushes.

    if((High[0] <= High[1]) && (Low[0] >= Low[0]))
    {

    }

    Any help would be great.

    Thanks

    #2
    Hello Tyler7498,

    Thanks for your post.

    The previous bar color will be defined by a condition that say the Close[1] is greater than the Open[1] (upbar) or the Close[1] is less than the Open[1] (down bar).

    You can pull the data series property of what the upbar color is from: ChartBars.Properties.ChartStyle.UpBrush
    You can pull the data series property of what the downbar color is from: ChartBars.Properties.ChartStyle.DownBrush

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    38 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    99 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X