Stack Colors on a Bar

Questions about MultiCharts and user contributed studies.
TrendFirst
Posts: 71
Joined: 23 Nov 2015
Has thanked: 22 times
Been thanked: 8 times

Stack Colors on a Bar

Postby TrendFirst » 30 Nov 2015

I'm interested in using an oscillator to identify over/under valued areas and paint price bars. Painting the entire bar is no problem, I can do that easily with PlotPaintBar. What i'm more interested in is stacking colors on a single bar as shown in the attached pic (sorry the quality is poor).

For example, if I use the CCI oscillator, I would want to paint price red if it is over 200 or under -200. Between 100 & 200 (and -100 & -200), I would want to paint price yellow. Between -100 to 100, the price bar would be it's default color.

I am looking at the Cust Gradient indicator, but haven't been able to get it to do what I want. I also saw some references to iChartCustomDrawer, but I think this is for the .NET version, which I don't have.

Thanks in advance for any hints or tips. I'm using MultiCharts v9.1 Build 12010 in Win 10. My EasyLanguage/PowerLanguage expertise level is beginner. I can usually modify stuff fine, but coding new or complex indicators is more......challenging, shall we say.
Attachments
Partial PaintBar.jpg
(2.64 KiB) Downloaded 491 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Stack Colors on a Bar

Postby Henry MultiСharts » 15 Dec 2015

Hello TrendFirst,

With PlotPaintBar you can paint segments of the bar. Therefore you can create and apply two PlotPaintBar indicators to have the bars colored in three colors.

TrendFirst
Posts: 71
Joined: 23 Nov 2015
Has thanked: 22 times
Been thanked: 8 times

Re: Stack Colors on a Bar

Postby TrendFirst » 15 Dec 2015

Hello TrendFirst,

With PlotPaintBar you can paint segments of the bar. Therefore you can create and apply two PlotPaintBar indicators to have the bars colored in three colors.
Thank you Henry. I have been able to paint different colors between the pre-defined price points, such as between the open and close, or open and high. I'm still working on a figuring out a user-defined price point, such as "price when CCI goes over +100". Getting there slowly. If you have an example that would be helpful.


Return to “MultiCharts”