Wedge pattern 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:
- Wedge pattern Expert Advisor For MT4
- The Wedge pattern Expert Advisor For MT4 – Entry Criteria
- The Wedge pattern Expert Advisor For MT4 – Exit Criteria
- The Wedge pattern Expert Advisor For MT4 – Room for Improvement
The Wedge pattern Expert Advisor For MT4 attempts to trade the financial markets using its own interpretation of the famous wedge price pattern. The user can see how the robot trades this pattern by looking at the interaction between price and a pair of trend lines. The trend lines connect the recent two swing highs and swing lows made by price for a certain number of bars. Also, two groups of up and down arrows are displayed on the main chart, marking the latest 10 fractal points on the upper and lower sides of price.
By observation, the expert advisor does not really trade a wedge pattern by its definition. Most often various types of triangles are being shown and traded by the robot, including symmetrical, descending and ascending triangles. On the other hand, a wedge is a different breed of price pattern. Normally, it appears at the extreme parts (up and down) of price movement and precedes huge price reversals. This expert advisor is not used in this manner.
The Wedge pattern Expert Advisor For MT4 – Entry Criteria
The Wedge Pattern Expert Advisor draws, moves or updates the objects on the chart on every tick. These objects include the trend lines and arrows. When a new candle has formed, the expert advisor will check if there are trades on the current symbol and inspects them if their stop losses can be moved to breakeven or trailed. After this, the program looks at the number of bars if it is greater than 100 and if the take profit is set higher than 10 pips.
There are some parameters that the user must look into, get the hang of and tweak as necessary to run the expert advisor in his style of trading and generate profits. The most important parameters are listed below:
- IncreaseFactor = 0.001 – With this default value, the lot size of subsequent trades is not increased. When this value is increased, the expert advisor could define a lot size that is way higher than normal for new trades, which might be dangerous to the trading account. It is better to keep this value untouched.
- Lots = 0.01 – Each trade has a fixed lot size of 0.01 lot.
- TrailingStop = 40 – When a trade has earned 40 pips, trailing stop starts working.
- Stop_Loss = 20 – Each trade initiated by the robot has a 20-pip stop loss.
- MagicNumber = 1234 – This integer is attached to each trade to make trade management easy.
- Take_Profit = 50 – Each trade taken by the expert advisor has a 50-pip take profit.
- FastMA = 6 – The period of the fast-moving average is 6.
- SlowMA = 85 – The period of the slow-moving average is 85.
- Mom_Sell = 0.3 – The momentum value should not exceed this value for a sell trade to be valid.
- Mom_Buy = 0.3 – The momentum value should not go beyond 0.3 for a buy signal to be valid.
- UseEquityStop = true – If true, trades will be liquidated if a certain drawdown is reached.
- TotalEquityRisk = 1.0 – If the drawdown on the trading account reaches one percent of the account balance, all trades taken by the robot will be closed at once to protect the capital.
- Max_Trades = 10 – The robot can take up to 10 trades in a trading cycle as the situation arises.
- FractalNum = 10 – This is the number of fractals shown on the chart. This means that the number of up fractals drawn is 10 and the number of down fractals drawn is 10.
In addition to the objects drawn on the chart, the expert advisor uses two other technical indicators to define and confirm a trade entry. These two indicators and their settings are presented below, along with treatment on how the trend lines or wedge is used for generating a signal.
- Moving averages (periods 6 and 85, linear weighted, price typical) – A pair of moving averages is used to define the primary trend and hence the direction of potential trades. The linear weighted moving averages are used on the next higher period of the current symbol, and values are taken from the current candle. If the fast LWMA is above the slow LWMA, the trend is up. If the fast LWMA is below the slow LWMA, the trend is down.
- Momentum (period 14, price close) – The momentum indicator is used for confirmation of a trade entry. The momentum is used on the next lower period of the current symbol, and data are obtained from the three previous bars. If any one of these values is below 0.3, the signal for buy or sell entry is confirmed.
- Trend lines or wedge – A pair of trend lines is superimposed on price to mark the recent two swing highs and swing lows. These trend lines move along with price as new swing highs and lows are made. Only one pair of trend lines exists on the active chart. If the upper trend line is pointing down, the lower trend line is pointing up and the distance between the price coordinates of the lower trend line is less than 20 pips, a buy signal is generated. If the upper trend line is pointing down, lower trend line is pointing down, and the distance between the price coordinates of the upper trend line is less than 20 pips, a sell signal is given.
Once a trade signal is determined and confirmed, the expert advisor will execute a trade with a lot size of 0.01 lot. Upon trade execution, the take profit and stop loss are also specified. While the stop loss appears to be 20 pips in Inputs, the actual stop loss price is greater than this value by the amount of the spread. At the same time, the actual take profit price is less than the 50 pips take profit defined in Inputs by the same amount.
The Wedge pattern Expert Advisor For MT4 – Exit Criteria
The Wedge Pattern Expert Advisor can execute up to a maximum of 10 trades if the user keeps the default setting. Apart from the preset take profit and stop loss limits, trades can be closed at other prices due to the use of breakeven and trailing functions. While the latter two functions aim to protect the profits gained by winning trades, they actually disturb the balance between risk and reward for better or worse.
The Wedge pattern Expert Advisor For MT4 – Room for Improvement
The performance of the Wedge Pattern Expert Advisor in back testing was poor. At the beginning of testing, the equity curve soared high, but eventually went back down below the breakeven point. Testing ended with minimal loss for the trading account. Testing done over a period of seven months’ worth of historical data showed that the robot took trades late into the testing period. Therefore, the testing result cannot be used to provide an insight into the profitability of this trading system.
The trading metrics in testing were not favorable overall. Profit factor was less than one, win rate was just 32 percent, and drawdown was high (around five percent). This means that the program is not yet suitable for live trading. Further testing is a must, and code review might be another area to explore.
One apparent flaw in this trading system is the congestion of trades in a tight price area, which could cause huge drawdowns and frequent liquidation of trades in a trade cycle. Trades of the same type should be spaced out evenly or at least a minimum distance is set between them to address this issue. Additionally, stop losses of trades should be adjusted collectively rather than individually.