# Gator oscillator

`gator`

How far apart the Alligator's jaw, teeth and lips are.

## 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 |
| --- | --- |
| upper | value |
| lower | value |

Warm-up: max(jaw_period - 1 + jaw_shift - teeth_shift, teeth_period - 1 + teeth_shift - lips_shift) bars (15 at the defaults).

Repaints: No.

## Formula

jaw, teeth and lips are the Alligator's smoothed averages of the median price.

upper = |jaw (jaw_shift - teeth_shift bars earlier) - teeth|

lower = -|teeth (teeth_shift - lips_shift bars earlier) - lips|

The periods and the shifts must both fall from jaw to teeth to lips, and each period must exceed its own shift.
