On MT5, the system will close open positions starting with the largest losing one, apply an auto-liquidation fee, and then check the account's margin level. If the margin level is above 90%, no further positions will be closed. If the margin level remains below 90%, the system will continue to close trades, starting with the largest losing positions, until the margin level exceeds 90%. The auto-liquidation fee is charged once per position, regardless of the number of contracts liquidated.