The original script was posted on ProRealCode by user Nicolas.
In “Whiter Is Brighter,” author John Ehlers presents a new indicator he calls the universal oscillator. It is based on his theory that market data resembles pink noise, or as he puts it, “noise with memory.”
Main signal occurs when oscillator cross zero line. Second signal occurs when one column value is higher (lower) than previous column when we are above (below) zero line.