> ## Documentation Index
> Fetch the complete documentation index at: https://help.vole.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Heikin Ashi Reversal Close

> Closes a trade when several Heikin Ashi candles in a row turn against it.

> [!NOTE]
>
> This screen is part of the Vole Bot package.

**Heikin Ashi Reversal Close** leaves a trade early when the Heikin Ashi candles turn against it. Heikin Ashi candles are smoothed candles that make trend changes easier to see. They are the same candles you get when you switch a chart to Heikin Ashi. When a run of them points against your trade, and each one has a real body rather than a tiny one, the bot closes the trade at market. Use it to leave when the trend visibly flips instead of waiting for your stop.

A Heikin Ashi candle points against a long when it is red, and against a short when it is green.

## When it acts

The rule looks at the candle that has just closed, on every candle while a trade is open.

* It starts counting when you enter. Candles that closed before your entry never count.
* It keeps a run count. A candle that points against your trade and has a big enough body adds one. Any other candle sets the count back to zero. That includes a candle of the other colour, a candle with a body that is too small, and a flat candle.
* When the count reaches the number you set, the bot closes the trade at market.
* Your exits are checked in a fixed order on each closed candle, and the first one that fires closes the trade. A stop or take profit that the candle has already reached comes first, so if the same candle also hit your stop, the trade closes on the stop and this rule does not fire. This rule comes next, then [Close on a Trend Reversal](https://help.vole.bot/en/execution-rules/pro-exit-modules/close-on-a-trend-reversal.md), then [Volume Spike Rule](https://help.vole.bot/en/execution-rules/pro-exit-modules/volume-spike-rule.md). See [Exit Rules](https://help.vole.bot/en/execution-rules/exit-rules.md).

On the policy and instance forms, the rule is listed under **Position Modifier** in the **Pro Exit Modules** list, even though it can close a trade.

## Settings

| Label on the form | What it means | Unit and range |
| - | - | - |
| **Candles against you in a row** | How many Heikin Ashi candles in a row must point against your trade, each with a big enough body, before the trade closes. Set to 1, the first such candle closes the trade. | Whole candles, 1 to 5 |
| **Minimum candle body (% of ATR)** | How big a Heikin Ashi candle's body must be to count, as a share of ATR. ATR is the average distance candles have been moving lately, so the size you set follows the market's pace. A candle with a smaller body does not count and sets the run back to zero. | Percent of ATR, 5 to 50 |

## Worked example

The numbers below are made up to show how the rule counts. They are not typical or expected results.

You hold a long from an entry of 1000 on a made-up symbol. You set **Candles against you in a row** to 2 and **Minimum candle body (% of ATR)** to 20. ATR is about 10, so a body needs to reach 2 to count.

| Candle after entry | Heikin Ashi candle | Body | Run count | What happens |
| - | - | - | - | - |
| 1 | Green | 6 | 0 | Points with your long. Nothing counts. |
| 2 | Red | 5 | 1 | Against you, body big enough. The run starts. |
| 3 | Green | 3 | 0 | The colour is wrong for a long. The run resets. |
| 4 | Red | 1 | 0 | Against you, but the body is below 2. It does not count, and the run stays at zero. |
| 5 | Red | 4 | 1 | The run starts again. |
| 6 | Red | 7 | 2 | The run reaches 2. The bot closes the long at market. |

If candle 6 had also reached your stop, the trade would have closed on the stop instead.

![Six Heikin Ashi candles after a long entry. Candles 2, 5 and 6 are red with big bodies. Candle 4 is red with a small body, and candles 1 and 3 are green. The run count goes 0, 1, 0, 0, 1, 2, and the trade closes on candle 6.](https://mintcdn.com/vole-bot/FPSL8V4NlLCcmRfn/images/pro-exit/heikin-ashi-reversal-close.svg?fit=max\&auto=format\&n=FPSL8V4NlLCcmRfn\&q=85\&s=1a7fcd6c57bbd129193a2e694b1994c4)

The run count in the worked example. Made-up numbers.

## Good to know

* Only whole, closed candles are counted. The rule never acts on a candle that is still forming.
* The Heikin Ashi candles are the ones on the chart, built from the candle history the bot holds, not a fresh series that starts at your entry. Only the run count starts at your entry.
* In trade lists, a trade closed by this rule shows the reason **Heikin Ashi Reversal**. It is not grouped under **Reverse Signal**.
* It only closes trades. It never opens one and never moves your stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.