Quantitative scanning transmission electron microscopy (STEM) allows composition determination for nanomaterials at an atomic scale. To improve the accuracy of the results obtained, optimized imaging parameters should be chosen for annular dark field imaging. In a simulation study, we investigate the influence of imaging parameters on the accuracy of the composition determination with the example of ternary III-V semiconductors. It is shown that inner and outer detector angles and semi-convergence angle can be optimized, also in dependence on specimen thickness. Both, a minimum sampling of the image and a minimum electron dose are required. These findings are applied experimentally by using a fast pixelated detector to allow free choice of detector angles.