Hi Rien, in the example, If one was to do it in two operations what you would do is sell all your stock, and then buy for the month. What I did was calculate how many stocks I was going to buy, and leave that many stocks in the account. At this point the average cost should go up to the current price of the stock. Not sure if I showed you that in the example. By combining the sell and monthly buy, you save one commission cost.
Come see me at Systematic Investing group #board-966 lets talk formula plans.