> For the complete documentation index, see [llms.txt](https://docs.candelacharts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.candelacharts.com/toolkits/trend-concepts-tm/bias-magnet.md). Agents can also search and read this documentation through its [MCP server](https://docs.candelacharts.com/~gitbook/mcp).

# Bias Magnet

<figure><img src="https://3870127617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCBVnUk5c5TVytimjy972%2Fuploads%2FQqL26kt6COMp4vRuAbuG%2Fdocs-trend-concepts-019.png?alt=media&amp;token=e7970f6d-d4b3-46a4-82ba-471ec566a0c5" alt=""><figcaption></figcaption></figure>

**Bias Magnet** is an adaptive baseline component that tracks trend direction using advanced half-trend logic. It provides a clean, responsive anchor line that hugs price without whipsawing during normal pullbacks, making it the primary foundation for identifying trend direction, market transitions, and institutional momentum.

### How It Works

Bias Magnet calculates:

* **Adaptive High/Low Bounds:** Evaluates highest highs and lowest lows over a dynamically tuned lookback period to establish reference levels.
* **Price & Moving Average Interaction:** Updates the baseline position when price decisively breaks beyond the average, stepping up in bull trends and stepping down in bear trends.
* **Consolidation Filter:** Integrates with the script's flat-range detection regime, freezing baseline steps and shifting to neutral grey during sideways consolidation to prevent false breakout signals.
* **Volume-Weighted Momentum (MFI):** Analyzes Money Flow Index across a smoothed window with a deadband to measure whether volume backs the directional move.
* **Dynamic Envelope & Transparency:** Modulates the opacity of the channel envelope based on MFI alignment—darker, more saturated fills when volume confirms the trend, and fading towards a hairline when money flow dries up.

The indicator updates in real time and confirms trend flips on bar close, plotting directional markers directly on the active baseline and driving the indicator's core alert engine.

#### Key Features

### Three Baseline Drawing Styles

Bias Magnet lets you customize how the anchor line is displayed on your chart:

* **Channel (Default):** Wraps a dual-smoothed curved baseline inside a volatility-adaptive envelope (ATR-based tube) with a dynamic gradient fill.

<figure><img src="https://3870127617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCBVnUk5c5TVytimjy972%2Fuploads%2FmBIB9TThC8GzMYjwW0Pe%2Fdocs-trend-concepts-022.png?alt=media&amp;token=53b28f66-1587-4bb2-b01e-aa245cd102d2" alt=""><figcaption></figcaption></figure>

* **Curved:** A smooth, flowing weighted moving average line that eliminates stepping artifacts while following price cleanly.

<figure><img src="https://3870127617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCBVnUk5c5TVytimjy972%2Fuploads%2FvBRF2fxDSGwYmLe5wz3A%2Fdocs-trend-concepts-020.png?alt=media&amp;token=881cebb6-8124-4cb3-b5e0-bb0d3befcc83" alt=""><figcaption></figcaption></figure>

* **Stairs:** The classic half-trend stepline style that locks flat between price displacement levels, clearly demarcating structural support and resistance shelves.

<figure><img src="https://3870127617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCBVnUk5c5TVytimjy972%2Fuploads%2FX1cDTzCJMG0y2dwsfjnT%2Fdocs-trend-concepts-021.png?alt=media&amp;token=65490bdd-6ece-4924-813c-15d207b06916" alt=""><figcaption></figcaption></figure>

### Consolidation Awareness & Flat-Range Shield

Unlike standard trend baselines that constantly flip back and forth in choppy markets:

* During clean trends, the baseline takes the theme's **Bull (green)** or **Bear (red)** color.
* When the market enters a detected flat range, the baseline automatically adopts the **Neutral Range Grey**.
* Steps are paused while consolidating, keeping you from getting chopped up in range-bound environments.

### Volume-Backed Dynamic Channel Fill

In **Channel** mode, the shaded zone between the upper and lower bands acts as an institutional volume gauge:

* **Rich, saturated fill:** High Money Flow Index confirms aggressive institutional volume driving in the trend's direction.
* **Faint, translucent fill:** Volume is thin or diverging from price, alerting you that trend strength is waning.

**Bias Magnet** eliminates the guesswork of trend analysis by combining price structure, volatility envelopes, and volume flow into a single, intuitive baseline.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.candelacharts.com/toolkits/trend-concepts-tm/bias-magnet.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
