// Downloaded From https://www.WiseStockTrader.com
a = Param("rsi", 21, 2, 90, 1, 10 );
b1 = Param("period1", 3, 2, 300, 1, 10 );
b2 = Param("period2", 33, 2, 300, 1, 10 );


COLORRSI= IIf (EMA( RSI(a), 3 )>Ref(EMA( RSI(a), 3 ),-1), colorGreen,colorRed);
COLORRSI1= IIf (EMA( RSI(a), 33 )>Ref(EMA( RSI(a), 33 ),-1), colorBlue,colorDarkBlue);

aa=EMA(RSI(a),3);
Col=IIf(aa>Ref(aa,-1),colorYellow,colorBlack);
//Plot( RSI( 21), "", colorWhite, styleThick  );
Plot( EMA( RSI(a), 3 ),  "",col, styleStaircase|styleDots, styleNoLabel ); 
Plot( EMA( RSI(a), 4 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 5 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 7 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 9 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 11 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 13 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 15 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 17 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 19 ),  "",colorRSI, styleNoLabel); 
Plot( EMA( RSI(a), 21 ),  "",colorPink, styleThick, styleNoLabel); 

Plot( EMA( RSI(a), 33 ),  "",colorAqua, styleThick, styleNoLabel ); 
Plot( EMA( RSI(a), 36 ), "", COLORRSI1,  styleNoLabel ); 
Plot( EMA( RSI(a), 40 ),  "",COLORRSI1,  styleNoLabel ); 
Plot( EMA( RSI(a), 44 ),  "",COLORRSI1,  styleNoLabel ); 
Plot( EMA( RSI(a), 50 ),  "",COLORRSI1,  styleNoLabel ); 
Plot( EMA( RSI(a), 55 ),  "",COLORRSI1,  styleNoLabel); 
Plot( EMA( RSI(a), 60 ),  "",COLORRSI1,  styleNoLabel); 
Plot( EMA( RSI(a), 65 ),  "",COLORRSI1,  styleNoLabel ); 
Plot( EMA( RSI(a), 70 ),  "",COLORRSI1,  styleNoLabel); 
Plot( EMA( RSI(a), 75 ),  "",colorGreen, styleThick , styleNoLabel); 

Plot(50,"",colorBlack,styleLine);
z1=EMA(RSI(a),21);
z2=EMA(RSI(a),33);
up1=z1>z2;
dn1=z1<z2;
up2=aa>z1;
dn2=aa<z1;

Plot( 2, "St",IIf(up1,colorBrightGreen,IIf(dn1,colorBlack,colorLightGrey)),styleOwnScale|styleArea|styleNoLabel,-0.5,100);
Plot( 4, "Mt",IIf(up2,colorBrightGreen,IIf(dn2,colorBlack,colorLightGrey)),styleOwnScale|styleArea|styleNoLabel,-0.5,100);