Diffraction studies of the liquid structure of AlCl3, AlBr3, GaBr3 and GaI3 close to their respective freezing points have revealed fourfold coordination of the trivalent metal ions, consistent with dimeric M2X6 molecules being the dominant species. We evaluate the species-resolved pair distribution functions and liquid structure factors in all these melts by carrying out classical molecular-dynamics simulations, based on polarizable-halogen force laws that were determined on isolated molecular monomers and dimers in the gaseous phase. We also report results for mean-square displacements and diffusion coefficients of the two species in each melt. The model reproduces the main features of the total neutron-diffraction structure factors, showing peaks due to intermediate-range order and to charge and density short-range order, and accounts for the experimental data at a good quantitative level. Direct simulation of the pair distribution functions yields agreement with the diffraction data on metal-halogen and halogen-halogen bond lengths in the melt and on the stability of the first-neighbour shell of the metal ions. We examine the temperature dependence of the liquid structure in our models for GaBr3 and AlCl3 and emphasize the structural role of van der Waals interactions between the halogens.