How to keep objects stable

How to keep objects where they are drawn at all resolutions and ratios?
For example id like to make bar chart, how to keep all lines of bar chart 1 pixel and next to eachother?
so far i have done it by dividing 2/resulution and keeping result as draw offset but accuracy is not perfect, 1 pixel gets wrong at 1600 resolution if draw is started from -1