I need some help, I got stuck. I have number of points and I would like to create a convex closed polyline. We are talking about four points only, so I would like to get a closed shape but at the moment I get a “Z”.

if your problem is that the polyline isn’t closing, you could add the first point to the back of the list. (so there will be 5 points in the list instead of 4)