What does it limit, the hydraulic system or electrical.
Need a lot more details.
If this is an important safety feature, then it needs to be done with a great deal of attention to detail. For example, does it need multiple redundancy.
Usually this sort of system has to be mechanically very robust, use high quality connectors, immune from getting scraped off, and any wiring or hydraulic lines need to be mechanically protected as well.
We have logging machines in the area, they are always having to do on site repairs of limit switches.
Cheers,
Richard