# Aroon

`aroon`

How recently the highest high and the lowest low happened.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| period | int | 14 | 1 to 5000 |

## Outputs

| Name | Kind |
| --- | --- |
| up | value |
| down | value |
| osc | value |

Warm-up: period bars (14 at the defaults).

Repaints: No.

## Formula

up = 100 * (period - bars since the highest high of the last period + 1 bars) / period

down = the same with the lowest low, osc = up - down

A tie goes to the most recent bar.
