Code sample is not working in PI

I tried to use the following sample code from pi script guide page no 11:

Gives a buy signal when the close price crosses above the 20-day SMA

CROSSOVER(CLOSE, SimpleMovingAverage(CLOSE, 20)) = TRUE

But it is showing error: your script generated an error. Please tell me what is wrong.

bro…send e-mail to [email protected]

or call at 8040402020… and tell there technical expert team…about that problem…

they will solve your problem fastly…

Zerodha support has suggested the following code. It is not showing script error.
CROSSOVER(CLOSE, SMA(CLOSE, 20)) = TRUE