When I first started gambling I won gambling for several days then I thought I would earn a small amount of money from gambling every day. After several days I made some money like this and suddenly one day I lost all the money due to excessive greed. I understand that gambling should not be overloaded and that gambling should not be taken as a profession. Gambling is fine for those who can take gambling as entertainment and those who gamble for money should stay away from gambling.
The reason for your loss was not really because of greed; greed might be involved, but self-control plays a major role in you losing everything that you gained from gambling.
If self-control was there, as soon as you have made enough profit, you could have been able to control yourself to know when to stop for that very day, going home with the profit you have made, but when you are not in control, you will continue playing, thinking the luck will continue to be on your side up to the extent that you did not realized when you lose all to the game.