# ATR (Average True Range)

#### What is ATR?

ATR stands for **Average True Range**, a technical indicator that measures **market volatility**. It doesn’t indicate price direction, but rather how much an asset typically moves over a set period helping traders understand how “active” or “risky” a market currently is.

ATR is commonly used in setting **stop-loss** levels or filtering trades based on volatility.

***

#### Why Use ATR in Your Strategy?

ATR is incredibly useful for traders who want to adapt their strategies to changing market conditions:

* **Dynamic Stop-Loss and Take-Profit**: ATR lets you set exit levels based on actual market behavior, not arbitrary percentages.
* **Volatility Filter**: Filter out trades when markets are too quiet (low ATR) or too unpredictable (high ATR).
* **Adaptive Risk Management**: ATR can help scale your position size or aggressiveness based on current volatility.
* **Market Conditions Awareness**: Understand when markets are heating up or calming down, and adjust your strategy accordingly.

Using ATR allows your strategy to breathe with the market crucial for maintaining consistent performance in varying conditions.

***

#### ATR Settings in the AlgoBuilder

\
When adding ATR to your strategy inside the **AlgoBuilder**, you’ll be able to customize or use the following parameters:

| Setting Name     | Description                                                                                                        |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ |
| `ATR Length`     | Determines how many candles are used to calculate the average true range. Typical values: 14 (default), 10, or 21. |
| `ATR Multiplier` | Often used to scale stop-loss/take-profit distance. For example, 1.5x the current ATR value.                       |
| `Timeframe`      | Lets you pull ATR data from another timeframe if desired (e.g., 1h ATR used in a 5m strategy).                     |

***

#### Example Usage

**📥 Entry Conditions Using ATR**

**Volatility-Based Filter:**

> Only enter a trade when ATR is above a certain level (e.g., > 0.5%) to avoid low-volatility environments that often lead to false signals.

**Adaptive Confirmation:**

> Combine ATR with indicators like MACD or RSI, and only enter if ATR shows healthy volatility (e.g., > 1.0) confirming that the move has momentum.

***

#### 🎯 Take Profit / Stop Loss Examples Using ATR

**Dynamic Stop-Loss (Long Position):**

> Place a stop-loss at `Entry Price - (1.5 * ATR)`\
> → This allows the trade room to breathe while still managing risk.

**Dynamic Take-Profit (Long Position):**

> Target `Entry Price + (2.0 * ATR)`\
> → A realistic TP based on actual market volatility.

**Dynamic Stop-Loss (Short Position):**

> Set SL at `Entry Price + (1.5 * ATR)`\
> → Prevents premature exit during volatile moves upward.

**Dynamic Take-Profit (Short Position):**

> Set TP at `Entry Price - (2.0 * ATR)`\
> → Allows for smooth exits in fast-moving bearish environments.

***

#### Tips for Using ATR in the AlgoBuilder

* Combine ATR with **trend or momentum indicators** to filter out choppy periods.
* Use **multi-timeframe ATR** (e.g., 1h ATR in a 5m strategy) to get a broader view of volatility.
* Adjust **multipliers** based on the asset’s behavior: BTC might need a larger multiplier than SOL, for example.
* Consider ATR-based logic as both a trade filter and as dynamic SL/TP logic within your strategy.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://algotrade-1.gitbook.io/docs/indicators-library-and-guide/atr-average-true-range.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
