Storylines in dramatic screenplays are driven by a PROTAGONIST in pursuit of a GOAL. Every scene directly or indirectly relates to this pursuit and the CLIMAX of the storyline is where the audience learns, once and for all, the result of this pursuit. With that in mind, there are only four ways a movie can end:
1. The protagonist SUCCEEDS. (In "Erin Brockovich," Erin triumphs over PG&E.)
2. The protagonist FAILS. (In "Chinatown," Jake Gittes fails to protect Evelyn Mulwray.)
3. The protagonist FAILS or GIVES UP the goal to GAIN something better. (In "The Apartment," C.C. Baxter gives up his high-paying job, but gets his love, Ms Kubelik, in the process.)
4. The protagonist SUCCEEDS but LOSES something important. (In "Capote," Capote writes the non-fiction book of the century, but loses his humanity.)
I've found that when I'm outlining a new script I have an intuitive sense of which one of these endings I'm going to have, even when I'm not clear on the details of how and why. The first is a happy ending. The second is a downer. The third is a happy ending where a character is initially on the wrong path, but by the end, sees the light. The fourth shows the consequences if the character doesn't see the light. He gets what he was after, but loses something more important.
Knowing which one of these stories you're telling makes it easier to figure out the rest of your story structure. If you are using the Three-Act structure (with a MIDPOINT breaking up Act Two), then the end of your Act Two will be the opposite of the end of your story (CLIMAX):
So, if you have a happy ending, then the end of Act Two will be a low point, a "false defeat." If you have a sad ending, then the end of Act Two will be a high point, a "false hope." If you have an ending where your character fails or gives up his goal at the end for something better, then, at the end of Act Two, he'll be well on his way to acheiving his goal but also on his way to losing something more important. And so on.
The reason for this is because, just as a movie begins in one place and ends in another, each Act does the same (and so does each sequence and scene within each Act).
Taking this idea further, the MIDPOINT has the opposite feeling of the end of Act Two. For example, if you have a happy ending, the PROTAGONIST faces obstacles in Act Two, but he/she makes progress and by the MIDPOINT of the story things are looking good. But, then things start to turn and by the end of Act Two, he/she is at a low point, or a "false defeat."
Knowing the feeling you want to evoke at the end of your story makes it easier for you to work backwards and create the ebb and flow that's necessary for a satisfying moviegoing experience.