We generate two new exact models for the Einstein-Maxwell field equations. In our models, we consider the stellar object that is anisotropic and charged with linear equation of state consistent with quark stars. We have a new choice of measure of anisotropy that is physically reasonable. It is interesting that in our models we regain previous isotropic results as special cases. Isotropic exact solutions regained include models by Komathiraj and Maharaj; Mak and Harko; and Misner and Zapolsky. We can also obtain particular anisotropic models obtained by Maharaj, Sunzu, and Ray. The exact solutions corresponding to our models are found explicitly in terms of elementary functions. The graphical plots generated for the matter variables and the electric field are well behaved. We also generate relativistic stellar masses consistent with observations.