According to the reversible magnetostriction effect of ferromagnets,the magnetic anisorphy sensor based on this effect for detecting method of residual stress are investigated,and typical experiment for the compressing sample of steel No.20 is done.This mothod,which has been testified,is feasible.