Hi,
Sounds about right
If 18Vdc and you are applying to a diode (LED) that has a forward bias (i.e. turn on voltage) of 4.5V@20mA.
So, a first order approximation would be (18Vdc-4.5Vdc)/20mA = 675 ohms. The 680 ohm resistor should be close enough. It doesn't hurt to try something larger (like 1Kohm or 830 ohms) to start and fine tune later.
20mA*20mA*676 ohms = 0.27W. That means, you'll need a 1/2 W resistor.
BTW, besure to check which pin is the cathode and which is the anode. If you apply the wrong polarity, then there is a remote possiblility of damaging the LED.
Hope that helps.
- Victor.