So even if both the long and short side are ITM many days before expiration, and i chose to close my position, i can never get my max profit?
That's correct. Consider the person who would be buying it from you. If they paid your maximum profit of 5 for your call spread days before expiration, they would make no money, no matter what happens to the stock and if stock moved against them in those few days, they would lose all their money.
So in a nutshell, in order to get maximum profit, the following conditions have to be satisfied; 1. Both Long and short sside must be ITM 2. Must hold until expiry date / day. For this point, i am guessing one must close their position before 4 pm on the expiry date / day to avoid being auto-exercise by the broker. Thank you!