I imagine there is a plethora of orders of all types entered before the market opens. How does this hodge-podge of market, limit, stop, stop limit, etc. orders get matched and an opening price decided upon. I imagine this process is somewhat defferent depending on exchange, e.g. NYSE vs NASDAQ. Does anyone know how the opening price is arrived at?