Fix Windows after Ubuntu installation I've followed closely this step-by-step guide: https://apple.stackexchange.com/a/257275/322989
After that my Ubuntu 16.04 LTS and Mac installation work perfectly fine. But my Windows 10 does not. Every time I select the Windows partition in the startup manager, everything freezes. 
Here is my diskutil list disk0:

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         370.0 GB   disk0s2
   3:                 Linux Swap                         3.9 GB     disk0s3
   4:                        EFI NO NAME                 500.2 MB   disk0s4
   5:           Linux Filesystem                         35.3 GB    disk0s5
   6:       Microsoft Basic Data BOOTCAMP                89.9 GB    disk0s6
   7:           Windows Recovery                         509.6 MB   disk0s7


And here my sudo gpt -r show /dev/disk0:

          0          1         MBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  722656248      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  723065888    7550352      3  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
  730616240       1616         
  730617856   68913152      5  GPT part - 0FC63DAF-8483-4772-8E79-3D69D8477DE4
  799531008     976896      4  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  800507904  175598678      6  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  976106582        938         
  976107520     995328      7  GPT part - DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
  977102848       2179         
  977105027         32         Sec GPT table
  977105059          1         Sec GPT header


My disk0s1 looks like this:


When I boot with a Windows 10 installer and run diskpart, list volumes etc. I get:


Do you have any idea how to fix my Windows installation?
Your starting configuration was slightly different than that of the question you posted a link to. So you would have had to adapt the instructions to meet your particular configuration. Step 14 shows the new partitions to be "swap", "ext4" and "ESP" in that order. Your current configuration shows you choose "swap", "ESP" and "ext4" in that order. This change should not have made any difference, but does show one place where you deviated from the original instructions. I assume you made other deviations to the instructions that I can not detect due to lack of information. I also assume this why you can not get Windows to boot. I did a installation using the posted instructions, Ubuntu 16.04.6 and the order of "swap", "ESP" and "ext4". I did not encounter any errors that would prevent Windows from booting.

I know of two possible answers to your question.


You could mount the EFI partition (disk0s1) and post the contents of the following directories (folders).  I could then try to determine if I see something wrong. Be sure to include at least the file names and sizes.

/Volumes/EFI/EFI/Boot
/Volumes/EFI/EFI/Microsoft/Boot

Implement the solution given below. Basically, you will be recreating the Windows boot files.


You will need a Window 10 installer flash drive. If you do not have this flash drive, then you will need to build one. First download the 64-bit Windows 10 iso from this Microsoft web site. This can be done while running macOS. Currently, I would recommend the Windows 10 April 2018 Update. Next you will need 16 GB or larger flash drive. For your model Mac, I believe the Boot Camp Assistant will aid in the creation of the Windows installer flash drive. If not, let me know.
Boot to the flash drive. Hold down the option key at start up. From the Startup Manager, select the external drive icon labeled "EFI Boot".
When the window below appears, press the shift+F10 key combination to open a Windows Command Prompt window.



The Windows Command Prompt window should appear, as shown below.


Use the diskpart command to determine the drive letter for BOOTCAMP partition. In my case, this was drive C:.

diskpart
list volume

Select the volume with the label EFI. In my case, this was volume 5.

select volume 5

Assign this volume the drive letter S:.

assign letter=s

Enter the command below to exit the diskpart command.

exit

Here, I will assume the BOOTCAMP partition is assign the drive letter C. Enter the command shown below to recreate the boot files.

bcdboot C:\windows /s S:

Enter the command shown below, to close the Windows Command Prompt window.

exit

Click on the red button with the X to close the window.


Click on the Yes button to cancel the installation.





Update 1

The output you posted for the commands diskutil list disk0 and list volume seem to contradict each other. One possibility, that would account for this, would be if disk0 is hybrid partitioned. You could check for this condition by entering the following commands after step 4 in my original answer.

list disk
select disk 0
list partition


Post the results to your question. 

Update 2

You drive appears to be hybrid partitioned. This would explain why Windows fails to boot. While you do not have to use a third party tool to remove hybrid partitioning, the third party tool named gdisk makes removal easy. Below are instructions for removing the hybrid partitioning. 


Download gdisk. I assume this will goto your Downloads folder.
Remove the quarantine from the download by entering the command given below in a Terminal application window.

xattr -d com.apple.quarantine ~/Downloads/gdisk-1.0.4.pkg

Use the Finder application to open gdisk-1.0.4.pkg. This will start the installation of gdisk.
Disable System Integrity Protection (SIP).
Enter the command given below in a Terminal Application window.

sudo gdisk /dev/disk0


This command is interactive. Enter the next four commands when prompted.

x
n
w
y


Below is an example.

Marlin:startup davidanderson$ sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 1.0.4

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): x

Expert command (? for help): n

Expert command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk0.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Marlin:startup davidanderson$ 

Enable SIP. One way to do this would be to enter the command given below, then restart your Mac.

sudo csrutil clear