I'm not a published author. I don't have a book contract, and I don't have a novel in print. I don't even have a novel on submission right now. So trust me when I say I don't have all the answers, or even ANY answers, when it comes to writing the book that will be "The One."
But I have learned a few things in the course of my very amateur writing career.
It is better to write the book that's in your heart than to write what you know will sell.
I don't care how long it takes to pound out plot points, to write out character charts. I don't care if the Book in Your Heart is messy, and painful, and controversial. I don't care if it's new and experimental and full of flaws. If you love it, write it. If it hurts, write it. If you cry when you read that scene at the funeral; if you laugh when you read your MC's dialogue; if you have minor heart palpitations when you skim over that first kiss - write it.
Even if your first draft is crappy, the Book in Your Heart will be a thousand times better in its weakest form than a book that you write only to sell.
Agents and editors can tell when you're writing to trends. They know when you're pandering to the masses, trying to write something good instead of something you love. They know, and they don't want it. There are already too many people who sacrifice art and beauty and passion for something dull and weak. Don't be one of them.
Even if the Book in Your Heart does not sell, the time you spent writing it will never be wasted. But if you write a book that does not speak to you, even if you make a killing on royalties, some piece of your soul will always regret it.
Creating art is often a lonely process, and often there are few rewards. But the incredible thing about art is that it's a reward in and of itself. It feeds YOU, even if it doesn't feed your bank account. Write for that reason. Write because even if the Book in Your Heart never sells, you have gained something eternal, something more priceless than money. You've gained experience, and you've found passion.