Chosen Solution

I have a 2017 Macbook pro that suddenly today started showing flicker vertical and horizontal lines. Sometimes the whole screen flashing briefly. When it first started I could press between the touch bar and the screen and it would come back. Now it is only normal when it is closed almost all the way. I am thinking perhaps the issue is the display cable? like this: MacBook Pro 15" Retina (Late 2016-2019) Display Cable If so that seems fairly easy. I need to replace the battery anyway so would get the kit to replace the battery so I would have the tools to open it. Does that seem correct? anything else I should check first? Images below:

You have a damaged LCD display (TAB error) or the T-CON board connection via its ribbon cables to the LCD display panel. The cable you pointed to (MacBook Pro 15" Retina (Late 2016-2019) Display Cable) is not the one that flexes and so far I have not seen this cable have any problems. Here’s a breakdown of the ribbon cables that traverse between the display and the T-CON board. The pink marked cables are the horizontal and vertical signal lines to the LCD panel. The red marked cable is the one you had thought.

Sadly, you need a new display assembly to fix this. Both the LCD and the T-CON are part of the same assembly and can’t be serviced beyond the full assembly replacement MacBook Pro 15" Retina (Late 2016-2017) Display Assembly and here’s the guide MacBook Pro 15" Touch Bar 2017 Screen Replacement

Since it works when it’s a few degrees open, loose connection of the display cable may indeed be the issue here. Definitely what you should check before going for a new display altogether.