Decide exactly what you will gamble beforehand and what u will do if u win and where u will stop and don't deviate from ur pre prepared strategy that way you know exactly what you risk losing and when you will stop so greed doesn't take over. That's how I control myself but I understand the temptation to deviate from a plan especially when you feel luck is on your side.
In short you have to make a plan before gambling and you have to follow it no matter what happen.
Every gambler needs a good level of discipline to be able to follow their game plan, otherwise they will expense in gambling more than they allocate on it. Being greedy is normal to a person but we need to control it or it will kill us in the end.
if you mean to stick to the rules then yeah i agree with it. greedy are something that always destroy your plan , that's why you need to take control over it by do some prevention action like immediately shut your computer down once you think you are gonna doing something crazy because of greedy. experience at this point would really helpful.