Thursday, February 4, 2010

Is the FrAMA Cross EA successful?

In a nutshell: no, and maybe.

No-one was more surprised than me when I plucked a simple strategy out of the air to develop my MQL5 coding skills, and it actually showed some promise. This is the FrAMA Cross EA, which simply uses a moving average cross on a 1H EURUSD chart with the Fractal Moving Average indicator that comes with MT5. The two MA periods are 6 and 12, with a fixed stoploss of 50 pips. Each cross event reverses the direction of the trade.  My original blogpost for this EA is here.

In the absence of a strategy tester for MT5 so far, and witnessing the promising equity curve in the forward tests, I decided to code the FrAMA indicator into MT4 and backtest it. The formula is well documented under the Analytics section of the MT5 terminal help file.

So here's an MT4 custom FrAMA indicator, which gave me the satisfaction of behaving exactly the same as its MT5 counterpart.

I wasn't particularly surprised to see that the backtest using the above parameters is rather poor.  The equity curve from 1/1/2004 to now is like this:


Maybe there's some tweaking that can be done - there is an extended profitable period from last August - but I'm not going to bother because it tends to reinforce my experience that H1 charts are very difficult to trend-trade.

Not to be deterred, I set about optimising the parameters using the MT4 strategy tester. There are lots of ways to trend-trade Daily charts - is this another one? The answer is, as is usually the case with optimisation of EAs on daily charts, "maybe". Here's an optimised backtest of a FrAMA Cross EA on a Daily EURUSD chart with Fractal MA periods set to 2 and 58, ending at 31/12/2008.



… and here is the out of sample 1/1/2009 to present.



In case anyone is wondering, this is a legitimate use of the open-prices-only model for backtesting, because the EA gets its entry and exit signals from events detected in the previous completed bar. If you want to wait for half an hour, a 90% modelling backtest of every tick will look the same, and an EA of this type will behave almost to the dollar the same in live trading as it does in backtests. But notice that I didn't say that it will necessarily be as profitable - optimisation of daily charts introduces a big fluke factor, caused by the fact that the total number of trades is statistically too small.

So where to from here? Before even considering trading them live, I usually mothball EAs of this type for at least a year, dust them off, and see how they would have performed. With the massive peak in volatility from the GFC well behind us, maybe it's time to get into long term trend trading again. In the meantime, you can watch grass grow (average 1 trade every 3 weeks!) with the VOM version of the EA.