Can we possibly utilize a third, much longer time frame MA to prevent whipsaw and loss trades? Possible ideas are
Only trade in the direction of the trend indicated by the longer MA
If the longer MA has a flat gradient, we are in a sideways market so avoid trading.
Add envelopes to possibly switch strategy to range trading/mean reversion?
You can see from the above screenshot that the final months of 2010 lead to some big losses. The yellow line is the third longer MA (simple), setup for an 8 hour period and quite clearly shows a sideways market in the middle. The EMA for the same period was a little too erratic, especially around the earlier trend starting in late August.
Seeing this chart makes me realize that simply checking for a flat gradient at a single instance isn’t really sufficient. Obviously when trends change, the MA will change direction and the gradient will be flat. What we really should be doing is checking that the gradient has been flat “for some time.” How long that time is needs to be tested, but in theory, if it’s been flat for a couple of days then perhaps we should presume we are in a sideways market and hold off trading.
The next question would be, when do we know we are out of the sideways market and it is safe to trade? I guess we would need some significant move – perhaps this is where we should be using standard deviations or a log scale to determine this.
Another period of interest is in the above chart is Mid-Jan 2010 to early Feb 2010. There is a clear downward trend but the strategy continues to lose money. In this scenario, if we checked against the longer MA for the presence of a sideways market, we wouldn’t find one and continue to trade.
However, the chart below is a bit of a problem. We can see that the Gradient (period of 3, 8 hour) of the slow MA (12, 8 hour) was actually rather high, around the -50 degrees mark. So despite the market being non-volatile, there was a fairly strong trend. Therefore, definitely not a sideways market… So why the losses?
We can see that the Gradient (period of 3, 8 hour) of the slow MA (12, 8 hour) was actually rather high, around the -50 degrees mark. So despite the market being non-volatile, there was a fairly strong trend. Therefore, definitely not a sideways market… So why the losses?