This TradingView Pine script implements a grid range volatility based indicator that displays dynamic horizontal lines on the chart. The lines are calculated based on the average true range (ATR) of the security being plotted, and the range can be adjusted using an input parameter. The distance between the top and bottom lines is displayed as a percentage in a dynamic label that updates with each new bar.
The script allows the user to choose whether to use red or black lines, and also provides options to set the number of days for range calculations, and the calculation type (either ATR(1) or ATR(x)). The script is designed to work with stocks, forex, and other securities that have price data.
To use this script, simply attach it to a chart and adjust the input parameters to suit your analysis needs. The dynamic lines and percentage label will be displayed on the chart, providing a visual representation of the range volatility of the security being plotted. The values of the highest and lowest lines can also be displayed as labels on the price axis, providing additional context for the range volatility.