Maybe you need SynEdit.LeftChar ?
LeftChar is 1, if the editor is NOT scrolled.
If you scroll one char out then LeftChar = 2, and so on.
posizione_x := (SynEdit1.Gutter.Width + SynEdit1.CharWidth * (8 - SynEdit1.LeftChar)+1;
and
if SynEdit1.LeftChar > 8 then exit; // do not draw
Note, I increased your 7 to 8, because LeftChar subtracts 1.