New models for a charged anisotropic star in general relativity are found. We consider a linear equation of state consistent with a strange quark star. In our models a new form of measure of anisotropy is formulated; our choice is a generalization of other pressure anisotropies found in the past by other researchers. Our results generalize quark star models obtained from the Einstein-Maxwell equations. Well-known particular charged models are also regained. We indicate that relativistic stellar masses for several stars are obtained using the general mass function found in our model.