if you are just trading randomly and not sure of what you are doing then yes, Trading stocks and currencies "forex" can be easily gambling if you are not doing it on clear analysis.
trading only takes a little luck. not the same as gambling so if you do a trade with a random without knowledge and skill. Of course you will lose. because this is not gambling