I can't convert from HFS+ to APFS an external SSD volume I created for testing I created an external volume with macOS High Sierra.  When I try to convert it to APFS with Disk Utility, the "convert to APFS" is greyed out.  I tried unmounting the volume first, then it's not greyed out, but when I try to convert, I get this error: The operation couldn’t be completed. (com.apple.DiskManagement error -69546.).

I heard that having "cloned" a volume may prevent it from being converted to APFS.  I don't remember if I cloned it or not.  I created it with El Capitan, then upgraded it to High Sierra.  Now it won't convert to APFS.

Any way to do the conversion? such as terminal command or something?
According to this and this article the post-install conversion to APFS should work in Recovery Mode:


  
  Boot the Mac into Recovery Mode by holding down the Command and R keys until you see the macOS Utilities screen.
  Open Disk utility.
  Choose your boot volume [the external boot drive].1
  Click on the Edit menu
  Click on Convert to APFS
  When prompted with “Would you like to convert  to APFS?”   
  click on the Convert button.
  When the process is finished, click on the Done button.
  


1: According to Redarm's comment you have to unmount the volume additionally!



I can't test this myself - your mileage may vary.