Ok, I solve the puzzle:

You're comparing two series. What you wanted instead was comparing the two recent values of the series:

if(day_close[0] > EMA20[0])
...

Look here: http://manual.zorro-trader.com/series.htm