Looking for range detector

 
How can I detect that market is ranging? Is there an indicator for that? Indicator, which would return two values: top of range and bottom of range. To check when a breakout of the range happens.
 

The markets are always ranging and trending at the same time. When the market is ranging in one time-frame, it is consolidating in another time-frame, just waiting to continue the trend, or reverse. There is no top or bottom. The best way to lose all your money is to try picking tops and bottoms. In other words ... if you are looking for something to show you when to buy and when to sell, you are not going to find it, because it does not exist. What you can find, are indicators that show potential support and resistance levels, but even these levels are not fixed points. They are apotential trend reversals, or trend continuation zones. But ... you won't know which one (reversal or continuation) until it actually happens. And even then, it could change direction again, until a consensus is established between buyers and sellers and a new trend continues.

Anyway ... I actually have uploaded a collection of indicators and an EA to the CodeBase, which might give you an idea of how the markets behave. You can find them here: https://www.mql5.com/en/code/26812

NELODI Trading Terminal for MT5
NELODI Trading Terminal for MT5
  • www.mql5.com
"NLD_Main" is a trend indicator, designed to identify the most relevant trends and trend reversals for the currently selected time-frame. "NLD_Chart" is a custom price indicator, which can be used as a replacement for candles or bars, to make price movements easier to visualize, especially when the chart is zoomed out (to see more data...
 

What you said is kinda obvious - I know markets are ranging and trending at the same time. Depending on timeframe you're looking at of course.

However, you cannot deny, that when you look at chart at whatever timeframe, you can clearly differentiate periods when market was trending vs when it was ranging. You can do that "manually", aka with your own eyes and mind. I'm looking for indicator which does this differentiation:

1. automatically

2. in current, not the retrospect = it can say "now market is ranging"

3. it can say levels between which the market is ranging

 
PeterKalw TradingView alerts into MT4 MT5:

What you said is kinda obvious - I know markets are ranging and trending at the same time. Depending on timeframe you're looking at of course.

However, you cannot deny, that when you look at chart at whatever timeframe, you can clearly differentiate periods when market was trending vs when it was ranging. You can do that "manually", aka with your own eyes and mind. I'm looking for indicator which does this differentiation:

1. automatically

2. in current, not the retrospect = it can say "now market is ranging"

3. it can say levels between which the market is ranging

I can agree with you that it is possible to see where the market WAS trending or where the market WAS ranging if you look at chart history, but ... since the market is constantly changing depending on its current active participants, you can NOT clearly see or calculate what the market will be doing NEXT. As for NOW, you only need to look at the candle to see where the price is currently going and where its recent highs and lows are. In other words, if you look at the H1 candle, the high of the candle represents the top and the low represents the bottom range for the hour.

Chart USDCAD, M1, 2019.10.09 09:52 UTC, International Capital Markets Pty Ltd., MetaTrader 5, Demo
Chart USDCAD, M1, 2019.10.09 09:52 UTC, International Capital Markets Pty Ltd., MetaTrader 5, Demo
  • www.mql5.com
Symbol: USDCAD. Periodicity: M1. Broker: International Capital Markets Pty Ltd.. Trading Platform: MetaTrader 5. Trading Mode: Demo. Date: 2019.10.09 09:52 UTC.
 

Nelodi is right, but you can try these: 

https://www.mql5.com/en/forum/62590  (This one recalculates, test it first in strategy tester to understand it )

https://www.mql5.com/en/forum/66101 


And trade stocks if forex is confusing because they at least may have an intrinsic trend eg. Microsoft. ( This is the advice I give myself as well)

Indicators: BSI Trend and Channel
Indicators: BSI Trend and Channel
  • 2015.08.10
  • www.mql5.com
BSI Trend and Channel: Author: fxborg...
 
NELODI:

I can agree with you that it is possible to see where the market WAS trending or where the market WAS ranging if you look at chart history, but ... since the market is constantly changing depending on its current active participants, you can NOT clearly see or calculate what the market will be doing NEXT. As for NOW, you only need to look at the candle to see where the price is currently going and where its recent highs and lows are. In other words, if you look at the H1 candle, the high of the candle represents the top and the low represents the bottom range for the hour.

For example ... what do you see on this chart? https://www.mql5.com/en/charts/10781301/eurchf-m1-international-capital-markets

To be honest it is hard to see anything on these charts. Could you remove all the messing indicators and re-post?

 
PeterKalw TradingView alerts into MT4 MT5:

To be honest it is hard to see anything on these charts. Could you remove all the messing indicators and re-post?

You are looking for indicators to show you what the price is doing. Right? The chart I've posted shows exactly that. It's messy, because you expect something clean and simple. Well, the market isn't simple. It is messy, most of the time. If it wasn't so, then there would be no market, because each trade requires a buyer and a seller. If everyone wants to buy, or everyone wants to sell, the market simply does not move.

Anyway ... Brian just posted a few links. If you find my charts confusing, try something else. It's definitely not for everyone.
 
Brian Rumbles:

Nelodi is right, but you can try these: 

https://www.mql5.com/en/forum/62590  (This one recalculates, test it first in strategy tester to understand it )

https://www.mql5.com/en/forum/66101 


And trade stocks if forex is confusing because they at least may have an intrinsic trend eg. Microsoft. ( This is the advice I give myself as well)

Thanks Brian.

I think what I'm looking for should be based on Support&Resistance aka Pivot Points. But yeah, probably RSI should be 40-60 as well.

 

There are multiple ways to calculate pivot points, but the most commonly used one is (High+Low+Close)/3, using data from the previous candle. It doesn't show you a range, though, but a middle price, which can become support or resistance. Btw ... the chart I've posted earlier actually uses that formula to calculate pivot point in its Tick Chart (low part of the chart), as well as pivot points for longer time-frames, which are used to determine the long-term trend direction (dashed lines on the main/top chart).

 
NELODI:

There are multiple ways to calculate pivot points, but the most commonly used one is (High+Low+Close)/3, using data from the previous candle. It doesn't show you a range, though, but a middle price, which can become support or resistance. Btw ... the chart I've posted earlier actually uses that formula to calculate pivot point in its Tick Chart (low part of the chart), as well as pivot points for longer time-frames, which are used to determine the long-term trend direction (dashed lines on the main/top chart).

I didn't know HLC3 is the most commonly used to determine pivot points. Thanks for the hint.

 

Started researching this topic a bit more, I am sure codebase actually has plenty of indicators/ ideas.


Ideas so far:

1. If ADX is converging (and not diverging) might be start of a range

2. Check if ichimoku blue line is flat 

3. Check this link might be helpful https://www.forexfactory.com/showthread.php?t=938423 

 it has the bands for range if bands are flat and the pivot points and stuff like that and a whole trading system

4. This one might be the most interesting https://www.mql5.com/en/code/17898?utm_campaign=codebase.list&utm_medium=special&utm_source=mt4terminal