REM Gator Oscillator - Bill Williams
// Alligator Blue Line - Jaw
// 13 bar smoothed average future 8 bars
SSMAblue = WilderAverage[13](close[8])
// Alligator Red Line - Teeth
// 8 bar smoothed average future 5 bars
SSMAred = WilderAverage[8](close[5])
// Alligator Green Line - Lip
// 5 bar smoothed average future 3 bars
SSMAgreen = WilderAverage[5](close[3])
UpperGraph=abs(SSMAblue-SSMAred)
LowerGraph=-abs(SSMAred-SSMAgreen)
if UpperGraph > UpperGraph[1] then
ug=1
else
if UpperGraph <= UpperGraph[1] then
ug=-1
endif
endif
if LowerGraph > LowerGraph[1] then
lg=-1
else
if LowerGraph <= LowerGraph[1] then
lg=1
endif
endif
return UpperGraph coloured by ug as "Jaws-Teeth", LowerGraph coloured by lg as "Teeth-Lips"