How to test an expert advisor
A robot is tested like any system: honest settings, prices kept back, a demo run and small live size. A bought robot adds one more question: what was left out of the picture you were shown.
- Level 11 Your Trading Plan
- الدرس 22 من 25
- 6 دقائق قراءة
- 2 أسئلة
Test an expert advisor the way section 11.4 tests any system: a back-test with realistic costs and fills, a result on prices kept back from every choice, a forward run on demo and then the smallest live size. With a robot someone else built, also ask how the results on show were chosen.
The half of the curve that gets shown
The figure is the overfitting lesson’s result as a seller might present it. The setting was the best of eight on years 1 to 3, where it made +26.2R. On the three years that followed it lost 15.0R. Any back-test covering only the period a robot was tuned on is the left half of this picture.
Questions for any robot
| Question | Why it matters |
|---|---|
| Are the rules described? | A closed box cannot be judged, only watched |
| Which years were tested, and which were kept back? | Only prices kept back test the choice |
| What costs and what price detail did the test use? | Section 11.4 showed both changing the sign of a result |
| How many trades? | Under 100 leaves a margin of about 10 points |
| What is the largest loss against the average win? | See the next heading |
| Is there a live record, how long, and who verified it? | A back-test is a simulation |
Tester settings
MetaTrader 5’s help describes several ways of rebuilding prices inside a candle. Testing on real ticks from the broker is described as the closest to real conditions. “Open prices only” is offered as a quick first look, with the warning that stops and pending orders may trigger at prices different from the ones set. The tester also has a forward option that keeps back the latest part of the period, a half, a third or a quarter, and runs the chosen settings on it. The same help says that robots sold through the platform’s own store come with a demo version that can be run in the tester, which is worth doing before paying.
The curve that hardly dips
Some robots add to losing positions or double the size after a loss. These are known as grid and martingale methods. They win small amounts very often and lose a large amount now and then. In the figure, 46 of 50 trades win 10 dollars each and four lose 140 on average. The win rate is 92% and the record ends 100 dollars down. With wins of 10 and losses of 140, breaking even takes a win rate of 93.3%. A back-test of a quiet period may hold none of the large losses.
Then the usual stages
Run the robot on demo, on the broker and account type it will trade. Then run it at the smallest size. Compare its trades with the tester’s for the same days.
This course knows of no independent, published evidence that robots sold to retail traders give an edge. Unproven is different from disproved. Level 12 covers the sellers whose claims are simply false.
Key points
- An expert advisor needs the same tests as any system, on the account it will trade.
- The best of eight settings made +26.2R on the years it was chosen on and lost 15.0R on the next three.
- Tester settings for price detail and costs change results. Read the platform’s help for what each mode assumes.
- A 92% win rate lost money in the example, because four losses averaged 140 dollars against wins of 10.
مراجعة سريعة
لا تُحتسب هذه الأسئلة في نتيجة الاختبار القصير.
Common mistakes
- Accepting a back-test as a track record. A back-test is a simulation chosen by whoever ran it.
- Testing in the fastest mode and trusting the figures. Rough price modelling fills stops and targets at prices that were never available.
- Judging by the win rate. The robots with the highest win rates are often the ones that hold or add to losers.
- Testing on one broker and trading on another. The test has to be repeated where the money will be.
Another example
An advert for a robot quotes a win rate of 88%. Its report, read closely, shows an average win of 12 pips and an average loss of 95 pips. The expectancy is 0.88 × 12 − 0.12 × 95 = 10.56 − 11.40 = −0.84 pips a trade, before costs. With wins of 12 and losses of 95 the break-even win rate is 95 ÷ 107 = 88.8%. The robot wins nearly nine trades in ten and loses money.
Questions people ask
Do forex robots really work?
A robot does what its rules say, so the question is whether those rules have an edge after costs, and that is settled one robot at a time by testing. This course knows of no independent, published evidence that robots sold to retail traders make money for their buyers. Unproven is different from disproved.
What is a martingale strategy?
A martingale doubles the size of the next trade after every loss, so that one win recovers all the losses before it. Starting at 10 dollars, seven losses in a row cost 1,270 dollars and the eighth trade risks 1,280. Wins are frequent and small, and one long losing run can empty the account.
What is a grid trading strategy?
A grid places orders at regular distances above and below the price and adds positions as price moves against it, usually with no stop loss. It collects small profits while price moves back and forth. In a sustained trend the open losses grow with every step.
Should I buy an expert advisor?
Only after testing it yourself with realistic costs, on prices its seller could not have tuned it on, then on demo. Ask for the rules or at least the method, the largest loss and a live record confirmed by a third party. A price tag and a steep curve are not evidence.
الدروس مجانية للقراءة دون حساب. سجّل الدخول وسيتذكر PipCircle أين توقفت ويحفظ نتائجك ويمنحك شاراتك. سجّل الدخول مجانًا
Trading foreign exchange and CFDs carries a high risk of losing money. PipCircle Learn is education and is not investment advice.