> For the complete documentation index, see [llms.txt](https://algotrade-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://algotrade-1.gitbook.io/docs/indicators-library-and-guide/supertrend.md).

# SuperTrend

#### What is SuperTrend?

**SuperTrend** is a popular trend-following indicator that helps traders identify the current market direction and generate buy/sell signals based on volatility. It overlays directly on the price chart and adjusts its position depending on whether the trend is bullish or bearish.

It is calculated using the **Average True Range (ATR)** and a **multiplier**, creating a dynamic trend line that shifts color and position when a reversal is detected.

***

#### Why Use SuperTrend in Your Strategy?

SuperTrend is widely used because it’s simple, visual, and highly effective in trending markets. Here's why it’s useful:

* **Clear Buy/Sell Signals**: When price crosses the SuperTrend line, it changes color and signals a potential entry.
* **Trend Confirmation**: It helps filter trades in the direction of the larger trend.
* **Dynamic Stop Loss Tool**: Many traders use the SuperTrend line as a trailing stop-loss reference.
* **Works Well With Other Indicators**: Combine with RSI, MACD, or OBV for confluence.

***

#### SuperTrend Settings in the AlgoBuilder

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

| Setting Name       | Description                                                                           |
| ------------------ | ------------------------------------------------------------------------------------- |
| `ATR Period`       | Controls how volatility is measured. Default is 10. Lower values = more reactive.     |
| `Multiplier`       | Determines the distance between price and the SuperTrend line. Common range is 1.5–3. |
| `Timeframe`        | Timeframe on which SuperTrend is calculated (e.g., 15m, 1h, etc.).                    |
| `Direction Filter` | Choose to trigger trades only in a specific direction (Long-only, Short-only, Both).  |
| `Crossover Signal` | Enable signal when price crosses above or below the SuperTrend line.                  |

***

#### Example Usage

**Entry Conditions Using SuperTrend**

**Trend Reversal Entry (Long):**

> Enter long when price closes above the SuperTrend line and it flips from red to green.\
> → Signals a potential shift into an uptrend.

**Trend Pullback Entry (Long):**

> Enter long on pullback if price touches the SuperTrend line but doesn’t close below it.\
> → Acts as dynamic support in an uptrend.

**Trend Reversal Entry (Short):**

> Enter short when price closes below the SuperTrend line and it flips from green to red.\
> → Indicates a potential downtrend beginning.

**Trend Pullback Entry (Short):**

> Enter short on pullback if price taps the SuperTrend line but stays below it.\
> → Uses SuperTrend as dynamic resistance.

***

#### 🎯 Take Profit / Exit Examples Using SuperTrend

**Long Exit – Price Breaks Below SuperTrend:**

> Exit your long when price closes below the green SuperTrend line.\
> → Indicates trend might be reversing.

**Long Exit – SuperTrend Flip to Red:**

> Exit if SuperTrend flips color from green to red.\
> → Strong signal that momentum is shifting.

**Short Exit – Price Breaks Above SuperTrend:**

> Exit your short when price closes above the red SuperTrend line.\
> → Suggests bears are losing control.

**Short Exit – SuperTrend Flip to Green:**

> Exit if SuperTrend flips color from red to green.\
> → Possible early signal of trend reversal.

***

#### Tips for Using SuperTrend in the AlgoBuilder

* SuperTrend works best in **trending markets**, and may produce false signals in sideways conditions.
* Adjust the ATR and Multiplier to better suit your timeframe:
  * Short-term (scalping): lower ATR and tighter multiplier.
  * Long-term: higher ATR and wider multiplier.
* Combine SuperTrend with **momentum indicators** like RSI or MACD for confirmation.
* Use it as a **filter** to avoid counter-trend trades or exit early if trend weakens.
