The idea behind it
Volatility is not constant: markets alternate between quiet and turbulent phases, and the same strategy, stop distance or position size can behave very differently in each of them. An absolute ATR value is hard to judge on its own, because what is "high" depends on the symbol, the timeframe and the period of time.
This indicator answers a simpler question: is volatility currently high or low compared with the recent past of the same symbol? For every bar it calculates the ATR (Wilder smoothing), optionally expressed in percent of the close so that long price trends do not distort the comparison, and then calculates its percent rank: the share of the previous InpLookback values that were lower than the current one. A rank of 90 means that the current volatility is higher than 90% of the recent bars.
The rank is then split into three regimes using two thresholds: Low (rank at or below InpLowPercentile), High (rank at or above InpHighPercentile) and Normal in between.

Fig. 1. Volatility Regime below an H1 chart: low volatility, then a High regime during a sharp decline, then calming; black & white image per Code Base image guidelines (colors are configurable).
| Input | Default | Purpose |
|---|---|---|
| InpATRPeriod | 14 | Period of the ATR (2 or more). |
| InpNormalize | true | true: the ATR is measured in percent of the close; false: in price units. |
| InpLookback | 100 | Number of previous bars used for the percent rank (10 or more). |
| InpLowPercentile | 25.0 | Rank at or below this value means the Low regime. Must be greater than 0 and less than the high percentile. |
| InpHighPercentile | 75.0 | Rank at or above this value means the High regime. Must be less than 100. |
| InpAlertOnChange | false | Shows an alert when the regime changes between two closed bars. |
| InpShowInfoLabel | true | Shows the label with the regime, rank and ATR. |
| InpLabelColor | clrSilver | Color of the info label. |
The colors of the three regimes can be changed on the "Colors" tab of the indicator properties.
Donchian Channel with Breakout Alerts
Donchian Channel (highest high and lowest low of the last N bars) with a middle line, breakout arrows on the chart and alerts by pop-up window, push notification or e-mail when price breaks out of the channel.
Squeeze Momentum: Bollinger Bands Inside Keltner Channel
Squeeze Momentum indicator: detects periods of volatility compression, when the Bollinger Bands move inside the Keltner Channel, and shows the direction and strength of the momentum that builds up during and after the squeeze.
Chart Indicators to CSV
A script for MetaTrader 5 that exports the raw values of all buffers of every indicator on a chart to one CSV file, without changing any code.
Daily Range Budget
Shows how much of the average daily range (ADR) has already been used today, and plots the two prices that today’s high and low could still reach if the day ends with an average range. Shows how much of the average daily range (ADR) has already been used today, and draws the two prices that today’s high and low can still reach if the day ends with an average range.