We explore an opportunity to induce and control tetragonal distortion in materials. The idea involves formation of a binary alloy from parent compounds having body-centered and face-centered symmetries. The concept is illustrated in the case of FeNi$_{1-x}$Co$_x$ magnetic alloy formed by substitutional doping of the L1$_0$ FeNi magnet with Co. Using electronic structure calculations we demonstrate that the tetragonal strain in this system can be controlled by concentration and it reaches maximum for $x=0.5$. This finding is then applied to create a large magnetocrystalline anisotropy (MAE) in FeNi$_{1-x}$Co$_x$ system by considering an interplay of the tetragonal distortion with electronic concentration and chemical anisotropy. In particular, we identify a new ordered FeNi$_{0.5}$Co$_{0.5}$ system with MAE larger by a factor 4.5 from the L1$_0$ FeNi magnet.