Asking such questions in a forum is better than in a chat room: Other users might have the same issue and can then read the answer here, while it would be lost in a chat.

The "x" in the above formula is the input to the filter, here normally the current price.

"return LP[0] = ..." assigns a value to LP[0] and returns that value at the same time.

And recursive definitions are a frequent element in math as well as in programming. You will find them everywhere in mathematical formulas and in program code. Y[1] is simply the previous value of Y.