need help with code for controlling a hydraulic press mode

Oh no !

Please get rid of the mistakes ans errors before you do a write up of this DIY project, or else you'd better upload it to instructables.
That site is a horrible way of showing how not to do things.

Why all this:
There's no diodes in sight near your relays.
Do not do that.