That is exactly what gets most people recked while trading. You should take profit as they present themselves and not be too greedy.
Yes, we shouldn't be greedy in the market while we are making a profit because we should safeguard the profit aside, we don't know when the market will lose its value. A trader shouldn't be greedy for making a fast profit, this may lead to losing more value of your asset. So we should plan them wisely and we should react according to the market situation.