Yes, if the total energy (kinetic energy plus potential energy) is negative (In orbital problems, potential energy is typically taken to be 0 at infinity) then there is not enough energy for the vehicle to go "to infinity" so the trajectory must be closed.
The energy by itself determines whether an orbit is bound or not, but not whether it is closed. If the ratio of the orbital period to the period of radial oscillations (something like this...) is not an integer, then the orbit does not eventually have to close in on itself.
We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling We Value Civility
• Positive and compassionate attitudes
• Patience while debating We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving