Ribbon with gradient color


I wonder if there is a way to make this ribbon's color become gradient instead only block color of red and green?
So if it is the lowest value from the visible bar, it will be red, but it gradually becomes maybe pink if the value getting close to 0, and if it is above 0 it becomes light green and gradually becomes darker green. The darker green is the highest value in the visible bar. I tried colorhsb, colorblend, and gradient color but I cant find the solution.

Please help, thanks in advance

Plot( Close, "Price", colorBlue, styleCandle );
Plot( 2, /* defines the height of the ribbon in percent of pane width */
IIf( MACD(12,26)>0, colorGreen, IIf( MACD(12,26), colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
1 Like

It has been done in a chart.
// see Drawing code & helper functions at the link for an example vertical gradient plot.

See here:




hello thanks for the reply,
I will look into it thanks