Consolidation can not last too long, because eventually the market becomes more and more unstable. Most traders consider that consolidation as stabilization of prices.
In fact, the longer the market remains consolidated, the more unstable it becomes.
Market consolidation has its own cycles. At the beginning of their formation traders are still mired in uncertainty regarding the price and it varies. If this condition continues, the view of traders on the value of the asset remains unchanged, while the market is not new information that might change this view. While the new message is not received, consolidation is becoming more and more narrow - to the point where consolidation will be very unstable, this is where new trends are emerging.
The indicator looks for and displays the areas of consolidation and channel movement. If the channel of linear regression over the past Nlin bars has a width not more than 2 * range of pips, then draw a new channel. In the future, you can work at the breakdown. The arrows indicate the entries, stop-losses. Please note that the well penetrates not only the morning Flat, but steady movement in the early U.S. session, or at an exit of news. And this feature can also be used in trade. Featured pair - EURUSD, EURGBP, M15 timeframe, the default setting is for them. The indicator also works well in other time frames, up to the weekly.
Variables S1 - Minimal length channel of the linear regression S2 - Max. channel height in pips S3 - The aim at breakdown S4 - Used to calculate Close, if false - High / Low S5- Number of bars to calculate