> ## 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.

# Volume Spike Rule

> Reacts to a candle whose volume is far above its recent average: it can close an open trade, skip a new one, or require a spike before entering.

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

**Volume Spike Rule** reacts when a candle's volume is far above its recent average. You choose what a spike does with **What a spike does**: close an open trade when the spike runs against you, skip a new trade when the signal candle is a spike, or skip a new trade unless the signal candle is a spike.

A candle is a spike when its volume reaches **Spike size (× average)** times the average volume of the last **Average over (candles)** closed candles. The average includes the candle being checked.

## The three choices

* **Close the trade on a spike** acts on an open trade. It closes the trade when a spike candle runs against you, once the trade has been open for **Minimum candles held** whole candles and shows at least the **Minimum profit to close (%)** you set.
* **Don't enter on a spike** acts before a trade opens. It skips the new trade when the signal candle is a spike.
* **Only enter on a spike** acts before a trade opens. It skips the new trade unless the signal candle is a spike.

The two entry choices never close anything. **Minimum candles held** and **Minimum profit to close (%)** do not apply to them. A skipped signal is dropped, not delayed.

## When it acts

**Close the trade on a spike** looks at the candle that has just closed, on every candle while a trade is open. 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, then [Heikin Ashi Reversal Close](https://help.vole.bot/en/execution-rules/pro-exit-modules/heikin-ashi-reversal-close.md), then [Close on a Trend Reversal](https://help.vole.bot/en/execution-rules/pro-exit-modules/close-on-a-trend-reversal.md), then this rule. See [Exit Rules](https://help.vole.bot/en/execution-rules/exit-rules.md).

**Don't enter on a spike** and **Only enter on a spike** are asked just before the bot places the order for a new trade, whatever your entry timing. They judge the last closed candle. Among your entry checks, [Skip Spike-and-Fade Signals](https://help.vole.bot/en/execution-rules/pro-exit-modules/skip-spike-and-fade-signals.md) is asked first, then any Edge entry rules, then these two choices. The first check to refuse stops the entry.

On the policy and instance forms, the rule is listed under **Exit Trigger** in the **Pro Exit Modules** list, whichever choice you make.

## Settings

| Label on the form | What it means | Unit and range |
| - | - | - |
| **What a spike does** | The choice described above. | Choose one |
| **Average over (candles)** | How many closed candles the average volume is taken over. | Whole candles, 2 to 500 |
| **Spike size (× average)** | How many times the average a candle's volume must reach to count as a spike. | Multiples of the average, 1 to 50 |
| **Minimum candles held** | Close choice only. The trade must have been open this many whole candles before the rule can close it. Set to 0, there is no minimum. | Whole candles, 0 to 500 |
| **Minimum profit to close (%)** | Close choice only. How much profit the trade must show for the rule to close it. | Percent of your entry price, -50 to 50 |

### How Minimum profit to close works

The profit is measured at the closing price of the candle that just closed, against your entry price. For a short, profit means the price has fallen.

* **0** means no profit requirement. The rule can also close a trade that is in loss.
* **A positive number**, for example 1, means the trade must be 1 percent or more in profit.
* **A negative number**, for example -2, means the rule closes only while the loss is smaller than that. With -2, a loss of 1 percent may be closed, and a loss of 3 percent is left alone.

## Worked example

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

You hold a long. You set **What a spike does** to **Close the trade on a spike**, **Average over (candles)** to 20, **Spike size (× average)** to 3, **Minimum candles held** to 2 and **Minimum profit to close (%)** to 0. The nineteen candles before the one being checked each had a volume of 1000.

First, what counts as a spike. A candle with a volume of 4000 gives an average of 1150 over the last twenty candles, because the candle counts in its own average. Three times 1150 is 3450, and 4000 is above it, so the candle is a spike. A candle with a volume of 3000 gives an average of 1100. Three times 1100 is 3300, and 3000 is below it, so it is not a spike.

Now the trade.

| Candle after entry | Volume | What happens |
| - | - | - |
| 1 | 1200 | No spike. Nothing happens. |
| 2 | 4000 | A spike, but the candle points with your long. A spike in your favour does not close the trade. |
| 3 | 4000 | A spike pointing against your long. The trade has been open for three candles, which is more than the 2 you set, and **Minimum profit to close (%)** is 0, so there is no profit requirement. The bot closes the long at market. |

With **Don't enter on a spike** and the same volumes, a new signal whose candle had a volume of 4000 would be skipped. With **Only enter on a spike**, a signal whose candle had a volume of 3000 would be skipped.

![Bars showing volume per candle. Six earlier candles are about 1000 each, and a spike candle reaches 4000. A dashed line marks the average of 1150 and a second dashed line marks 3 times that average, 3450. The spike candle rises above it and points against a long.](https://mintcdn.com/vole-bot/FPSL8V4NlLCcmRfn/images/pro-exit/volume-spike-rule.svg?fit=max\&auto=format\&n=FPSL8V4NlLCcmRfn\&q=85\&s=8c7344560738fd074d186fc233076ddb)

A candle at 4000 clears the spike line, 3 times the average. Made-up numbers.

## Good to know

* Only whole, closed candles count. The rule never acts on a candle that is still forming.
* A market that reports no volume never produces a spike. For the entry choices, a candle with no usable volume is not refused. The same applies while there are fewer closed candles than **Average over (candles)**. For **Close the trade on a spike**, a market with no volume gives the rule nothing to act on.
* A closed trade shows the reason **Volume Exit**.
* A signal turned away by the entry choices is listed under **Refused** in [Entry Monitor](https://help.vole.bot/en/execution-rules/entry-monitor.md). Its details show the candle's volume as a multiple of the average and the spike size you set.


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