It’s nearly a whole year since I started what became known as ‘The Project’: writing some auto-traders (robots / bots / EAs) that could be left to their own devices but allowing for some human intervention if required. Whilst I have written countless robots over the past decade or so, this is the first bot project that has consumed so much of my time with near-100% focus, often at the expense of my own trading. The key criterium, for the long-term results, is a simple one: the robot must achieve 10x more percentage profit than drawdown. So, if it achieved 100% profit, the maximal drawdown must not exceed 10%. For the most part, that has been relatively easy to achieve.
The bulk of my time goes into tweaking and constant back testing, across at least three different brokers. All this time spent on development and testing has taught me some valuable lessons, not only about how bad the MT4 back testing can be, but also some for my own trading and how different the brokers’ price feeds can be. I thought some of you might get something from my lessons, hence the post – lessons learned in no order, just as they come to mind. DO NOT TRUST BACK TESTING RESULTS For some obscure reasons, the MetaTrader back testing is heavily biased to showing positive results. I have no idea why MetaQuotes made it so but it’s a total pain in the arse. You can not back test trailing stops within a one-minute bar, for example, as the tick data isn’t there; even if it was there, it would be vastly different between brokers, so you have to make the stops very conservative – far from price -to avoid spikes that the back testing would otherwise not show as stopping your trade. There is also the problem of variable spreads. I’ve seen some wild random spreads (not news driven) on ICM and Pepperstone that back testing won’t pick up: you’d be stopped in live trading or have profits much reduced with the lot size calculation, whereas back testing will say all is hunky dory and the bot grabbed a great trade. The only way to properly test the bot is on a live account, for several months. After each week of live testing, I like to back test that week to compare results, then code some workarounds so back and forward tests eventually align, as much as is possible; it will never be 100%. KEEP IT SIMPLE My previous bot traded five different setups. It achieved >1000% profit for around 20% DD, in less than a year – according to the back testing – but became a monster to tweak and maintain. The other problem was that the base variables for the whole program might not be the best for each setup. After many months in development, I’ve ended up spending many more weeks creating deconstructed bots: one for each setup. This has allowed me to reduce the number of variables in each program and fine tune each setup. Now I have individual bots tuned to achieve the long-term target 10:1 ratio, that collectively achieve a greater return than the all-in-one bot. That's just like normal trading: keep it simple and have specific rules for each setup that you trade. THE PERFECT WAY TO PROVE THE EFFECTIVENESS OF YOUR OWN TRADING SETUPS This has been the most beneficial experience, apart from the buzz of creating profitable bots. It takes so much longer to visually back test setups but once coded into a bot, it takes no time at all to confirm if a setup is really any good for manual trading. I have at least another ten setups to code and test – this will keep me busy until 2025. I’ve always said that any trading idea could be turned into a robot, if it’s any good: the information that a human trader uses is, after all, mostly just a load of binary inputs (on/off; true/false; it is or it isn’t). Has X done Y; is A greater than B, does Q=R; etc. Traders should trade like robots and thus the trading rules could be coded as such. KEEP TRADING THE SETUPS EVEN AFTER A COUPLE OF WEEKS OF DRAWDOWN I’ve seen, from the back testing, that most of my bots go into draw down, for a couple of weeks here and there. When looking at the daily bars, for those draw down periods, I find the average daily range has shrunk to way below normal, or price is stuck in a tight range – it’s no wonder that the bots struggle; I would have struggled to manually trade those periods. It’s pointless expending too much effort into coding workarounds for those periods – time is far better spent on optimising for ‘normal’ periods and just accepting that there will be some weeks of DD. Liquidity will invariably return but we never know when, so it’s just best to keep trading the setups, knowing that the tightly coiled spring will eventually go BOING! From working with countless traders, I’ve seen too many give up when they have periods of draw down; they go in search of better short-term trading ideas and leave behind the most valuable ideas that work in the longer term. Trading (manual or automated) is a long-term game that you cannot judge after just a few weeks. FIBONACCI RETRACEMENTS OF IMPULSIVE MOVES WORK … but they work a lot better when you have plenty of confluence. Of all the bots that I’ve written, trading Fib Rs has been the most successful – achieving 1,114% profit with 15% DD, in less than a year. I suspect there are a lot of Fib R bot traders out there, which helps to make the method more successful. I also suspect they will use different approaches to look for confluence – it doesn’t really matter what you use if it works. I use the information provided by the opening ranges but am looking to add a few other factors for added confluence. To benefit from the rewards of trading Fib Rs, you need to give price plenty of room to do its thing, such as in the last blog post – those occasional big moves will more than make up for extended periods of DD; just like with manual trading. Which are the best retracement levels to trade? Good question … the Fib R bot trades 38, 50, 62 and 78% retraces. Individually when just the one Fib R is traded, the results (from the same period that generated the 1114% profit) are: -
I’ll probably test others eventually but the above 4 are working perfectly well, if not all individually meeting my 10:1 goal. The compounded result, with ever growing lot sizes, is the key to big account growth with relatively low DD. WAIT FOR UPSIDE/DOWNSIDE REJECTION TO SIGNAL THE CHANGE OF DIRECTION FROM KEY LEVELS Japanese candlestick analysts will use individual, or a combination of, different types of bars – all with names that few traders will easily remember. If you’ve done my trading course, you’ll know that I dislike candlestick names and just prefer to see what a price bar has done, or (more importantly) a combination of price bars. When you combine several bars, you can identify upside and downside rejections (or call them pin bar combos if you must) that, when they occur at key levels, can be effectively used to confirm a trade. Success, without these rejection combos, is greatly reduced. NOT ALL BROKERS ARE CREATED EQUAL This has been the most surprising discovery. A bot that trades the exact same setups with the exact same inputs should roughly generate the same results on all brokers – at least that’s what any normal trader would assume. Alas, that’s not the case, since the liquidity providers generate their own prices. I’ve seen a difference of more than 10 points on DOW between brokers and individual M1 bars can vary tremendously. Just to give you an idea, back testing the Fib R bot just for April this year (a particularly successful month, mostly because of the massive move on the 4th)
Why FTMO performs so badly, relative to Pepperstone, has yet to be determined but it’s quite an eye-opener and consistent with all the bots that I’ve tested. However, results can be vastly improved with some FTMO-specific optimisation, to get it much closer to Pepperstone results. I could go on but that’s enough blah blah for this post. I might do a follow up in the future, as more bots are created and tested – the simple ABC zigzag should generate some interesting stats and allow me to prove just how valuable the FE127 is. In the meantime, … back to the project I go.
0 Comments
|
Archives
September 2024
|