Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | MACD signal

MetaTrader Experts, Indicators, Scripts and Libraries

Author of the idea — Collectorauthor of the MQL5 code — barabashkakvn. 

Uses signals from the indicators: ATR, MACD.

Block of getting the indicators:

   Range=iATRGet(1);
   rr=Range*LEVEL;
   Delta=iMACDGet(MAIN_LINE,0)-iMACDGet(SIGNAL_LINE,0);
   Delta1=iMACDGet(MAIN_LINE,1)-iMACDGet(SIGNAL_LINE,1);

Open Buy if:

      if(Delta>rr && Delta1<rr)

Open Sell if:  

      if(Delta<-rr && Delta1>-rr)
17080

Best MetaTrader Indicators + Profitable Expert Advisors