Basically anywhere between 17” & 18” is good for receiving, so your current antenna at 17.5” is the ideal receiving length for an antenna. The only things you will need are a good magmount, and RG58/U coax with the right connector for your radio. Since you’re operating a mobile setup, that’s even better because your vehicle is the groundplane for the antenna.
Height doesn’t necessarily mean much for receiving on a specific band, such as the railroad in this case.
With that said, your setup is already leaps and bounds ahead of a standard stock rubber duck.
By the way, what antenna specifically do you have & what radio are you using?