OPEN-SOURCE SCRIPT

ATR Adaptive (auto timeframe)

53
This indicator automatically adjusts the Average True Range (ATR) period based on the current chart timeframe, helping traders define dynamic Stop Loss (SL) and Take Profit (TP) levels that adapt to market volatility.

The ATR measures the average range of price movement over a defined number of bars. By using adaptive periods, the indicator ensures that volatility is interpreted consistently across different timeframes — from 1-minute charts to daily or weekly charts.

It plots two main levels on the chart:

🔴 Low – ATR × Multiplier → Suggested Stop Loss (below the candle’s low)

🟢 High + ATR × Multiplier → Suggested Take Profit or trailing level (above the candle’s high)

Optional additional lines show ATR-based TP levels calculated from the current close.

💡 How to use

Select your desired ATR multiplier (e.g., 1.3× for SL, 1.0× for TP).

The script automatically detects the chart timeframe and uses an appropriate ATR length (e.g., ATR(30) on M5, ATR(21) on H1, ATR(14) on Daily).

Use the plotted levels to:

Set Stop Loss just below the red ATR band (for long trades).

Set Take Profit near or slightly below the green ATR band (for short trades, reverse logic).

⚙️ Why it helps

Maintains consistent volatility-based risk across multiple timeframes.

Avoids arbitrary fixed SL/TP values.

Makes the trading strategy more responsive in high-volatility markets and more conservative when volatility contracts.

Particularly useful for intraday and swing trading, where volatility varies significantly between sessions.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。