A new transferable force field parametrization for n-alkanes and n-olefins is proposed in this work. A united-atom approach is taken, where hydrogen atoms are lumped with neighboring atoms to single interaction sites. A comprehensive study is conducted for alkanes, optimizing van der Waals force field parameters in 6 dimensions. A Mie n-6 potential is considered for the van der Waals interaction, where for n-alkanes we simultaneously optimize the energy parameters ϵCH3 and ϵCH2 as well as the size parameters σCH3 and σCH2 of the CH3(sp(3)) and CH2(sp(3)) groups. Further, the repulsive exponent n of the Mie n-6 potential is varied. Moreover, we investigate the bond length toward the terminal CH3 group as a degree of freedom. According to the AUA (anisotropic united-atom) force field, the bond length between the terminal CH3 group and the neighboring interaction site should be increased by Δl compared with the carbon-carbon distance in order to better account for the hydrogen atoms. The parameter Δl is considered as a degree of freedom. The intramolecular force field parametrization is taken from existing force fields. A single objective function for the optimization is defined as squared relative deviations in vapor pressure and in liquid density of propane, n-butane, n-hexane, and n-octane. A similar study is also done for olefins, where the objective function includes 1-butene, 1-hexene, 1-octene, cis-2-pentene, and trans-2-pentene. Molecular simulations are performed in the grand canonical ensemble with transition-matrix sampling where the phase equilibrium properties are obtained with the histogram reweighting technique. The 6-dimensional optimization of strongly correlated parameters is possible, because the analytic PC-SAFT equation of state is used to locally correlate simulation results. The procedure is iterative but leads to very efficient convergence. An implementation is proposed, where the converged result is not affected (disturbed) by the analytic equation of state. The resulting transferable anisotropic Mie-potential (TAMie) force field shows average relative deviations in vapor pressure of 1.1% and in liquid density of 0.9% for alkanes, and 2% and 1.5% for olefins, respectively, in a wide range of (reduced) temperature, Tr = 0.55-0.97. For substances that were not members of the objective function, the TAMie force field enables predictions of phase equilibrium properties with good accuracy.