Testing and Optimizing Expert AdvisorsTesting and optimizing Expert Advisors before using them in real trades is of great importance. This is not a secret for anybody. However, by no means all can test and optimize their EAs correctly. So we decided to draw your attention to this problem once again and asked well-known Expert Advisors writers for sharing their experiences in this field.
Every person we asked declared unambiguously that testing was a very important stage in the development of EAs. The Winner of Championship 2007, Olexandr Topchylo (Better): "Of course, testing is a necessary step. How can we otherwise get to know whether the Ea is profitable or not?" Indeed, there are no means other than to launch an EA in real trading to check the EA for its profitability. William Boatright (Wackena) taken the second place in the same Championship develops trend-following strategies. He informs that he cannot do without the Strategy Tester. Along with checking the EA for its profitability, the tester allows you to find and correct errors in the code. "When developing programs, testing is an obligatory procedure, you cannot always write even a small module without errors. Testing detects the main errors", said Yuriy Zaytcev (YuraZ) who had taken the 6th place with 35 thousand dollars on his contest account in the last-year Championship. "For example, you can develop a good TS, but not pay much attention to mechanical working with orders. I always say that mechanics cannot be simple. Simple working with orders is a frequently occurred mistake. The system itself gives a good signal, but the mechanical part fails - and the signal is missed. As a result, the TS does not produce the desired effect. Testing may help detect such problems".
Yuriy also pays attention to the age-old problem for newbies in the development of EAs - poor history: "It is important to get correct data before testing. The number of skipped bars must be minimized".This question has already been many times discussed in MQL4 Community, several articles have been published, but this problem is still persisting. Many unfledged EA writers, after they have obtained the first EA test results, don't even consider the modeling quality or obvious gaps in history. Another trouble for newbies is curve-fitting the results. "The main mistake is to over-fit and to make a wrong conclusion about the profitability of the EA. It is likely to be made by 100% of all newbies," thinks Olexandr Topchylo. We would find difficulty to quarrel with this statement: "holy grails" are often reported on traders' forums. In the reality, most of them lose their deposits very quickly. Curve-fitting the results is a really big problem. Trying to optimize their EAs on back-testing, many developers are sometimes carried away. They obtain their regular "grail", with a beautiful report, but not adjusted to the real market anymore. Well, EAs must be optimized to become more profitable. However, it is even more difficult than to test your EA. "This is one of the most complicated problems in the process of EA development. An Expert Advisor without parameters would be ideal. But there are no such EAs! So we cannot do without optimization", Olexandr Topchylo regrets. At the same time, Yuriy Zaytcev speaks for two types of curve-fitting: "Many perceive the notion of 'curve-fitting' as something negative. I think it is not so. Curve-fitting can be correct or incorrect. If, after having curve-fitted a certain period in history, you test the same inputs in the next period and they show a good quality, it means that the curve-fitting was correct". This method to detect optimal parameters of an EA can surely be accepted as such. When optimizing his EAs, Yuriy considers larger timeframes, too. And, "if the trend is up on these timeframes, I prefer to buy. After having tested the inputs in a larger range of data, I find the smaller range where the trading system shows the best values. Then I find better values in the selected range, but average ones, not extremes". In Yuriy's opinion, this approach may protect the creators of "grails" from subsequent disappointments on the real market. Considering his results at ATC 2007, this method is worth to be listened to. Olexandr Topchylo who never hid the features of his Expert Advisor shares his way of optimizing the tests this time, too. According to him, he uses a "standard approach" that is not a plaster for all sores. However, this method allows him to get a system estimate that is much closer to the reality.
This is also very interesting and can be used by the developers for creating their own EAs. On two preceding Championships, we had already heard about the regular optimization of Expert Advisors. Some EAs need to be re-optimized from time to time. This fact was, for example, mentioned by Harry Brinkhuis at Championship 2006. In his opinion, in optimization one can find a certain combination of the currency pair, stops, timeframe and settings, which would turn out to be the most profitable within the last 6 months. Then one can expect the EA to remain profitable during the next 4-8 weeks. William Boatright holds practically the same opinion: "Many believe that, for an Expert Advisor to be acceptable, it must be able to produce consistent results over several years of back-testing. I am not in this school of thought. I find the Forex market to be very changing. And, for trend-prediction type Expert Advisors that I try to develop, I find regular Optimization testing is required to keep Expert Advisor in tune with the Market." Well, his results at ATC 2007 clearly testify that this point of view is quite reasonable. Created: 2008.08.21 Author: MetaQuotes Software Corp.
hooshmand wrote:
Hi I wanna know that: "what kind of errors in EA, make it disqualified?" There are some "error 1" in my EA. but i think this is because of data lost in server. in other time the EA work properly. Can any one help me about this. thanks alot. Salam hamvatan! ahvaale shoma? bebakhshid injaa message midam behet. optione private message ro too profileton peyda nakardam Expertetoon vase mosabeghe taeed shod? man(Mehrdad) va doostam Rooholah expertemoon ghabool shod esmesh "A5 Robot" e tashvighesh konid :D hooshmand wrote:
Hi I wanna know that: "what kind of errors in EA, make it disqualified?" There are some "error 1" in my EA. but i think this is because of data lost in server. in other time the EA work properly. Can any one help me about this. thanks alot. Error #1 happens when you try to set new StopLoss or TakeProfit with same old value. This error consider as error in EA logic and EA will not pass precontest checking. 2008.09.15 09:06
Hi I wanna know that: "what kind of errors in EA, make it disqualified?" There are some "error 1" in my EA. but i think this is because of data lost in server. in other time the EA work properly. Can any one help me about this. thanks alot. |
|








Salam hamvatan!
ahvaale shoma? bebakhshid injaa message midam behet.
optione private message ro too profileton peyda nakardam
Expertetoon vase mosabeghe taeed shod?
man(Mehrdad) va doostam Rooholah expertemoon ghabool shod
esmesh "A5 Robot" e
tashvighesh konid :D
Maa motessefaane naresidim nahayisho upload konim
hanoz dar haale developim...