//@function Calculates Williams Gator Oscillator from Alligator lines
//@param source Series to calculate from
//@param jawPeriod Period for Jaw SMMA (typically 13)
//@param jawOffset Forward offset for Jaw line (typically 8)
//@param teethPeriod Period for Teeth SMMA (typically 8)
//@param teethOffset Forward offset for Teeth line (typically 5)
//@param lipsPeriod Period for Lips SMMA (typically 5)
//@param lipsOffset Forward offset for Lips line (typically 3)
//@returns Tuple [upper, lower] histogram values
//@optimized Uses Wilder's RMA (SMMA) with exponential warmup compensator for O(1) complexity
gator(series float source, simple int jawPeriod, simple int jawOffset, simple int teethPeriod, simple int teethOffset, simple int lipsPeriod, simple int lipsOffset) =>
if jawPeriod <= 0 or teethPeriod <= 0 or lipsPeriod <= 0
runtime.error("All periods must be greater than 0")
if jawOffset < 0 or teethOffset < 0 or lipsOffset < 0
runtime.error("All offsets must be non-negative")
// Step 1: Compute SMMA (Wilder's RMA) for each Alligator line