How do I get the maximum Equity Value over a period?

I have tried with MaxVal but not sure how pointers work:
vars max_value = series(MaxVal(Equity,500)); //Error - MaxVal(): Pointer expected

Any ideas?

Thank you