The time-reversal and spatial parity violating interaction of the nuclear magnetic quadrupole moment (MQM) of the 175Lu and 176Lu nuclei with electrons in the molecular cation LuOH+ is studied. The resulting effect is expressed in terms of fundamental parameters, such as quantum chromodynamics angle θ¯, quark electric dipole moment (EDM), and chromo-EDM. For this, we have estimated the magnetic quadrupole moments of 175Lu and 176Lu nuclei and calculated the molecular constant that characterizes the interaction of the MQM with electrons in the considered molecules. Additionally, we predict the hyperfine structure constants for the ground electronic state of LuOH+. In the molecular calculations, both the correlation and relativistic effects including the Gaunt interaction have been considered. According to the calculated expressions in terms of the fundamental constants, we conclude that LuOH+ can be a promising system to measure the nuclear MQM.