If you're unsure if you're going to win or lose, that can be considered gambling. With trading there's no assurance that will earn within a certain period of time so it is a gamble.
well I think we can also consider trading as gambling as you don't have assurance if you are really going to earn or not. But gambling is different as you have trading skills and enough knowledge in able to earn from there. Unlike with gambling you only need luck even you are not that good in a specific gambling game that you are going to do.