Taken from my cordless hedge cutter the charging circuit is shown here, when the output voltage is moved below 18v the red led comes on above 18v it goes off the top resistor controls the low voltage part of the circuit and the lower resistor controls the 18 v detection threshold.
The green led is the power on circuit, this circuit does not stop charging hence could damage the batteries if left on