We propose a robust scheme to measure the Hubble parameter H ( z ) at high redshifts by detecting the Sandage-Loeb signal ( SL signal ) which can be realized by the next generation extremely large telescope . It will largely extend the current observational Hubble parameter data ( OHD ) towards the redshift range of z \in [ 2.0 , 5.0 ] where other dark energy probes is difficult to provide useful information of the cosmic expansion . To quantify the capability of such future measurement to constrain cosmological models , we simulate observational data for a CODEX ( COsmic Dynamics and EXo-earth experiment ) -like survey . We find that the SL signal scheme brings the redshift upper-limit of OHD from z _ { \mathrm { max } } = 2.3 to z _ { \mathrm { max } } \simeq 5.0 , provides more accurate constraints on different dark energy models , and greatly changes the degeneracy direction of the parameters . For the \Lambda CDM case , the accuracy of \Omega _ { m } is improved by 58 \% and the degeneracy between \Omega _ { m } and \Omega _ { \Lambda } is rotated to the vertical direction of \Omega _ { m } - \Omega _ { \Lambda } plane ; for the w CDM case , the accuracy of w is improved by 15 \% . The Fisher matrix forecast on different time-dependent w ( z ) cosmological model is also performed .