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 | One MA EA

Author of the idea: Iurii Tokman

MQL5 code author: barabashkakvn

The EA trades by a single iMA (Moving Average, MA) indicator. All indicator parameters are included to the inputs. Operation is performed at each tick: as soon as a signal is received and there are no open positions in the direction of a signal, the signal can be executed.

Position opening decision logic

Indicator data are taken from Current Bar (get MA). Open, High and Low data are taken from Current Bar (get OHLC). Conditions for being in the channel, where the upper border is calculated as "MA" plus Ceiling of the channel and the lower one is "MA" minus Floor of the channel.

Levels

Stop Loss and Take Profit parameters can be disabled. To do this, set "0". Keep in mind that if Stop Loss is "0", we may receive frozen loss-making positions that are never closed by the EA.

Sample test on EURUSD M15:

MetaTrader Experts, Indicators, Scripts and Libraries

21499