CME Globex follows a specific set of rules to determine the TOPTheoretical Opening Price:
Rule 1: Determine the maximum matching quantity at a price level.
...
Rules are applied in a hierarchy from Rule 1 through Rule 5. The TOP Theoretical Opening Price is determined by whichever rule best applies to the order book at that moment.