I’ll be posting some of the Expert Advisors that I programmed here…. Free free to use the code or modify it, but do keep the copyright information and link. Unfortunately, none of the EAs come with a “Read Me” file, so some of you may have difficulties figuring out what each parameter in the EA is for… In most cases, just sticking to the default values would be fine… I plan to include a “Read Me” file for each EA as soon as I’m free… Meanwhile, I would very much appreciate it if there’s any suggestions on how to improve the EAs…. Just drop me an email or leave a comment….
TREND FOLLOWING EXPERT ADVISORS
1) Buy On Dips Sell On Rallies (Version 2) (Download Here)
This EA is based on the strategy I mentioned in an earlier post. It attempts to identify the current trend and tries to buy on dips in an uptrend and sell on rallies in a downtrend. I decided not to implement Point 4 because my testing shows that it does not lead to better results.
Note: The modeling quality is way too low… Too many mismatched bars… Got to download higher quality price data…Will upload more accurate test results when I have more time on my hands…
2) Turtle Trading System by Richard Dennis
This Expert Advisor is based on the trading system taught by Richard Dennis. If you are not familiar with the experiment, you can find out more here. I programmed this EA some time ago.. so I don’t remember if I have followed all the rules strictly in this EA, but it shouldn’t be too different from what Richard Dennis taught…
In addition to the original turtle trading rules, I’ve written 3 more versions based on some slight modifications of the rules…
- Version 1 (Download Here)This version is based on the original turtle trading rules. However, instead of calculating N, I used the ATR(20) indicator to determine stop loss.
- Version 2 (Download Here)This version allows the stop loss to be configured. Users can now choose to place the stop loss 4N away, instead of 2N as in the original rules. However, regardless of where the stop loss is, risk is kept at 2% per trade because lot size is adjusted accordingly.Another major change is the inclusion of a filter. Buy orders are placed only when MA(50) > MA(200) while sell orders are placed only when MA(50) < MA(200).
- Version 3 (Download Here)This version uses the zigzag indicator to determine the stop loss. Specifically, for buy orders, stop loss is set at the previous trough. For sell orders, stop loss is set at the previous peak. This version also uses MA to filter trades.
- Version 4 (Download Here)Similar to version 3, except that no MA filter is used.
I backtested the 4 versions using EURUSD, GBPUSD, USDCHF, USDJPY and EURJPY. All tests were done with modelling quality greater than 85%. The results are recorded in this spreadsheet. Personally, I like version 3 most… although it doesn’t generate the most profit, it has one of the lowest drawdowns….
