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 | MA Reverse

Trading by Moving Average. Checking for sufficiency of funds.

Author of the idea is Konstantin Grandauthor of the MQL5 code is barabashkakvn.   

Operation Principle:

MetaTrader Experts, Indicators, Scripts and Libraries

Performance result on EURUSD, M30 from 2016.05.08 to 2016.12.28:

MetaTrader Experts, Indicators, Scripts and Libraries 

Also, before each operation, we should check if we have sufficient funds:

         //--- check volume before OrderSend to avoid "not enough money" error (CTrade)
         double chek_volime_lot=m_trade.CheckVolume(m_symbol.Name(),1.0,m_symbol.Bid(),ORDER_TYPE_SELL);
...
         //--- check volume before OrderSend to avoid "not enough money" error (CTrade)
         double chek_volime_lot=m_trade.CheckVolume(m_symbol.Name(),1.0,m_symbol.Ask(),ORDER_TYPE_BUY);

This protection allows avoiding the "not enough money" error.
 

17288

Best MetaTrader Indicators + Profitable Expert Advisors