I have done this many times, open a buy or sell position on the daily TF because I’m looking ahead long term. Then after it goes against me, realizing as I zoom into the 1H that I’ve opened that position right on a S/R level. It’s obvious when I see it AFTER but by that time it’s too late. Most of the time price comes back, but not before sitting on the trade a few days. If it doesn’t then hopefully you’ve got your exit plan set up.
This is how you learn, sometimes the hard way can be the best way. School of hard knocks.
It will take time but eventually you’ll develop your own strategy which will allow you to trade on your terms only, so that you’re not tricked into spontaneous buying.