I was recently contacted by a reader that specializes in currencies and commodities who trades a large portfolio. He has been successful over the years trading a very simple breakout/trend following system which he wanted to have automated and back-tested. In return for my efforts automating it and back-testing it, I would get, well, the system itself. And because neither him nor I believe in trading secrecy or selling systems, we decided to share it here on the site for free with the world. Thank you Pavel for your contribution.
The system operates on the daily time frame based on closing price information.
Long entries are only allowed if the 50-day moving average is above the 100-day moving average.
Short entries are only allowed if the 50-day moving average is below the 100-day moving average.
If today’s closing price is the highest close in the past 50 days, we buy.
If today’s closing price is the lowest close in the past 50 days, we sell.
Extremely simple entry rules, although counter intuitive: Buy high to sell higher! Most traders operate on the principle of buy low - sell high. So, buying something that is already high is definitely mentally tough for many out there.
Stop loss and position size
The stop loss is adjusted according to the volatility of the instrument. That is, if the instrument is going through a volatile period, as measured by the ATR(100), then the stop loss distance will be greater and vice versa. The initial Stop loss is placed 3 ATR(100) below entry price for a BUY trade, and 3 ATR(100) above entry price in a SELL trade.
The position size is dynamically calculated in order to keep a constant risk% per trade. The larger the stop loss, the smaller the position size, so that if hit, the loss is the same as in any other position with a smaller stop loss distance and greater position size.
Having a dynamic stop loss and a dynamic position size, make the system flexible and adaptable to changes in the volatility of the instrument, and this is vital for its survival over the long run.
There is no target profit! The goal of the system is to follow a trend for as long as possible. How does it do that?
Well, a long position is closed when price has moved three ATR units down from its highest closing price since the position was opened.
A short position is closed when price has moved three ATR units up from its lowest closing price since the position was opened.
So, this 3 x ATR rule that defined the original Stop Loss, is also used as a Trailing Stop mechanism. But it doesn't follow the absolute highest or lowest price reached as the typical trailing stop does. It only follows closing prices.
That's it! The % risk per trade is defined by the trader, and that number will automatically define the position size in lots for each trade in particular.
Back test results
I ran a test on the EURUSD currency pair using 3% max risk per trade.
First from January 1, 2000 to January 1, 2010
(Click on images to enlarge)
And then an Out of sample testing from January 1, 2010 to November 14, 2012.
(Click on images to enlarge)
The system is definitely a profitable system with a pretty smooth equity curve pointing in the right direction. Unfortunately it doesn't trade frequently, with only 3 - 4 trades per year. Of course it can ride a trend for weeks or even months. So, its time in the market is not insignificant, but the number of entries is small which will limit your returns. Because of that, Pavel trades this strategy in a portfolio of different instruments so he gets more signals in total. According to him:
"I trade it successfully on all futures, hence I have far more trading signals per year. Of course, you can talk about it on the website. You can mention that I trade it on all futures, not only currencies."
I thank Pavel for his contribution to the site and his willingness to share his success. Real profitable traders for the most part don't believe in system secrecy or not sharing their systems. They know that's only a part of the equation. Discipline to follow it, and the right psychological mindset ultimately will define success or failure.
Here's the link for you to download the ex4 robot. You will also get the source code in MQL language so you're free to inspect and modify as you like.
Download 50-Day Breakout system
Needless to say, you should do your own due diligence before using this system. I haven't tested it on all currency pairs let alone futures. It may not work for every instrument, and in others you might need to tweak the settings here and there.
Results - 2014
Results - 2015
Moving Average crossover Indicator for MetaTrader
LT Trend Sniper - a Forex strategy that works
The Turtles Trading system automated (Expert Advisor for download)
Design of a EURUSD Donchian breakout strategy with proven statistical edge
Forex Rebellion doesn't work