ExpertZZLWA - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources



























To test the Expert Advisor, download the demo version of the ZigZagLW Additive indicator. The ZigZagLW addition.ex5 file must be located in the MQL5\Indicators\Market directory. Additionally, download the isnewbar library and add the isnewbar.mqh file to the MQL5\Include directory. Then download the EA file expert ZZLWA.mq5 , open it in the editor and compile it. The model is ready for testing.
The purpose of this publication is to demonstrate the potential profitability of the ZigZagLW Addition indicator, which can be simply described as a "trend indicator". For a detailed description of the indicator algorithm, please see https://www.mql5.com/en/market/product/2647 . We will use the code from https://www.mql5.com/en/code/19102 to develop automated system model trading based on specified indicators. Nothing was removed from the EA body - unnecessary lines were commented out and required code blocks were added. I also changed the EA name. Change markers have the following comments:
//****************************
//****************************
How it works: The EA buys and sells when appropriate signals appear, but it is not a reversal EA: all orders are closed with Stop Loss and Take Profit, and the number of open orders is equal to the number of signals.
Let's identify the main criteria for evaluating the effectiveness of automated systems and how the evaluation is performed. In the initial stages, we only have a model and want to understand if it is a good basis for building a system. This question can be answered affirmatively from the long-term test of the shape of the balance curve. If the balance curve shows a stable upward trend, the model can be considered the basis of a system to which filters, indicators, money management and other elements can be added. Generally speaking, the foundation must be stable to provide a good base for all additions.
To avoid manually evaluating different equilibrium curves with all parameters, let us set reasonable optimization limits by selecting (by trying to guess) the most promising set of parameters.
Here we can borrow some classic ideas. Here I mention a book that was not my first choice. I like the numbered list of traders rules. Other authors express these ideas inconsistently in the text. So, the book is "The Road to Trading" by John Piper. Open Chapter 9 and read:
Trading Secrets:
In our case, these secrets mean the following:
Three of the four rules can be implemented. Although some comments on the last item: signals do not indicate a long-term trend. The signal may change multiple times as the price moves toward take profit. Here, the signal plays the role of a stochastic indicator, but its required characteristics include early warning and forced formation at the beginning of a trend. Therefore, it is more correct to say that items 3 and 4 are partially covered by the indicators discussed here, but neither are fully covered. The problem with long-term trend indicators is disastrous lag. However, when such a signal is formed, it is also possible to use such a signal, for example for position scaling.
The first screenshot shows the optimization parameters. Only two parameters are optimized, stop loss and take profit:
This level parameter indicates the usage level of the ZigZagLW Addtion indicator, and the mode displays the EA operating mode. In the original mode , this EA plays the role of the original MT45 Expert Advisor; in the additive test mode it uses the signals of the ZigZagLW Addtion indicator; in the ma_test_mode it uses the MA intersection signals.
The EA is used in the MetaTrader 5 terminal from the access .metatrader5.com:443 server, as recommended in the article https://www.mql5.com/en/articles/385#files , using the data interval 1.01.2000 - 31.12.2016, in the control point mode on the M15 timeframe - as shown in the second screenshot:
The optimization results are attached here in the complete period.xml .
Consider the top result: There is clearly a long unsuccessful period at the end of the test, highlighted in orange.
The next optimization was performed on the data from January 1, 2012 to December 31, 2016. The result can be found in the file partialperiod.xml .
Let's select the best result and see how these parameters work for the entire time interval from 1.01.2000 - 31.12.2016.
The results may look promising for some users but not good enough for others. Here we only point out the undisputed facts:
Used as optimal parameters (StopLoss=3600, TakeProfit=6700, Level=Long_term1) is a compromise. It would be more interesting to test parameters that better suit the trader's recommendations, such as StopLoss=500 and TakeProfit=8000.
Let’s compare the same parameters of moving average crossover signals
The variant of the model with parameters StopLoss = 500, TakeProfit = 8000 is closest to the idea of an experienced trader, but from a psychological point of view it is the most complex one: due to the long steady state on the balance curve and a long list of losing trades (up to 145), few traders are able to follow the advice (maybe that is why it is still valid).
The advice and techniques described in most trading books actually work. In my opinion, these parameters will show profits even if the entry in the specified range is completely random.
Some automated systems differ significantly from other systems with the same order placing parameters and approximately the same number of orders over a selected time interval.
Given the extreme volatility of the Forex market, perhaps better results can be achieved in other, less volatile markets.
Attachment download
📎 expertzzlwa.mq5 (19.13 KB)
📎 isnewbar.mqh (1.41 KB)
Source: MQL5 #19646
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •