I'm going to say it again: WRITE WHAT YOU WANT
There. That feels better.
Writing to Trends
For a long time, the mantra in publishing was "you can't write to trends." This was based on the reality that by the time you heard of a trend, wrote something, and got it through the 2 year publishing pipeline, the trend would likely be over. Certainly publishers wouldn't be buying it anymore, in anticipation of it being over. So this was sound advice.
No longer true.
With indie publishing, you absolutely can write to trends. Whatever readers are scooping up at the moment, you can capitalize on that and give the readers more of what they're craving. You're limited only by how fast you can write, pull together a cover, and get it out.
This has spawned some advice floating out there on the interwebs that this is something you must do (if you want to be successful, i.e. make money from your writing), rather than being one of the options now available to you, thanks to indie publishing.
There is nothing wrong with writing to trends. It doesn't make you a "sell out" or any such nonsense. If you don't normally write in a trendy genre and want to try stretching your wings a little, you may find you have a hidden genius for writing that kind of story. Which is very cool (not to mention profitable).
Not Writing to Trends
However, it's equally possible that you'll find you despise writing that kind of story or that you're simply horrifically bad at it. That it sucks the joy out of writing that you used to have. That the stories that call to your heart are sitting on your hard-drive, neglected. In which case, I would heartily recommend writing a heart-story next. Or exclusively. Or combine it, writing some stories to pay the bills and some to feed your heart.
Again: WRITE WHAT YOU WANT
This new ability to "write what's popular" seems to be a giant demotivational force for many writers (i.e. the ones not currently writing in the popular-genre-of-the-moment). And I can understand that. If you're writing what you love, putting tons of work into your stories, and someone else is making serious bank writing something else (say, dino erotica or sexy New Adult), it's natural to question what you're doing. To feel like you're writing the "wrong" stories or at the very least that you're doomed to never making a living with your works.
What I Believe
I believe that you do your best work when you're writing from the heart - the "vein of gold" stories that speak to you. I also believe you can write things that are not "from the heart" but "for the money" and still have a soul. And, if you're lucky, those stories will come from your heart as well.
What I don't believe: that you can't make a living with the stories you want to write.
I'm not saying "write it and they will come" - I'm saying be smart about finding the audience for your books. Be realistic about the size of the market for what you're writing. Realize that you may not hit the NY Times Bestseller list writing the stories you love. But you don't have to make the NY Times List to make a living (a number that varies widely for different people, BTW). Focus on improving your craft and writing stories that resonate with someone... and go from there (i.e. start small and build). Building a writing career doesn't require being an overnight sensation (thank the Amazonian gods).
You do not have to write in a popular genre to make a living with your works.
You may make more money writing in a popular genre (or you may not, if you're not very good at it).
You are not a "sell out" if you write what's popular.
You are not a "fool" if you don't write what's popular.
WRITE WHAT YOU WANT
In this new world of indie publishing, you can intentionally craft the kind of career you want to have. Do not be depressed by people cashing in on the popular genre of the moment. If they're lucky, they're doing what they love. If they're not, then they're just paying the bills. There are lots of ways to pay the bills, and as long as they're not illegal or immoral, I don't judge how you do that.
For me, personally, I write the stories that I want to write. If they sell well, outstanding. If they do not (and they won't all sell equally, that much I know for certain), then fine. I will write more stories. If I just want to pay the bills, there are plenty of other jobs out there where I can make a solid paycheck for putting in the kind of hours I put into writing.
But I wouldn't love it half as much.