How to shade colors between pivots lines

Have plotted Fibonacci Pivot with Pivots, R1,R2, R3 , S1,S2,S3. with different color lines but want to color shade the zones like Green color between S1 and S2, Dark green color between S2 and S3. Similarly for R1,R2 and R3. Tried used styleArea but it is covering whole area down from that point.

Thanks in advance

@svprasad, if you plot your Fibonacci lines via code, you could probably use the technique showed in this KB:

Hello svprasad,

as beppe told you please use PlotOHLC ...

// Sample Pivot Levels
// Timeframe := EOD

color = IIf( C > O, colorBrightGreen, colorRed );
Plot( C, "", color, styleBar , 0, 0, 0, 0, 5 ); // | styleNoLabel

yh = TimeFrameGetPrice( "H", inMonthly, 0 );
yl = TimeFrameGetPrice( "L", inMonthly, 0 );
yc = TimeFrameGetPrice( "C", inMonthly, 0 );

pivot = ( yh + yl + yc ) / 3;
range = yh - yl;

// only some sample pivot levels ..., please adjust your own levels
r1 = ( 2 * pivot ) - yl ;
s1 = ( 2 * pivot ) - yh ;
r2 = pivot - s1 + r1;
s2 = pivot - ( r1 - s1 ) ;
r3 = 2 * ( pivot - yl ) + yh ;
s3 = yl - ( 2 * ( yh - pivot ) );

Plot( r1, "R 1", colorDarkRed, 1 );
Plot( r2, "R 2", colorDarkRed, 1 );
Plot( r3, "R 3", colorDarkRed, 1 );

Plot( s3, "S 3", colorDarkGreen, 1 );
Plot( s2, "S 2", colorDarkGreen, 1 );
Plot( s1, "S 1", colorDarkGreen, 1 );

// fill background color

PlotOHLC( s1, s1, s2 ,s2, "", colorGreen, styleCloud | styleNoLabel | styleNoRescale, 0, 0, 0, -1, 1 );
PlotOHLC( s2, s2, s3 ,s3, "", colorDarkGreen, styleCloud | styleNoLabel | styleNoRescale, 0, 0, 0, -1, 1 );

image

regards,
Peter

1 Like

Thanks beppe, it worked

Thanks lot Peter. It is working fine now

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.