me and a buddy of mine are building some EA’s at the moment, and we are in need of fresh concepts and ideas. Which naturally took us here
One of the things we are looking to learn more about is quantitative ways to discern between ranging(sideways) and trending markets, so I thought we all might pool our heads together and share some ideas.
The reason we are interested in this is that if we could find a somewhat reliable set of parameters that indicate wether we are in a ranging or a trending market, one can adapt accordingly and use a suitable tradingsystem.
What we’ve been looking at so far is for example to set a limit on the Std.Dev or ATR of the market, and treat low volatility as ranging. Another consept could be to measure the difference between a slow and a fast moving average.
This is what we’ve been looking at so far, and it would be sweet to get a debate started and have other people share their views.
I wouldnt say low volatility automatically implies a ranging market.
Sometimes you have prices whipsawing all over the the charts, but is still in a ranging band.
Think of 6 possible markets:
up slowly
up volatile
ranging slowly
ranging volatile
down slowly
down volatile
So volatility will not predict or even tell if the market is trending or ranging.
How about just finding 2 touches of the upper band and 2 touches of the lower band and if these lower (or upper) touches differ less than 5%, market is ranging, if difference >10% (so higher highs and higher lows for example) the market is trending.
It all depends on your risk appetite realy though. Beware of optimizing too much and do not be afraid to over- or undertrade a bit, nothing is perfect and markets change constantly anyway.
There must be many ways. One cheap and quick way I did this for a simple demo was to say that if for example ema 21 - ema 55 > atr * 1 then it’s trending. The reasoning that there was some momentum. Rather than moving average braiding.This was only a quick method to test out another strategy and I wouldn’t use it necessarily. If you want to be sure you are in a trend then presumably you will have to wait a while to make sure as it it were, no matter what combination of indicator(s) you use. It’s easy to see the eur/usd trend up for much of last year. But was it so easy back in april 2009? In a way then some moving average scheme may be useful as the lag provides delay and confirmation. Infact that’s what I use moving averages for in the main to gauge the longer term trend, not for any buy or sell signals.
One needs to understand what ranging and trending are first. Ranging is like a rectangle and trending is like a line. To determine range and trend you need two points in time. For trend you draw a line through the points. For range you draw a vertical line through each point and a horizontal line through each point that is perpendicular to the vertical line and create a rectangle. In essence, price is always ranging and always trending at the same time. To be clear and precise, you must always declare an amount of time when you talk about ranging and trending. Price can be considered to be trending inside a range. If you have not studied Darvas Boxes, you may want to take a look at them.
Ah, I realise that i might have been a little bit vague, as the thing that is really killing some of my systems are the low-volatility periods where the market goes sideways.
I have no problem with the market continuously retracing, if only the moves are substantial enough.