The hydraulic pump unit I think is next to the rear left of the spare tire well. I think you may find a plastic fill cap and dip stick on it or near by. e39s list the hydraulic oil as either Pentosin CHF 7.1 or CHF 11S. Your owners book should tell you the correct one or it will say on the fill cap. Here is a parts picture from realOEM web site.
RealOEM.com * BMW E39 540i TRUNK LID HYDRAULIC PARTS
We don't get this trunk lid option in the US so I am answering based on my review of the BMW WDS and ETK disks.