Gradient color

Questions about MultiCharts and user contributed studies.
Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 32 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: 6550
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 965 times
Been thanked: 1892 times

Re: Gradient color

Postby TJ » 28 May 2011

Laurent wrote: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: 444
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Re: Gradient color

Postby SP » 28 May 2011

The included "Mov Avg Exp Ribbon" should do what you want.
These users thanked the author SP for the post (total 2):
LaurentStan Bokov

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

Re: Gradient color

Postby Laurent » 28 May 2011

That's exactly what I wanted, thanks SP!

janus
Posts: 747
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 83 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: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Re: Gradient color

Postby Spaceant » 30 May 2011

janus wrote: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: 747
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 83 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 43 times
sample.png
sample.png (4.88 KiB) Viewed 246 times


Return to “MultiCharts”