OPEN-SOURCE SCRIPT

Consolidation indicator

Updated
█ Overview
The "Consolidation Indicator" is a custom indicator for TradingView designed to identify consolidation periods in the price chart. Consolidation typically occurs when the price of an asset moves within a narrow range, and this indicator helps traders recognize such conditions. It can be a useful tool for traders looking to identify potential breakouts or periods of reduced volatility.

█ Indicator Settings
1 — Timeframe: This setting allows you to select the timeframe for which you want to analyze consolidation. You can choose from various timeframes available in TradingView.

2 — Price Smoothing Length: This parameter controls the smoothing of price data. You can adjust the value, with a minimum of 1, to control the level of smoothing applied to the price data.

3 — Average Range Length (range_len): This setting defines the length of the average range used in the calculation of the indicator. By default, it is set to 14.

4 — Threshold for Narrow Range (NR_threshold): The indicator will consider a price range as narrow if it falls below this threshold as a percentage of the average range. It is set to 80% by default.

5 — Consecutive Narrow Ranges for Consolidation: This parameter allows you to specify how many consecutive narrow price ranges are required to confirm a consolidation period. The default value is 3.

6 — Candle Color: You can choose the color for the consolidation candles. The default is a bright green color.

█ Indicator Output
The indicator visually displays consolidation and breakout periods on the price chart using colored candles and breakout icons.

• Candles: During a consolidation period, the indicator colorizes the candles in a specified color (default is green) with a transparency that decreases as the number of consecutive narrow ranges increases. This allows you to easily spot consolidation periods on the chart.

• Breakout Icons: The indicator also places a breakout icon (💥) below the price chart to indicate potential breakout opportunities. When a breakout condition is met, the icon appears with an orange color.

█ Alerts
The indicator provides two alert conditions:

1 — Consolidation Begins: This alert triggers when a consolidation period starts. It indicates that the price is moving within a narrow range compared to the average range.

2 — Breakout: This alert triggers when a potential breakout from the consolidation is detected.

█ How to Use
1 — Apply the "Consolidation Indicator" to your TradingView chart by adding it as a custom indicator.

2 — Customize the indicator settings based on your trading preferences, such as timeframe, smoothing length, and threshold for a narrow range.

3 — Monitor the chart for colored candles. The indicator will color candles to highlight consolidation periods.

4 — Look for the breakout icon (💥) below the chart, which indicates potential breakout opportunities.

5 — Set up alerts to be notified when a consolidation begins or a breakout is detected, helping you stay on top of potential trading opportunities.

Keep in mind that this indicator is a tool to assist in identifying consolidation periods, and it should be used in conjunction with other analysis methods for comprehensive trading decisions.
Release Notes
Added breakout direction based on recent price action (hullma)
Average True Range (ATR)consolidation

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


🔥Get the Cyatophilum Indicators today and automate them on Binance! => blockchainfiesta.com/strategies/

Discord Server: discord.gg/RVwBkpnQzm

I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
Also on:

Disclaimer