The magnetocrystalline anisotropy energy (MAE) calculated as a function of the strain of the Ni2MnGa and Ni2FeGa alloys.