Increased integration of photovoltaics (PVs) systems and charging stations for electric vehicles (EVs) has led to a substantial increase in the level of voltage unbalance beyond the acceptable limit. Ordinary voltage regulation devices such as on-load tap changers (OLTCs) and distribution static synchronous compensator (DSTATCOM) are sometimes incapable of adequately addressing this issue without proper coordination with PVs and EVs. This paper presents a novel real-time optimal coordination scheme to determine the tap position of OLTC, the amount of reactive power to be exchanged by DSTATCOM and a PV inverter, and the phase connection of EVs. The proposed scheme aims to maintain the voltage magnitude and voltage unbalance within the statutory limit while minimising the power losses in an active unbalanced power distribution system. Advanced and hybrid particle swarm optimisation (AHPSO) algorithm is also developed to solve the optimisation problem, and its robustness in comparison with other techniques is verified. The impact of uncoordinated voltage control and proposed control on voltage unbalance and power losses are investigated. Time-series simulations confirm the significance and scalability of the developed coordination control scheme on IEEE 37-node and IEEE 123-node test feeders with real data and different PV penetration levels.