Trading is not considered as gambling even both have the same risk on losing your money but on trading you could minimize the risk by studying trading techniques.
It is considered because there are money involved that will earn or lose.
The difference is, you can't purely rely on luck in trading since you can play with the price volatility compare to gambling where you will face the house edge of those gambling games that uses that one.
And techniques really a must but also you have to build experience as that is they key for a person to become a good trader.