Feb 11, 2012

dan-rsi-adx EA

This robot from 27th March, 2010, was so flawed I felt sorry for it and gave it's code a quick tweaking.

Before:



After:


From a $10,000 loss to an approximate $1,500 loss.

This robot used the RSI indicator to open trades, and the ADX to close them. This meant that if the indicators weren't a match to begin with, the trade would close almost instantly for a small loss.

I modified it to open trades only when both RSI and ADX indicators were in agreement, and close them when both did not agree.

The back-test was run on the EURUSD, 1 hr chart, from 1-1-2011 to 1-1-2012. Stop-loss 200, take-profit 500, trailing-stop 50.

Several back-tests from previous robots show some profit up until about the middle of the year, and then they decline. I'm not sure if this is legitimate or another problem with my history data. With my previous batch of history data, a similar thing happened, only it was a lot more severe. It seemed I couldn't code a robot which would fail, as long as I didn't test it past about June 2011. But after then, I couldn't code a successful one.

If I had bothered to demo test this particular robot at all, it wouldn't have been for long.

Just for fun, I re-coded this strategy using the latest code base, and included a trade trigger. It's available here. It still lost, for the most part, until I did a little coding magic, optimized the robot settings, and ran it on a back-test using H4 time frame.


It's now a winner! But it has one of those equity curves that suggests that it wins more by luck than by having an actual viable strategy.

Note: this test was from 1-1-2010 to 1-1-2012, although it had pretty much the same profit when run just from 1-1-2011 to 1-1-2012.


Run with the same settings on GBPUSD, the results are not so impressive:


Most robots which show some success on one currency pair totally bomb on others. Sometimes optimizing the settings (stop-loss, take-profit, etc) helps, but usually not. I always thought a decent strategy should work on any currency pair, but this does not seem to the case.