My 98 Valkyrie didn’t come with a gear indicator, so I installed one thanks to http://www.joopangelier.nl, a true badass of the bike modding scene.
This device doesn’t detect the mechanical position of your transmission. It constantly measures the electrical pulses of the engine, and the RPM of the front wheel. The quotient of those numbers can be used to determine the gear that my bike is in at a given state.
If you’d like to see the installation process, let me know in the comments below, and I’ll post it later.