The idt() function integrates from the beginning of the simulation, although there are means of resetting the integration (see the online help, 'a' parameter). There's also an alternate way of resetting it with the idtmod() function.
For a moving average, neither would be very helpful. (You could use them to compute averages in "chunks", but that's not what you asked for.)
I think you could use the following "trick" though (assuming 'x' here is the expression in question):
idt(x - delay(x, 5))
The delay() function yields a delayed version of its parameter. The above would just be equivalent to subtracting the integral of the signal 'x' delayed by 5s from the integral of the signal 'x', which should give you what you want.
Don't hesitate to report back if it works fine or if you need further help.