Trend Finder Expert Advisor For MT4
WE IMPROVED THIS EXPERT ADVISOR FOR YOU!!!
PLEASE NOTE: This expert advisor was publicly available for free usage on other websites and is not programmed by us. We explain the functionality and possible improvements of the EA. Furthermore, we are convinced that fully automatic Expert Advisors will fail in the long run. On the other hand, our semi-automatic approach with detecting the best setups and then activating our Expert Advisors (e.g. V-Power EA, EdgeZone EA) produced many successful traders and some of them even got prop traders at prop trading firms. Therefore, we added a similar semi-automatic trading feature (to allow only buy or only sell trades) to the free Expert Advisors. You can download the modified version here and enjoy!
Table Of Contents:
- Trend Finder Expert Advisor For MT4
- The Trend Finder Expert Advisor For MT4 – Entry Criteria
- The Trend Finder Expert Advisor For MT4 – Exit Criteria
- The Trend Finder Expert Advisor For MT4 – Room for Improvement
The Trend Finder Expert Advisor For MT4 utilizes a combination of the moving average and price action to find the trend on the active chart of a selected instrument and execute the trade accordingly. In this trading system, a crossover of a pair of moving averages is used as one trend filter. The other trend filter is a well-defined candlestick setup. With the use of the second filter, it becomes clear that the term “trend” in this trading system refers to a breakout of a candle formation.
To establish a price breakout in any direction, the expert advisor determines a high price or low price of an arbitrary number of candles. A buy setup will be used to illustrate the concept. A high price is established by getting the highest high of the last three candles counting from candle 3. Once the high price is set, at least one high of candles 1, 2 and 3 should be less than the highest price. A breakout of this highest price means a new trend has begun. When the breakout candle closes above the highest price, this means the open of the next candle is above the highest price. At that point, a buy trade would be entered. Refer to the image below for guidance.
The Trend Finder Expert Advisor For MT4 – Entry Criteria
The Trend Finder Expert Advisor attempts to find a trade opportunity on every new candle. Before the actual trade hunting operation, though, the robot checks first if the current drawdown is within acceptable range, if there are more than 100 bars on the current chart, if the take profit is greater than 10 pips and if the account has enough free margin to handle new trades. If everything is right, the robot looks at the technical tools for a possible trade entry.
The user is given some freedom on the manner of implementing the trading system. To find the best settings, the user can tweak any of the parameters available in Inputs. These parameters and their default values are explained below:
- Lots = 0.02 – Every trade opened by this robot has a lot size of 0.02 lot.
- TrailingStop = 45 – A trade should gain at least 45 pips for the trailing stop function to start working.
- Stop_Loss = 25 – Every trade opened by this robot has a stop loss of 25 pips.
- MagicNumber = 43210 – The robot assigns this number to every trade it has taken to be used later for trade management.
- Take_Profit = 55 – Every trade opened by this robot has a take profit of 55 pips.
- FastMA = 6 – This trading system uses a 6-period moving average for trend detection.
- SlowMA = 85 – This trading system uses an 85-period moving average for trend detection.
- Mom_Sell = 0.3 – The momentum value is subtracted from 100 to get a lower value that is used in momentum measurement. If the new value is less than 0.3, a sell signal previously generated becomes a valid trade entry.
- Mom_Buy = 0.3 – The momentum value is subtracted from 100 to get a lower value that is used in momentum measurement. If the new value is less than 0.3, a buy signal previously generated becomes a valid entry.
- UseEquityStop = true – Since this variable is true, the robot puts the real-time drawdown in monitor status on every tick to limit the losses to a certain percentage.
- TotalEquityRisk = 1.0 – If the account drawdown reaches this percentage (1%) of the account balance, all trades open on the current symbol will be immediately closed and the loss is accepted.
- Max_Trades = 10 – With this default setting, the robot is allowed to open at most 10 market orders on the current symbol.
The trading system makes use of various technical tools in an effort to find high-probability trade entries. These tools include candlesticks and moving average and momentum indicators. How these tools are used for trade generation is fully explained in the following:
- Candlestick – The expert advisor determines the highest high and lowest low of the three candles counting from candle 3. The values are obtained from the candles of the current period and symbol. To generate a buy signal, one of the last three candles should have a lower high than the highest high and the current candle should have opened above the highest high. To produce a sell signal, one of the last three candles should have a higher low than the lowest low and the current candle should have opened below the lowest low. See image above for a sample buy setup.
- Moving averages (6/85 periods, price typical, linear weighted) – The values of the moving averages are derived from the current candle of the current timeframe of the active symbol. A buy signal is indicated whenever the 85 LWMA is below the 6 LWMA, and a sell signal is provided every time the 85 LWMA is above the 6 LWMA.
- Momentum (14 period, price close) – Three values of the momentum indicator are generated. These values are derived from the previous three bars of the next higher timeframe of the active symbol. Then the values are subtracted from 100 to arrive at lower values. If any of the new values is less than 0.3, any trade signal generated by the moving average and candlestick will be confirmed for entry.
Once a trade signal has been defined and confirmed, the expert advisor will execute a trade with a lot size of 0.02. During trade entry, the stop loss and take profit are also set in place. As defined in Inputs, the stop loss is 25 pips and the take profit is 55 pips. In the actual trade, these values slightly vary. The actual stop loss is increased by the spread amount, while the actual take profit is reduced by the same amount. The trade is initiated at the open of a new candle.
In subsequent candles when another trade signal arises, a trade can be added on each candle as long as the maximum number of 10 orders is not reached. Subsequent trades opened by this robot have the same lot size, stop loss and take profit values as the initial trade. While a trade cycle may contain multiple trade orders, the expert advisor will manage each trade individually.
The Trend Finder Expert Advisor For MT4 – Exit Criteria
Trade management in the Trend Finder Expert Advisor is done in two ways depending on which scenario occurs. If a trade is winning and happens to gain at least 30 pips, the breakeven function comes in to secure the trade by placing its stop loss on the entry price. If the trade gains 15 more pips, the breakeven function takes effect. If not, the trade will be closed after sometime at breakeven. In case a trade is not able to gather 30 pips or goes in the wrong direction right away without seeing green pips, it will be exited at some point at the stop loss price.
The Trend Finder Expert Advisor For MT4 – Room for Improvement
The Trend Finder Expert Advisor must be improved programmatically to be able to generate profit for the trader. One such improvement is making sure the trades do not overlap or sit too close to each other in a tight price range. This might be the cause why the trading system failed to make money in testing. To resolve this issue, a minimum distance between trade entries should be established. Since the expert advisor takes a trade when a new candle has formed, it would not be difficult to apply this resolution into the code.