The settlement price is used to settle the control margin account (for example, your margin is just enough according to the closing price, but you need to add margin according to the insufficient settlement price), and the settlement price is also used to calculate the price of the price limit. What is the actual profit of an order? It only depends on the transaction price when the order is opened and leveled, and has nothing to do with the settlement price. The settlement price only affects the equity calculation of your margin account when you hold a position overnight, and there is no actual trading behavior, unless you force the liquidation according to the settlement price.
The closing price is the last price of a day's trading, which is due to the centralized matching of all orders 1 minute before the closing price. The settlement price is the weighted average price of all transaction prices of the day, that is, the total transaction amount/number of transactions.