A measurement of the ratios of the effective decay widths of D0→π−π+ and D0→K−K+ decays over that of D0→K−π+ decays is performed with the LHCb experiment using proton-proton collisions at a centre-of-mass energy of 13TeV, corresponding to an integrated luminosity of 6fb−1. These observables give access to the charm mixing parameters yCPππ−yCPKπ and yCPKK−yCPKπ, and are measured as yCPππ−yCPKπ=(6.57±0.53±0.16)×10−3, yCPKK−yCPKπ=(7.08±0.30±0.14)×10−3, where the first uncertainties are statistical and the second systematic. The combination of the two measurements is yCP−yCPKπ=(6.96±0.26±0.13)×10−3, which is four times more precise than the previous world average.