A system of ferromagnetic particles trapped at a liquid-liquid interface and subjected to a set of magnetic fields (magnetocapillary swimmers) is studied numerically using a hybrid method combining the pseudopotential lattice Boltzmann method and the discrete element method. After investigating the equilibrium properties of a single, two and three particles at the interface, we demonstrate a controlled motion of the swimmer formed by three particles. It shows a sharp dependence of the average center-of-mass speed on the frequency of the time-dependent external magnetic field. Inspired by experiments on magnetocapillary microswimmers, we interpret the obtained maxima of the swimmer speed by the optimal frequency centered around the characteristic relaxation time of a spherical particle. It is also shown that the frequency corresponding to the maximum speed grows and the maximum average speed decreases with increasing inter-particle distances at moderate swimmer sizes. The findings of our lattice Boltzmann simulations are supported by bead-spring model calculations.