Skip to main content

MACD MT4/MT5 for Amibroker (AFL)

vivek998877 almost 14 years ago Amibroker (AFL)

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

MOST PRECISE MACD SIGNALS

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("MACD");

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorGreen ), ParamStyle("MACD style", 0 | 0 | styleHistogram, 0  ) );
Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue
), ParamStyle("Signal style", 0 | 0 | styleDashed, 0  ) );a=(ml-sl);a1=Ref(a,-1);//colorCustom11





Buy=Cross( ml, sl ) OR Cross((ml+ml), sl );
_SECTION_END();

Buy=Cross( MACD(), Signal() ); 
Sell=Cross( Signal(), MACD() ); 


PlotShapes( IIf( Buy , shapeSmallCircle, shapeNone ),            colorWhite, 0, Graph1 , 0  );
PlotShapes( IIf( Sell , shapeSmallCircle, shapeNone ),            colorRed, 0, Graph1 , 0  );

5 comments

almost 14 years ago

Really good one with White and red dots for buy/Sell (Thnx you Mr. Vivek)

almost 14 years ago

Hi,

Attaching this to price chart gives trend visibility & one can take buy/sell decision for your own logic. Thanks for this useful AFL

Viswanath

almost 14 years ago

Please refer MACD colored buy sell with volume.

http://www.wisestocktrader.com/indicatorpasties/313-macd-colored-with-volume

Thanks
Viswanath

Leave Comment

Please login here to leave a comment.