Multiple Ribbons in Same Chart

Hello All,

Need help in plotting multiple ribbons in a single chart. Below is the code which I am trying to put as multiple ribbons in same chart. But it shows only 1 ribbon, the 1st one.

Any help on this will be highly appreciated.

It basically checks RSI value on 2 timeframe & I need a visual check just by looking at the ribbons.



RSIperiods = Param( "RSI Periods", 14, 1, 200, 1 );

upcolor1=ParamColor("Bullish Color 1", ColorRGB(255,255,255));
downcolor1=ParamColor("Bearih Color 1", ColorRGB(255,255,255));

upcolor2=ParamColor("Bullish Color 2", ColorRGB(255,255,255));
downcolor2=ParamColor("Bearih Color 2", ColorRGB(255,255,255));

tf2 = in15Minute;
TimeFrameSet( tf2 );
rsh = RSI(RSIperiods);

tf3 = in5Minute;
TimeFrameSet( tf3 );
rs5 = RSI(RSIperiods);

expandmode = expandLast;

rsh = TimeFrameExpand( rsh, tf2, expandmode);
rs5 = TimeFrameExpand( rs5, tf3, expandmode);

Ribbon1=IIf( (rsh) > 50 ,upcolor1, IIf ( (rsh) < 50, downcolor1,colorYellow));
Ribbon2=IIf( (rs5) > 50 ,upcolor2, IIf ( (rs5) < 50, downcolor2,colorYellow));

Plot(40, "", Ribbon1, styleOwnScale| styleArea| styleNoLabel,0.5,100);
Plot(20, "", Ribbon2, styleOwnScale| styleArea| styleNoLabel,0.3,200);



Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Are you a day trader?