How to analyze a forex robot

forex robot

This is going to be a very interesting article, I know many of my readers won’t agree with me, but this is just my own view about how an EA should be analyzed. Before going further there are some basic things (some of them were previously discussed) we need to know. First of all we need to know if it survives to a 13 years backtest, if it doesn’t there is no point in analyzing that EA anymore. If it doesn’t survive in a backtest do you think it has chances of survival in real life where conditions are much worse? Imagine a boxer fighting in a gym. He uses body protections, softer gloves, punches are not so hard, after all it’s just a friendly sparring. If he can’t win such a friendly match do you think he has a single chance in the ring against a real and tough opponent and perhaps an unleashed crowd wowing for his opponent? I say he doesn’t have a single chance. Same goes for EAs. If it can’t pass the backtest it doesn’t have a chance of survival on the long run even if it has some astonishing good periods. So, here are my rules that defines a good long term performing EA:

1. It has to survive to a 13 years backtest. I’ve just explained why. It it doesn’t meet this criteria, trash it and don’t look back. And remember, even if it survives on backtest doesn’t guarantee profits or even survival in the wild, but at least it has a chance.

2. It has to trade every signal. What does that mean? Every strategy has entry and exit rules. Suppose a BUY signal triggers and the EA opens a long position. While the position is open, a SELL signal occurs. Normally, the EA should close the long and open a short instead because if it doesn’t do that, the backtests are further analysis are not relevant. Only some specific signals would be picked and large drawdown periods could be hidden by the optimizer. Not to mention different trades spreaded across different brokers or customers. What if I start trading earlier than you for example, I get a long while you start it later and catch a short? Our performances would be very different on the short run. Of course, the law of large numbers tell us that things are going to normalize after a long period of time, but once again, the backtests are any further analysis would be useless and not relevant.

3. Broker side Stop Loss and Take Profit should be used. Even if the EA handles its own trades internally and the main purpose is to hide them from stop loss hunters, bad things can happen like VPS/computer disconnects, power failure and many other things. It’s always a good thing to protect yourself with a broker side stop loss and take profit even if they are not your real SL/TP levels.

4. Don’t ever trade a system unless you know how it works. For example I would never trade using a grid or a martingale based EA because they will blow your account sooner or later, it’s not a matter of IF, it’s a matter of WHEN. And it will happen for sure. One of my first EA was a grid one. It was, and perhaps still is, the very first grid EA that survived to a 12 years backtest. And guess what? It got hit one month later. Not to mention that grids don’t trade every signal and rule no. 2 is broken. But if you know the risks and are willing to babysit it, go ahead, trade using a grid, but consider yourself warned.

5. Maximum historical drawdown in pips is one of the most important things you should know. Why? Because such a drawdown can happen tomorrow, no one can predict the market, and you have to be ready for it. The first question you should ask is: “My historical DD is X pips. My starting capital is Y dollars. If I lose X pips tomorrow, what would be my account status?” Starting balance should be adjusted in such a way to handle TWICE that drawdown without a margin call. Why twice? Because most of the time, Monte Carlo Worst Case Scenario is somewhere near 2*maximum historical drawdown. If you are too lazy to calculate MCWCS just multiply maximum historical drawdown with 2.

6. Your Risk:Reward ratio should be higher than 1:1. For example, you backtest the EA for 10 years. Your maximum historical drawdown in pips is 500. Your overall profit in pips is 10,000. Considering that fact that maximum historical drawdown can happen anytime, does it worth to run this EA? Well, the average annual return is 10,000 / 10 = 1,000 pips. You risk 500 pips to get 1,000, so Risk:Reward ratio is 1:2 which is a great ratio.

7. Profits should be equally distributed over the years. Suppose you backtest a system, backtest period is 10 years. Profit in pips is 10,000 pips. If it makes 7,000 pips during 4 years and only 3,000 pips during 6 years then you’d better trash the system because it’s curve fitted for a single market aspect which lasted 4 years. Every good system will have its flatness periods. This means that the EA passes trough a dry period and struggles to survive. It doesn’t win or lose money, or at least it doesn’t loose much, which is good. If the flatness period is more than 25% of backtested period that the system is not that good. Be prepared to suffer a 4 years flatness period which can start tomorrow. But it worth a try though.

8. If every rules are obeyed it means you have a good profitable long term system. But how well does it do in the short term? What’s why we have walk forward analysis for. It shows how robust the system is and how good is it in chasing the market. If it doesn’t have a good walk forward efficiency ratio (>=0.5) it means that although it is good on the long run (>5 years) it is very slow in chasing the current market and you need to wait until a proper market condition pops in.

9. Breaking support/resistance lines means nothing but closing above or bellow them means something. That’s why I tend to favor systems that use open prices only. Beside adding a bit of robustness and less broker feed dependency the results are more relevant. This is not a mandatory rule, I’ve seen good performing long term systems that don’t use open prices only but higher timeframes instead.

10. Don’t trade on lower timeframes like M1 or M5, it’s simply too much noise and nobody can predict anything on those timeframes, that’s why scalpers are looking at higher timeframes before placing a position.

Of course there is much more than that when it comes about EA analysis but this should be enough for now, I’ll be back with more articles about EA analysis if someone is interested. Please leave feedback!