Adjustable MA 3G is a highly customizable Forex expert advisor that is based on the custom 3rd Generation Moving Average indicator and the classic two MA cross strategy. You can adjust the MA periods, MA methods, MA price type, minimum MA difference, stop-loss, take-profit, trailing stop, slippage and money management parameters. This expert advisor always opens a position on a cross and closes it on the next cross (if it was not closed earlier by the SL or TP).
Warning! The latest backtest of this expert advisor on the period from 2021-01-01 through 2022-04-15 has shown a complete account wipeout. Do not run this EA on a live account! Use it for educational purpose only. The backtest results presented below are outdated.
The backtest of the Adjustable MA 3G MetaTrader expert advisor has shown ~16.2% profit with ~7.3% maximum drawdown during a period of 20 months. The used trading volume was set to 0.1 standard lot. The EA made 426 trades, of which 51.64% were profitable. The default settings were used in this backtest on the EUR/USD M5 chart.
It offers a significant improvement over the standard Adjustable MA expert advisor.
Warning! This expert advisor requires a free 3rd Generation Moving Average indicator installed in your MetaTrader platform to work.
Input parameters
- Lots (default = 0.1) — a trading volume in standard lots.
- StopLoss (default = 170) — a stop-loss to be used with trades.
- TakeProfit (default = 60) — a take-profit to be used with trades.
- TrailingStop (default = 0) — a trailing stop to be applied to trades.
- Period_1 (default = 35) — the period of the first moving average.
- Period_2 (default = 30) — the period of the second moving average.
- Period_Sampling_Slow (default = 160) — the sampling period of the slow moving average.
- Period_Sampling_Fast (default = 196) — the sampling period of the fast moving average.
- MA_Method_Slow (default = MODE_EMA) — the calculation method of the slow moving average.
- MA_Method_Fast (default = MODE_EMA) — the calculation method of the fast moving average.
- MA_Applied_Price_Slow (default = PRICE_TYPICAL) — the applied price for the slow moving average.
- MA_Applied_Price_Fast (default = PRICE_TYPICAL) — the applied price for the fast moving average.
- MinDiff (default = 1) — a minimum difference between two moving averages in pips for the cross to count.
- TradeDirection (default = Both) — the direction of the trades to take.
- StartTime (default = "00:00") — the start time (server) for the period to trade in.
- EndTime (default = "23:59") — the end time (server) for the period to trade in. Inclusive.
- CloseTradesOutsideTradingTime (default = true) — if true, the EA will continue closing its trades outside of the trading period set using the input parameters above.
- DoTrailingOutsideTradingTime (default = true) — if true, the EA will continue trailing the stop-loss of its trades outside of the trading period set using the input parameters above.
- UseMM (default = false) — if true, the EA will apply its money management rules.
- LotsPer10000 (default = 1) — how many standard lots per trade to use if UseMM is set to true.
- Slippage (default = 3) — maximum tolerable slippage in pips.
- OrderCommentary (default = "Adjustable MA 3G") — the commentary for positions opened by this EA.
MiniFAQ
What are the stop-loss and take-profit used by this EA?
By default, it uses a fixed stop-loss of 170 pips and take-profit of 60 pips. The trailing stop is turned off by default.
How often does it trade?
On 5-minute EUR/USD chart (the backtest settings) this EA will trade once every day on average.
This EA is ECN-compatible., If you are trading with an ECN broker (with market execution for orders), you cannot set SL/TP on position opening. You have to open a position first without SL/TP and only then modify it, adding stop-loss and/or take-profit level. This EA will do it automatically.
Download (ver. 1.04, 2025-02-10)
Zipped Adjustable MA 3G expert advisor for MetaTrader 4 (includes 3G MA indicator). Zipped Adjustable MA 3G expert advisor for MetaTrader 5 (includes 3G MA indicator).Discussion
Warning! Before you ask basic questions regarding installation of the expert advisors, please read this MT4 Expert Advisors Tutorial to get the elementary knowledge on handling them.
Do you have your own trading results or any other remarks regarding this expert advisor?
Discuss Adjustable MA 3G with other traders and MQL programmers on our forum.
Changelog
1.04 - 2025-02-10
- Added an option to restrict trading to a certain period of the day.
- Added an option to restrict trading to a single direction.
- Added an input parameter to set the order commentary.
- Optimized trailing stop to make it work more reliably.
- Changed how trades are opened and closed to allow for several attempts in case of a failure.
- Refactored the source code.
1.03 - 2018-07-25
- Added automatic detection of execution mode used in the trading account.
- Fixed EA's operation in MT5 hedging mode.
- Improved the source code by making simpler and more serviceable.
1.02 - 2017-03-16
- Added more inputs to control the moving averages used in the EA.
- Added filtering for invalid input parameters.
1.01 - 2014-08-06
- Fixed a bug with zero divide error.
1.00 - 2011-11-01
- Adjustable MA 3G expert advisor released.