Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Multi-Level Trend Expert Advisor - Expert for MetaTrader 4 - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

Multi Levels Trend Expert Advisor - expert for MetaTrader 4

Multi Levels Trend Expert Advisor - expert for MetaTrader 4

The author is a researcher and is studying the stock and foreign exchange markets. This EA was backtested on EURUSD from July 1, 2011 to January 13, 2012. It has successfully grown $10,000 to $59,294, but there is no guarantee that past performance will be indicative of future results.

This expert advisor is based on the concept that the market does not always move in one direction. Even if the market moves in one direction at some point, it will pull back. Typically pullbacks occur due to strong support or resistance levels or a major trader's decision to take profits, which usually forces the market to move in the opposite direction for a period of time. The EA takes advantage of this reverse move. As expected, the EA performs better when trading in the direction of the trend.

The EA works as follows:

If the MA(34) on the daily chart is pointing upwards, the indicator will open a buy trade and vice versa. If the trend direction moves, the EA will close the position as specified by the Take Profit (TP) parameter. The default value is 60 for 4-bit brokers and 600 for 5-bit brokers.

If the market moves in the opposite direction to the opened trade, the EA will open another position with the same lot size in the same direction as the previous trade at a price of -600 (-60pips). If the market moves in the direction of the trade, both trades will be closed at the target price of the last trade. This will be repeated on the next level, but with batch sizes of 2, 4, and 8. For example, if the initial lot size is 0.1, the next level lot size will be:

Multi Levels Trend Expert Advisor - expert for MetaTrader 4

EA uses many parameters. The most important thing is:

TP: Take profits. If your broker uses 4 digits, the default value should be changed to 60 instead of 600.

DP: This represents time frame. The default value is day time range 1440. You can add EA to any chart. However, it will use DP to specify the time range of its MA.

MAP: moving average period. The default value is 34.

MaxTrade: The maximum number of trades that the EA will open in the same direction.

TradeType: If it is 0, the EA will follow the MA direction; if it is 1, it will force the EA to open a buy transaction; if it is 2, it will force a sell transaction.

suggestion:

This EA works best when combined with other indicators such as moving averages, Bollinger Bands, support and resistance levels. You can switch from TradeType 0, 1 or 2 depending on the indicator.

Use a lot size that suits your bankroll management.

Update: Version 2

The accompanying updated version MLTrendE V2 allows transactions to set more parameters, including:

maReversal = true/false. If true, the system will use EMA(500) for trading. If the price rises and falls below the EMA (500), the system will close all sell positions and set TradeType to 1. If the price falls below the EMA (500), the system will close all open buy positions and set TradeType to 2. It is recommended to use this parameter on the H1 timeframe and can use the opening price for backtesting.

Allow SL = true/false. You need to set maReversal to false to use allowSL. When allowSL is set to true, the system will use the original multi-level system and implement stop/stop loss on the last open position. When the last open position reaches SL, the system will close all positions at each level and reverse the trend by setting the TradeType. To use allowSL, you also need to set two parameters: SL and MaxTrade. When allowSL is true, you can only use each tick to backtest the system.


Attachment download

📎MLTrendE.mq4 (10.18 KB)

📎 MLTrendE_V2.mq4 (12.84 KB)

Source: MQL5 #10576

Verification code Refresh