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 | CloseProfit v2

Author of the idea: Vladimir Khlystov.

mq5 code author - barabashkakvn.

If the profit reaches "Profit Close" or the loss reaches "Loss Close", all positions are closed, while pending orders are removed.

The "All Symbols" parameter is responsible for working on all symbols or only on the current one:

  • If "All Symbols" is "true", the EA works on all symbols
  • If "All Symbols" is "false", the EA works on the current symbol

The "magic number" parameter is a unique ID the EA works with: if it is set to "0", the EA works with any magic number.

When launched in the tester (in visual mode), a demo mode is enabled: a BUY position is opened and a Buy Limit pending order is placed:

MetaTrader Experts, Indicators, Scripts and Libraries

21384