When you sell all of your investments your non-invested capital (if there is any) will be transferred to your reference account with the whole sum.

Did this answer your question?