I took the wrong indicator MidPrice. It should be MedPrice.
As the manual says:

MedPrice(): var
Median Price. Simply (High+Low)/2 over only one bar.

About SMA that needs a series but I have used a var. Ok but how can I get a series result?

Something like this?
vars ao = series(SMA(median_price,5))-series(SMA(median_price,34));