For me, the endings that are the most satisfying are the ones where there's closure. It doesn't have to be an "everyone live happily ever after" kind of ending, but personally I really dislike really vague and ambiguous ending when you aren't sure what happened to the main character (kind of like the movie Inception).
I feel like the best way to do it would be to end it in a way where the main problem has been solved, but to present a small problem that could be used as a premise for a sequel but isn't a huge cliffhanger that will leave the reader feeling frustrated.
If you need an example of what I mean, I think that the Jasper Dent series by Barry Lyga is a good example. The series is about the son of a serial killer, who helps the police solve murders as a way of proving that he won't end up like his dad. In the last book, his mother (who is kind of also a villain character in the 3rd book) ends up in a coma. The story ends with the main character contemplating how easy it would be to kill her, but ultimately deciding not to. It's satisfying as a reader because there are no loose ends, but as a writer it's just enough that another book could be written if that was what the author wanted.
For a more mainstream example, the Incredibles. At the end of the movie everything is resolved, the villain is caught, etc. But then at the very end you have this Underminer character introduced and the characters are about to go after him. It's more of a cliffhanger, but you at least know that the characters are alive and well and that they succeeded in their initial quest to stop Syndrome.