3 ms·
There are several options. I think you'd line up all the buy orders by descending price, and line up all the sell orders by ascending price. Then there are th
by logfromblammo 7y ago
There are several options.
I think you'd line up all the buy orders by descending price, and line up all the sell orders by ascending price. Then there are three possibilities: the buy orders are exhausted, the sell orders are exhausted, or there are enough of each that their prices cross an equilibrium point.
In the latter case, you set the price at the crossing point, and clear all trades that you can at that price.
If the buys are exhausted, you set the price at the sell which clear it. And if the sells are exhausted, you set the price at the buy that will clear it.
It would, under such a system, be advantageous to always have some buys or sells put in that you don't expect to clear, but would produce profitable trades in case of sudden market moves in your favor.
In the past, that function would have been filled by the "market maker" trader.