# Alligator

`alligator`

Three smoothed lines that show when a trend is asleep or waking up.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| jaw_period | int | 13 | 1 to 5000 |
| jaw_shift | int | 8 | 0 to 100 |
| teeth_period | int | 8 | 1 to 5000 |
| teeth_shift | int | 5 | 0 to 100 |
| lips_period | int | 5 | 1 to 5000 |
| lips_shift | int | 3 | 0 to 100 |

## Outputs

| Name | Kind |
| --- | --- |
| jaw | value |
| teeth | value |
| lips | value |

Warm-up: max(jaw_period, teeth_period, lips_period) - 1 bars (12 at the defaults).

Repaints: No.

## Formula

median = (high + low) / 2

jaw, teeth and lips are smoothed averages of the median over their own periods: the first value is the mean of the first period values, then (previous * (period - 1) + median) / period.

The shifts are how far the chart draws each line ahead. The values are not displaced.
