Herein, the nonlinear third harmonic generation (THG) distribution of Al0.3Ga0.7 As/GaAs quantum dots is studied under the combined influence of hydrostatic pressure and structural parameters, considering the presence of an electrostatic field and magnetic field. Hydrostatic pressure is introduced into the system as an environmental condition in the form of effective mass. When the hydrostatic pressure changes within a certain range, the peak shift and resonance peak of the THG coefficient change significantly, reflecting its application effect elegantly. Interestingly, the effects of these application modes on nonlinear optical properties have different effects, whether it is hydrostatic pressure, structural parameters, or electromagnetic fields.