A computer simulation is carried out of the motion of a glide dislocation, under the action of an externally applied stress, through a dislocation forest creating a long-range stress field. The simulation is made to fit dislocation movement in (110) planes in NaC1-type crystals and (0001) planes in c.p.h. crystals. It is shown that the field irregularities in c.p.h. crystals are appreciably higher than in crystals with a structure of the NaCl type. The penetration stress of the glide dislocation through a dislocation forest τf is determined and it is shown that its dependence on the dislocation forest density ρ must obey the relation: τf = αGb √ρ. The obtained values of a are in good agreement with the experimental values α for NaC1-type crystals and found to be lower for Zn crystals. It is shown that the probable causes of the discrepancy between the values of α for Zn are the processes of intensive loop and dislocation dipole formation taking place in Zn as a consequence of strong irregularity of internal stress fields.