Problems with my ex

A

I’m in a predicament. I jut recently got into a new relationship. But I cannot seem to stop having sex with my ex. He doesn’t know I have a boyfriend yet bc me and my new boo haven’t announced that we’re together yet. I have no idea what to do. Me and my ex are friends, we’ve always been great friends but every time we’re together we end up having sex. I want this relationship to work bc every time I’ve tried to start up something new I mess it up by messing with my ex. I really want to stay friends with him. But i don’t know how to without having sex with him. Should I be honest with my new boyfriend? How do I stop this and stay happy at the same time? Oh and a little add on my new boyfriend DOES NOT like my ex in the slightest.