I liken trading to gambling they are both highly risky and if you must make profits in them you need to practice some level of patience and never let greed take over your sense of judgment, I don't see anything wrong in expecting/predicting the direction the market will go but while doing that one need to understand the volatility of the market that is, the market can swing in whichever direction at any time. But if a trader can manage their risk factors properly and learning not to be too greedy that will help earn some profits and minimize losses.
If you see trading similar to gambling then there is a bit of a problem that you should solve before you could actually make profit. I mean trading is something that you do against other people, and gambling is usually what you do against the house, and it has house edge and you are guaranteed to lose there.
It means if you see them similar, you will always lose during trading as well, and since you won't, and there will be good days, you should not see them as similar. A good trader would be able to sniff out the market and know what to do and even though it won't be all the time, at the very least they could profit in the long term most of the time.
Trading is a place for us to analyze and evaluate the supply and demand of the market and then decide to buy or sell to make a profit. It requires a lot of knowledge, skills to read charts and analyze trends, the accumulated experience of each trader.
As for gambling, we just play with the hope that luck will come to us. We don't have any viable basis for analysis in gambling, everything in gambling is just luck and bad luck.