Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Relative Momentum Index for Amibroker (AFL)

3 / 5 (Votes 3)
amibroker, oscillator

The Relative Momentum Index (RMI) was developed by Roger Altman in 1993 as an attempt to improve the Relative Strength Index (RSI) by adding a component of momentum to the RSI. The Relative Momentum Index uses change of closing price between the current bar and N bars before instead of 1-dar change in price.

Technical Analysis
The Relative Momentum Index is calculated as ratio of the average upward changes to the average downward changes over a given period of bars. Where each change is calculated for the given number of bars. It could be said that RSI is the RMI which uses a momentum period of 1 to receive individual changes.

The same as with RSI, the RMI indicator moves in the range of 0 to 100; and the same as with RSI, the relative Momentum Index’s values above 70 and below 30 are considered as an indication of overbought and oversold conditions respectfully.

In technical analysis the RMI indicator is analyzed in the same way the RSI is. A simple trading system based on the RMI indicator would suggest buying when RMI values advance above 30 after being below it and it would suggest selling when RMI values drop below 70 after being above it.

Since RMI readings above 50 are considered as bullish and RMI readings below 50 are considered as bearish, some traders may choose to generate signals on the crossovers of the RMI and 50 center line: sell when RMI decline below 50 and buy when RMI advances above 50.

Third way of using the Relative Momentum Index involves Exponential MA applied to RMI and used as a signal line. In this case the RMI indicator consist of two lines: RMI itself and Signal Line (EMA applied to the RMI). The signals are generated on the crossovers of the RMI and its Signal Line: sell when RMI drops below its Signals Line and buy when RMI raises above its Signal Line.

Divergence between RMI and price direction is also taken into consideration by many traders as an indication of the possibility of a reversal in the near future.


Indicator / Formula

Copy & Paste Friendly
periods = Param( "Periods", 20, 1, 200, 1 );
momentum = Param( "Momentum", 2, 1, 200, 1 );
p1 = Param("TL 1 Periods", 25, 2, 300, 1, 10);
p2 = Param("TL 2 Periods", 5, 2, 300, 1, 10);
TL1 = LinearReg(C, p1);
TL2 = EMA(TL1, p2);
z = RMI(periods, momentum) ;
Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorYellow), ParamColor("TL Dn Colour", colorCustom12));
Plot(z,"", Col1, styleThick | styleNoLabel );

Overbought = Param( "Overbought", 70 );
Oversold = Param( "Oversold", 30 );

OverboughtColor = ParamColor("Overbought Color",colorDarkOliveGreen);
OversoldColor = ParamColor("Oversold Color",colorDarkRed);

Plot(Overbought,"", colorGreen, styleThick | styleDashed | styleNoLabel );
Plot(Oversold,"", colorRed, styleThick | styleDashed | styleNoLabel | styleNoDraw );
PlotOHLC(z,z,50,z,"",IIf(z>50, OverboughtColor, OversoldColor), styleCloud | styleNoLabel | styleClipMinMax, Oversold, Overbought );

W3050COLOR = IIf(50 > 30,colorPlum,colorDarkOliveGreen);
PlotOHLC(30,30,50,50," ",W3050COLOR,styleCloud | styleNoLabel | styleNoTitle);



Very Good. Differently presented, Keep it up.

2. manhbu

Rất tốt. Cảm ơn bạn!

3. loudplay

nice work..

i need a help to make change in valley r change


Valley R Channel = value, H2 =value, H3 = value, center = value, UCL = value, LCL =value,close = value,


Valley R Channel = value, H2 ={Empty}, H3 value, center = {Empty}, UCL ={Empty}, LCL ={Empty} close = value,

this is the formula i want to change in it

/* 'R' Channel */
/*Author Marc Valley */

Var = 4;
M1 = MA(Max(H,Var ),2);
L1 = MA(Min(L,Var ),2);
K = M1 - L1;
Num1 = sqrt(K);
Dem1 = sqrt(1.00+K);
H1 = (Num1/Dem1)/2;
Num2 = sqrt(1.0);
Dem2 = sqrt(1+K);
H2 = ((Num2/Dem2)/2) *C;
H3 =(H1 + H2) ;	
MAH2MA =MA(L - (H2/100),Var );
MAH3MA= MA(H + (H3/100) ,Var);
MA3 = (MAH3MA + MAH2MA) /2;
UCL =( MAH3MA + MA3 )/2;
LCL = (MA3 + MAH2MA )/2;

//Cover = Buy;
//Short = Sell;

Plot(Close,"Valley 'R' Channel    Close",1,8);
Plot(MAH2MA ,"H2",5,4);
Plot(MAH3MA ,"H3",4,4);
Plot(MA3 ,"Center",2,4);
Plot(UCL ,"UCL",10,4);
Plot(LCL ,"LCL",10,4);
//Plot(Avg,"Valley 'R' Channel (C) 2004  Avg",colorYellow,8);
4. dyza

downloaded and tested, better than rsi, thank you

Leave Comment

Please login here to leave a comment.