Gator oscillator

gatorbill_williamsForge API 1

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

Inputs

NameTypeDefaultRange
jaw_periodint131 to 5000
jaw_shiftint80 to 100
teeth_periodint81 to 5000
teeth_shiftint50 to 100
lips_periodint51 to 5000
lips_shiftint30 to 100

Outputs

NameTypeRequiredDescription
uppervalueOptionalcolor theme.accent, color_down theme.down, color_up theme.up, style histogram
lowervalueOptionalcolor theme.accent, color_down theme.down, color_up theme.up, style histogram
Warm-up
max(jaw_period - 1 + jaw_shift - teeth_shift, teeth_period - 1 + teeth_shift - lips_shift) bars (15 at the defaults)
Repaints
No
Parity
MetaTrader 5, within 1e-12

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.