> ## Documentation Index
> Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stopped-out heat

> Where stops ran, as zones behind the candles: the longs and shorts closed at a loss or forced out at each price.

<Frame caption="HYPE on 1-minute bars in the 0xArchive Terminal, 2026-10-18.">
  <img src="https://mintcdn.com/0xarchive-e895b8e7/WHp3_1k3l7bebYU5/images/terminal/examples/stopped-out-heat.webp?fit=max&auto=format&n=WHp3_1k3l7bebYU5&q=85&s=2e4ee54309781b5459e42709cd516276" alt="Stopped-out heat on a HYPE chart" width="1038" height="664" data-path="images/terminal/examples/stopped-out-heat.webp" />
</Frame>

<Card title="Open on a chart" icon="chart-candlestick" href="https://terminal.0xarchive.io/?symbol=HYPE&interval=1m&scripts=example%3Astopped-out-heat" horizontal>
  Load it on HYPE 1m in the terminal, then change its settings or open it in the script editor.
</Card>

A heat of stop runs: at each price, the **longs stopped** and the **shorts stopped**, netted, in the theme's down and up colours. The [Stopped-out footprint](/terminal/examples/stopped-out-footprint) shows each run bar by bar; the heat shows them as zones that stay behind the later candles.

Each value fades over the next bars. Set **Carry** to **Hold** in the heat's settings to keep each stop run drawn at full strength until price trades back through its price: stops above price that price never returned to stay drawn to the end of the chart.

## How it works

Each fill's [`takerWhy`](/terminal/guides/order-flow#why-each-side-traded) says what the taker's position did; `stop_long` and `stop_short` are closes at a loss, or forced by a liquidation or auto-deleveraging. [`plot.heat`](/terminal/guides/outputs#heats) declares two sides, and `heat.add(side, price, size)` in `onTrade` adds each stopped fill. With `combine: 'net'`, the default, a row where both sides were stopped draws only what is left.

## Try changing

* `combine: 'larger'` draws a row's whole total in its larger side's colour instead.
* `carry: 'hold'` makes Hold the heat's default.

## The script

```ts stopped-out-heat.ts theme={"theme":"github-dark"}
// Where stops ran, as zones behind the candles: the longs and the shorts closed at a loss or forced
// out at each price, from each fill's `takerWhy`. Each value fades over later bars; set Carry to Hold
// in the heat's settings to keep each stop run drawn until price trades back through it.
indicator('Stopped-out heat', { overlay: true, shortName: 'Stopped out' });

const tape = trades();
const heat = plot.heat('Stopped out', {
  sides: [
    { id: 'longs', label: 'Longs stopped', color: color.down },
    { id: 'shorts', label: 'Shorts stopped', color: color.up },
  ],
});

tape.onTrade((t) => {
  if (t.takerWhy === 'stop_long') heat.add('longs', t.price, t.size);
  else if (t.takerWhy === 'stop_short') heat.add('shorts', t.price, t.size);
});
```

## Next step

See the next example, [Makers opening heat](/terminal/examples/makers-opening-heat).


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