Some remarks:

- do not enter code in indicators.c. Better enter it into your script. indicators.c is updated with any new Zorro version and your code will then be overwritten.

- When you have only positive values, (var)((int)x) is the same as floor(x) and (var)((int)(x+1)) is the same as ceil(x).

- Vars and series are wrong used in your code - you're defining a pointer where you need a var, and you're using a var where you need a series. Best check out the tutorial lessons 1 and 4, there are both explained.