Skip to main content

OsMA Indicator (the real one) for Amibroker (AFL)

dawsonsg about 11 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 5)
  • Tags:
    oscillator, amibroker

Hi Guys,

There is a couple of OsMA indicators on the board but none are as good as this one.

Steve

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("ind OsMA");

// Params 
FastEma=Param("Fast EMA", 12, 1 , 25, 1);
SlowEma=Param("Slow EMA", 26, 1 , 50, 1);
SignalEma=Param("Signal EMA", 9, 1 , 25, 1);
 
// signals
valMACD   = MACD(fastema,slowema);
valSignal = Signal(FastEma,SlowEma,SignalEMA);
valOSMA = valMACD - valSignal;
 
// set color
OsMAColor=IIf(valOSMA >= Ref(valOSMA,-1) AND valOSMA>0,colorBrightGreen, 
			IIf(valOSMA < Ref(valOSMA,-1) AND valOSMA>0,colorGreen,
			IIf(valOSMA <= Ref(valOSMA,-1) AND valOSMA<0,colorRed,
			colorDarkRed)));
	
Plot(valOSMA, "val ", OsMAColor,styleHistogram|styleThick );
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.