Traders' Tips from TASC Magazine

RSI Bands

Francois Bertrand’s article, “RSI Bands” describes the calculation and use of these bands. The MetaStock formulas and instructions on adding it to MetaStock are:

 

To enter these indicators into MetaStock:

  1. In the Tools menu, select Indicator Builder.
  2. Click New to open the Indicator Editor for a new indicator.
  3. Type the name of the formula:RSI Bands
  4. Click in the larger window and type in the formula:
  • topv:=Input("overbought level",1,100,70);
  • botv:=Input("oversold level",1,100,30);
  • tp:=Input("RSI Time Periods",1,100,14);
  • change:= ROC(C,1,$);
  • Z:=Wilders(If(change>0,change,0),tp);
  • Y:=Wilders(If(change<0,Abs(change),0),tp);
  • tx:=(tp-1)*(Y*topv/(100-topv)-Z);
  • bx:=(tp-1)*(Y*botv/(100-botv)-Z);
  • tband:=If(tx>0,C+tx,C+tx*(100-topv)/topv);
  • bband:=If(bx>0,C+bx,C+bx*(100-botv)/botv);
  • tband;
  • bband
  1. Click Ok to close the Indicator Editor.

The article also make reference to using “clamping” when the number volatility caused the bands to widen beyond a usable range. Here is the same indicator with the option to enable clamping at a variable range:

Name:RSI Bands with clamping

Formula:

  • topv:=Input("overbought level",1,100,70);
  • botv:=Input("oversold level",1,100,30);
  • tp:=Input("RSI Time Periods",1,100,14);
  • clamp:=Input("use clamping 1=Yes/0=No",0,1,0);
  • cper:= Input("clamping percent",5,50,10);
  • change:= ROC(C,1,$);
  • Z:=Wilders(If(change>0,change,0),tp);
  • Y:=Wilders(If(change<0,Abs(change),0),tp);
  • tx:=(tp-1)*(Y*topv/(100-topv)-Z);
  • bx:=(tp-1)*(Y*botv/(100-botv)-Z);
  • tb1:=If(tx>0,C+tx,C+tx*(100-topv)/topv);
  • bb1:=If(bx>0,C+bx,C+bx*(100-botv)/botv);
  • tband:=If(clamp=1 AND tb1>C*(1+cper/100),C*(1+cper/100),tb1);
  • bband:=If(clamp=1 AND bb1<C*(1-cper/100),C*(1-cper/100),bb1);
  • tband;
  • bband

 

William Golson

Equis International


Contents