So following on from my previous post, this post covers the results for an EA based on the standard HA bar strategy, i.e.:
1. If the HA bar colour changes from red to green then (1) set a canbuy flag, and (b) set the buy threshold to the high of the 1st green HA bar
2. If a subsequent HA bar breaks the buy threshold before the colour changes again, buy on open of the following bar (and close any still open sell position)
3. Set a fixed takeprofit to a value X between 10 and 200 pips (value X selected based on optimisation)
4. Set a stoploss at the lowest low of the last Y bars (value Y selected based on optimisation)
5. Trail the stop to the lowest low of the last Y bars (same value Y as above) if the new value is closer than the previous value
And vice versa for sells.
After checking that the EA executed all actions correctly (which it did), I started to test each market on both the Daily and H4 timeframes (Daily first & if results not showing positive expectancy in both backtest & backapp periods, then tested H4), optimising for the 2 variables X & Y.
I found 15 markets where the EA produced a positive expectancy for both the backtest and backapp periods. 2 examples are shown below - the USDCHF on the Daily timeframe and GBPUSD on the H4 timeframe:
USDCHF Dail, backtest results:
View attachment 1223997
View attachment 1224003
USDCHF Daily backapp period:
View attachment 1224006
View attachment 1224009
GBPUSD H4 backtest period:
View attachment 1224012
View attachment 1224018
GBPUSD H4 backapp period:
View attachment 1224021
View attachment 1224024
The quality of the equity curves for each of the different markets varied (some with higher drawdowns, other with lower drawdowns, etc), and the variables X & Y varied between markets, reflecting the different levels of volatility, imo.
So having identified 15 markets showing positive results during both backtest and backapp periods, I put the results into a porfolio on EA Analyser and the combined results were as follows (take note the sizing for each market was different and was selected so the maximum single loss was < 1% of the $10,000 account starting equity = $100, so typically the sizing was between 0.04 - 0.08 lots):
View attachment 1224072
In % terms the total return during the combined 3.5 year backapp-backtest periods was 140%, with a max drawdown in % terms of 7.5% - not bad for an EA that took a couple of days to write.
So while the above EA looks pretty good - and I have put it into a demo account today to demo test for 1 month - I will now go back to the original HA / Smoothed Line EA and see if I can improve on the results from the basic EA - and post an update when I have one (maybe by this weekend).
Cheers, Sharks.