Hello! Unfortunately, there is no on/off switch for such a feature like 'greed'. I remember 13 years ago, when I discovered Forex market, greed was living in my heart. And my trades were awufull. What helped me - is to treat Forex not like a money machine, but more like a side-hustle. Also having a full time job helps a lot, so I had money and I was not thinking about getting more. Not full time, not so serious, less worries. Also trading on a Forex looks like having a cat (not my words, but completely agree with them). If you are chasing a cat, that cat will run away, but if you stop chasing and you have what cat loves - cat will run towards you eventually.
Same thing with money. If you are chasing them with all you heart and soul and that's everything you can ever think of - you'll fail.
If you will have what money likes - patience, long term vision and love for what you do - money will come. Trust me.
Have a good one.