My adviser wants to use my code for a spin-off, but I want to use it for my own company I am a PhD Student in computer science. 
During my my first 2 years I developed an algorithm that seems to work fine in a certain field of applications.

My adviser recently told me that he is starting a spin-off with a colleague of a different department and that he plans, in a couple of years to use my algorithm in it.

Now, considering that:


I am not interested in joining my adviser spin off as an employee
My advisor can understand the outcomes but not the 100% of the logic of the algorithm
In the future I want to make my own company based on that algorithm


I am quite worried. 

How fair (and common) is that an advisor plans to use the code of one of his to students to make money (none of which will finish in my pockets)?

The fact that he will use my algorithms, will limit in any way me to use them in the future for the same scope (in a different field)?

May talk to him be a good way to solve this problem? 

I don't know how to deal with this fact.
Actually, I do not really understand your general strategy: If the code is published under MIT license and the details of the algorithm are published, then pretty much anybody can use this code or algorithm for his/her own company (as far as I understand the license, I am not a lawyer). So it is perfectly fine for your supervisor to use this code. It is also perfectly fine for you to use this code in any company you found (again, as far as I understand the license details).

Probably, a scientific algorithm will only be a tiny part of software that you want to sell or for which you want to consult. So I would not worry too much.