If you are arriving at T5 and departing from T4 then follow the airside transfer route which comprises an airside bus between the two terminals. I don't see any need to go landside and go via HEX or tube - both those options require waiting at the T123 station (HEX) or Hatton Cross (tube) to change trains, and going lanside between T5 and T4 is not particularly convenient for that reason.
When you arrive at T5 follow the purple flight connection signs and specifically the ones for T4.
When you get to T4 you will go security before going in to the departure area.