# Spinning top

`spinning_top`

A small body with a longer wick on each side.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| body_pct | float | 30 | 0 to 100 |

## Outputs

| Name | Kind |
| --- | --- |
| spinning_top | event |

Warm-up: 0 bars (0 at the defaults).

Repaints: No.

## Formula

body = |close - open|, range = high - low, upper wick = high - max(open, close), lower wick = min(open, close) - low

body <= body_pct / 100 * range, upper wick > body and lower wick > body

Found: 1 when the close is at or above the open, else -1

A bar whose high equals its low, or that has a missing price, is never part of a pattern. Computed on the prices the bars are drawn with: on Heikin-Ashi or Renko bars those are the built candles.
