Gradient color

Questions about MultiCharts and user contributed studies.
Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 34 times

Gradient color

Postby Laurent » 28 May 2011

I would represent multiple moving averages on a chart.

For short moving averages, each moving average should be a gradiant of a color,
For medium term, gradiant of another color....

Is there an easy way to generate gradiant of a color? Or there is no way, it must be manual?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Gradient color

Postby TJ » 28 May 2011

I would represent multiple moving averages on a chart.

For short moving averages, each moving average should be a gradiant of a color,
For medium term, gradiant of another color....

Is there an easy way to generate gradiant of a color? Or there is no way, it must be manual?
can you draw a mock up?

SP
Posts: 465
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 286 times

Re: Gradient color

Postby SP » 28 May 2011

The included "Mov Avg Exp Ribbon" should do what you want.

Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 34 times

Re: Gradient color

Postby Laurent » 28 May 2011

That's exactly what I wanted, thanks SP!

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Re: Gradient color

Postby janus » 28 May 2011

I posted a good spectrum to rgb conversion utility some time ago: viewtopic.php?f=5&t=6654&p=28301&hilit=spectrum#p28301

Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Re: Gradient color

Postby Spaceant » 30 May 2011

I posted a good spectrum to rgb conversion utility some time ago: viewtopic.php?f=5&t=6654&p=28301&hilit=spectrum#p28301
Janus,

Can you demonstrate with an image file to show how to use your code?

Thanks

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Re: Gradient color

Postby janus » 30 May 2011

Here's an sample image using the uploaded study. It displays three color bars. The first has 5 colors, the second has 10 colors, and the third has 100 colors.

I use this function when I need a more realistic rainbow style color distribution for my indicator lines.
Attachments
color_test.txt
(2.16 KiB) Downloaded 432 times
sample.png
(4.88 KiB) Downloaded 669 times


Return to “MultiCharts”