Your story line should have an arc: a beginning (problem), middle (attempts to fix the problem), and end (resolution of the problem). If you have multiple story lines, each one has its own arc.
There can be an arc which stretches over multiple books. Sometimes each individual book has its own beginning, middle, and end (c.f. Harry Potter, The Hunger Games, Game of Thrones/A Song of Ice and Fire) underneath a major arc which also concludes in the last book, and sometimes it's one story told in multiple volumes (Lord of the Rings, the Belgariad).
If you have a really long story line, that's fine. It's up to you to decide if it's one story in many books, with only one ending (LOTR, ASOIAF, the Belgariad), or if there smaller arcs within the larger arc (Harry Potter).
The proper time is when the arc is finished. If you don't have an arc, either you didn't plan one or you're a discovery writer and you haven't invented it yet.