I am Young Adult and Middle Grade author Barbara Binns, writer of contemporary and realistic fiction for adolescents and teens. As my tagline says, I write Stories of Real Boys Growing Into Real Men - and the people who love them.
There are writers who write stories for fun. I know a few. Some write so well I used to try persuading them to seek publication. I stopped doing that when I realized publication would take away their sense of fun. There is freedom in writing for only friends and family. They prefer that freedom.
Whether I am crafting an ending to a scene, a short story, or a whole novel, I have certain rules I make myself follow. The number one rule is that the ending must make sense in relation to the rest of the work. At the same time, it should be unexpected and maintain a level of suspense. Sometimes I give my readers a surprise or twist ending. Other times, as when I write a romance, I adhere to reader expectations. That means at least a Happy For Now ending, with an h/H getting together, if not riding off into the sunset. I can always surprise my reader by the path I take to get them to their state of bliss.
Either way, my goal is to first gives readers an "Oh my God" reaction when they reach the end. That should immediately be followed by the realization: "Of course, this is the only way it could happen."
That's how I work to keep readers eager to proceed to the next chapter, and then to grab my next book, eager to do business with me again.
Resolution vs Ambiguity:I have to strike a balance between these two areas. As I said, managing genre-specific requirements comes first. My first novels, Pull and Being God, were both Young Adult romances where I carefully adhered to romance rules. Readers of detective stories and mysteries expect the bad guys to be vanquished and the crime solved. Science fiction, fantasy and literary stories have more flexibility regarding reader expectations. There readers may accept, even welcome, writers who expect them to do a little of the analysis work regarding the ending. There are different techniques for making an ending I use.
Types of endings
Sad - These are the opposite of happy endings. I have done a few of these in short stories, because sometimes sad is the right truth to tell. Even sad endings must be earned, and offer the protagonist the possibility the possibility of happiness, if only...
Open aka Zero endings happen when a character fails to change after the epiphany, or they miss the point they should have learned during the epiphany. This type of ending allows readers to project their own meaning or reach their own epiphany. I have never tried an ending like this. A lot of skill is required to make this ending work. (The Bluest Eye by Toni Morrison provides an example.)
I will mention one more ending that I have sometimes used in some of my short stories. In the Twist - I work to deliberately subvert what the readers expects to happen at the end.
Last, but not least, comes the Epilogue ending. In this type of ending, frequently seen in romance novels, the end is a followup on the characters, usually after a change in time. I sometimes use short epilogues, I'm adding one now to a WIP featuring time travel. It's very short, and as I write it, I keep in mind that it needs to enhance the story theme and/or add a new dimension to be worthwhile for readers. I plan to make sure it contributes to the payback on the original contract made in chapter one.