Realizing profit with Gamma Trading doubt

Lets suppose we have a delta-neutral portfolio and that we want to trade the gamma.

If we are long gamma, we can profit from every rebalancing to keep the portfolio delta-neutral.

Lets suppose the following portfolio:

• long 100 x call ATM (∆=50%, constant gamma = 10)
• short 50 x stocks ($100). 1) Underlying's prices goes down by$1:

• Call's delta goes down (∆=40%)

• I need only -40 stocks to remain delta-neutral, so I buy +10 stocks and realized immediate profit.

Gamma PnL = (1/2) * (10) * ($$1)^2=$$5 USD;

Or assuming that delta is discrete and goes from 50% to 40% immediately; -10*($$99-$$100) = $10 USD.  2) Underlying's price goes up by$1:

• Call's delta goes up (∆=60%)

• I need -60 stocks to remain delta-neutral, so I sell more -10.

And we will sell this additional -10 in a price above that the initially sold.

If price goes down further, we will buy it, and again realize immediate profit.

But what if the price just goes up?

If price's only goes up, and we close the position, we will finally have to buy the underlying, buying it for a higher price, losing money on the underlying by itself.

This loss in the underlying may or may not be followed by a profit on the options (call's price can goes up, but we have Vega, Theta, etc, that can make the option's value decrease).