I was wondering how it would be possible to draw a continuous polyine along the vertices of a square collection.

I have a square collection that comes from two different structures:
Blue squares are contained in one tree with five branches, each containing one square,
Red squares are contained in one tree with five branches, each containing a different ammount of squares ranging from one to four.

The task I want to perform is to build a continuous polyline along each outer vertex of this collection of squares, like a border line. (more or less like the white line)

I tried this approach using the convex hull component but it builds a region that contains all the squares and avoids some vertices in the inner part of the square collection.

Really appreciate your work, Joseph. The line was arbitrary indeed.
The approach provided by @Michael_Pryor above using the alpha shape plugin has proven effective, and the final shape quite similar to your proposal.