Alright, so your version of the code runs without error, but when I play with the lookback period it doesn't make a difference whether I put in 3, 9, 50 or 100. The result is always the same.

On the Financial Hacker website Petra uses some code in the detecting volume breakout article, which I tried to translate to my needs. The result is:
Code
MA[0] > MaxVal(series(MA[1],10),9)


This kind of works, but I don't know how to verify if the code calculates what I had in mind.