Hi,
Mike provided me with the volatility band formula to be used on RSI indicator.
However, I would like to take the idea further and test the band on other
indicators.
Can someone help me with me....
Coefdwn = 2.1;
Coefup = 2.3;
//ATR custom
Per = Param( "ATR Prds", 15, 5, 20, 1 );
TH = IIf( Ref( RSIa( C, Per ), -1 ) > RSIa( C, Per ),Ref( RSIa( C, Per ), -1 ),
RSIa( C, Per ) );
TL = IIf( Ref( RSIa( C, Per ), -1 ) < RSIa( C, Per ), Ref( RSIa( C, Per ), -1
),RSIa( C, Per ) );
TR = TH - TL;
Truerangecustom = MA( TR, per );
//Plot(Truerangecustom,"",colorRed,styleLine);
TOPBAND = MA( RSIa( Close, 14 ), 6 ) + ( Coefup * MA( TrueRangeCustom, 15 ) );
BOTBAND = MA( RSIa( Close, 14 ), 6 ) - ( Coefdwn * MA( TrueRangeCustom, 15 ) );
//MID = ( TOPBAND + BOTBAND ) / 2;
RS = RSIa( Close, 14 );
//SIG = MA( RSI( 14 ), 3 );
Plot( TOPBAND, "TB", colorRed, styleLine + styleThick + styleNoLabel );
//Plot( MID, "MB", colorYellow, styleThick );
Plot( BOTBAND, "BB", colorBrightGreen, styleLine + styleThick + styleNoLabel );
Plot( RS, "RSI", colorWhite, styleDots);
//Plot( SIG, "Sig", colorGrey40, styleLine + styleNoLabel );
Plot(68,"",31,1);Plot(50,"",31,1);Plot(32,"",31,1);
Title = EncodeColor( colorRed ) + " Top Band = " + WriteVal(
TOPBAND, 1.2 ) + "\n" +
EncodeColor( colorBrightGreen ) + " Bot Band = " +
WriteVal( BOTBAND, 1.2 ) + "\n" +
//EncodeColor( colorYellow ) + " Mid = " + WriteVal(
MID, 1.2 ) + "\n" +
EncodeColor( colorWhite ) + " RSI = " + WriteVal( RS,
1.2 ) ;