This script uses the ATR (Average True Range) indicator to create dynamic support and resistance levels for a specified timeframe. Key features include:
1. ATR Calculation: The script calculates the ATR value based on the user-defined timeframe and lookback period. 2. Dynamic Levels: Support and resistance levels are calculated by adding and subtracting the ATR value to/from the current closing price. 3. Last Bar Execution: Support and resistance levels are displayed only on the last bar of the chart. 4. Labels: The levels are displayed as labels on the chart, positioned to the right side of the price.
This indicator helps traders quickly identify volatility-based support and resistance levels.