For gamma-ray bursts (GRBs) with a plateau phase in the X-ray afterglow, a so called $L-T-E$ correlation has been found which tightly connects the isotropic energy of the prompt GRB ($E_{gamma,rm{iso}}$) with the end time of the X-ray plateau ($T_{a}$) and the corresponding X-ray luminosity at the end time ($L_{X}$). Here we show that there is a clear redshift evolution in the correlation. Furthermore, since the power-law indices of $L_{X}$ and $E_{gamma,rm{iso}}$ in the correlation function are almost identical, the $L-T-E$ correlation is insensitive to cosmological parameters and cannot be used as a satisfactory standard candle. On the other hand, based on a sample including 121 long GRBs, we establish a new three parameter correlation that connects $L_{X}$, $T_{a}$ and the spectral peak energy $E_{rm{p}}$, i.e. the $L-T-E_{rm{p}}$ correlation. This correlation strongly supports the so-called Combo-relation established by Izzo et al. (2015). After correcting for the redshift evolution, we show that the de-evolved $L-T-E_{rm{p}}$ correlation can be used as a standard candle. By using this correlation alone, we are able to constrain the cosmological parameters as $Omega_{m}=0.389^{+0.202}_{-0.141}$ ($1sigma$) for the flat $Lambda$CDM model, or $Omega_{m}=0.369^{+0.217}_{-0.191}$, $w=-0.966^{+0.513}_{-0.678}$ ($1sigma$) for the flat $w$CDM model. Combining with other cosmological probes, more accurate constraints on the cosmology models are presented.