Experimental : This script identifies the consolidation of a stock for selected time period. The consolidation period and range can be configured. 2 levels of consolidation levels can be selected. i.e Strong and medium. The range for strong and medium level of consolidation can also be configured by the user.
A movement in the direction of breakout of the consolidation level is observed most of the times. I have also added reversal line/stoploss line, so that the breakout movement is cancelled once that line is crossed by the candle close.
Currently consolidation levels are configured for 5 minute chartBANKNIFTYNAS100USD. Can be reconfigured easily for any timeframe.