PureBytes Links
Trading Reference Links
|
Bruce:
I posted the following customizable RSI to the list a couple
years ago:
Below is the code for an RSI where you can customize the
number of periods (perhaps to increase or decrease as
volatility changes) and the price array (perhaps to a moving
average of the close). Although I have not tested it
thoroughly, when I use similar parameters, it matches the
standard MetaStock RSI function.
Note that the parameters used in the example below have
no value as an indicator; they're just for illustration.
RSIPeriod:= Int(14 / (Stdev(CLOSE,10)/Stdev(CLOSE,5)));
RSIDataArray:= Mov(CLOSE,25,SIMPLE);
U:= Wilders(If(ROC(RSIDataArray,1,$)>0,
ROC(RSIDataArray,1,$), 0),
LastValue(RSIPeriod));
D:= Wilders(If(ROC(RSIDataArray,1,$)<0,
Abs(ROC(RSIDataArray,1,$)), 0),
LastValue(RSIPeriod));
100-(100/(1+U/D))
----- Original Message -----
From: "Bruce Barnard" <bruce@xxxxxxxxxxx>
To: "Metastock@xxxxxxxxxxxxx" <metastock@xxxxxxxxxxxxx>
Sent: Tuesday, November 06, 2001 1:07 PM
Subject: Formula help
> Can anyone help with the formula of an RSI of an EMA,
> instead of RSI of O,H.L,C and periods eg. (14) ?
> Say the RSI of a 5-day exponential moving average ?
> Many thanks,
> Bruce Barnard
|