| |
 |
Views:
1609 |
| Added: July 21, 2008 |
| |
| |
|
| This formula has not been rated yet |
|
|
| |
email this link
|
| |
| |
| Tags:
TradeStation, indicator
|
| |
 |
Code:
Type : Function, Name : RMI
{RMI Function - Relative Momentum Index
inputs: Price: Input series (normally Close, but can be any series)
Length: Length of Average Calc
dt: Rate of Change Length
output: RMI
RMI is a smoother version of RSI. if dt = 1, RMI is the same as RSI.
Base on
"Relative Momentum Index: Modifying RSI", Roger Altman, S&C v11, #2, p57
Orginal TS Version: ghkramer - 14Apr01
}
inputs: Price(NumericSeries), Length(Numeric), dt(Numeric);
var: jBar(0), dDn(0), dUp(0), UpSum(0), DnSum(0), MuUp(0), MuDn(0);
if (Length > 0) then
begin
dUp = Price[0] - Price[dt];
if (dUp >= 0) then
dDn = 0
else
begin
dDn = -dUp;
dUp = 0;
end;
MuUp = (MuUp[1]*(Length-1) + dUp)/Length;
MuDn = (MuDn[1]*(Length-1) + dDn)/Length;
if (MuUp + MuDn) <> 0 then
RMI = 100*MuUp/(MuUp + MuDn)
else
RMI = 0;
end
else
RMI = 0;
Type : Indicator, Name : RMI Indicator
{RMI Indicator - Relative Momentum Index
inputs: Price: Price series
Length: Length of Average Calc
dt: Rate of Change Length
Base on
"Relative Momentum Index: Modifying RSI", Roger Altman, S&C v11, #2, p57
Orginal TS Version: ghkramer - 14Apr01
}
inputs: Price(Close), Length(20), dt(5);
var: xRMI(0);
xRMI = RMI(Price, Length, dt);
plot1(xRMI, "RMI");
plot2(70, "OverBought");
plot3(30, "OverSold");
Source: https://www.tradestation.com
all formulas for TradeStation
all formulas
|