Skip to main content

Rahul Mohindar Oscillator (RMO) for Amibroker (AFL)

kaiji over 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 21)
  • Tags:
    oscillator, trading system, amibroker

The Rahul Mohindar Oscillator as included in Metastock converted to work with Amibroker.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("RMO");
SwingTrd1 = 100 * (Close - ((MA(C,2)+
MA(MA(C,2),2)+
MA(MA(MA(C,2),2),2) +
MA(MA(MA(MA(C,2),2),2),2) +
MA(MA(MA(MA(MA(C,2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2) +
MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2),2), 2),2)+
MA(MA(MA(MA(MA(MA(MA(MA(MA(MA(C,2),2),2),2),2),2), 2),2),2),2))/10))/(HHV(C,10)-LLV(C,10));
SwingTrd2=EMA(SwingTrd1,30);
SwingTrd3=EMA(SwingTrd2,30);
RMO= EMA(SwingTrd1,81);
Buy=Cross(SwingTrd2,SwingTrd3);
Sell=Cross(SwingTrd3,SwingTrd2);
Bull_Trend=EMA(SwingTrd1,81)>0;
Bear_Trend=EMA(SwingTrd1,81)<0;
Ribbon_kol=IIf(Bull_Trend,colorGreen, IIf(Bear_Trend,colorRed, colorBlack));
Plot(4, "ribbon", Ribbon_kol, styleOwnScale|styleArea|styleNoLabel, -0.5,100);
Impulse_UP= EMA(SwingTrd1,30) > 0;
Impulse_Down= EMA(SwingTrd1,81) < 0;
bar_kol=IIf(impulse_UP, colorBlue, IIf(impulse_Down, colorRed,IIf(Bull_Trend, colorRed, colorBlue)));
Plot(Close,"Close",bar_kol,styleBar | styleThick );
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBlue, colorRed ),0, IIf( Buy, Low, High ) );
_SECTION_END();

10 comments

over 16 years ago

I have fixed up some issues with the formula. It is now tested and working with Amibroker 5.20.

3. colion
about 16 years ago

Administrator: For some reason the final display is dropping ( C, 2 ) from MA
and ( y, 2 ) from MA and ( C, 10 ) from HHV and LLV. So, (if this is displayed), x = MA and y = MA and HHV and LLV
(Nope, still doing it – I give up)

SwingTrd1 can be simplified and will run faster as a loop as follows:

x = MA(C, 2);
y = x;

for (i = 1; i < 10; i++)
{
    y = MA( y, 2 );
    y = y + x;
}

swingTrd1 = 100 * (C - (y / 10)) / (HHV(C, 10) - LLV(C, 10));
about 16 years ago

Hi colion, are you referring to the comment display?

In which case put “bc..” and a space after it on the same line as your where your code starts more info can be found here. Better yet create an indicatorpastie and paste a link to it much easier.

5. ecki
almost 16 years ago

a solid indicator which never misses a trend. on the other side it’s sometimes very slow and gives away some portion of your profit.
like many other indicators RMO is not working very good in sideway trends.

9. Parimal
over 10 years ago

Can someone please give an AFL which i can include in my existing Harmonic AFL. my existing AFL does the scanning, but does not display the pattern and name. thanks

Leave Comment

Please login here to leave a comment.