The ability of Force-sensitive characters to detect one-another's presence is a subtle thing. It is affected by a large number of factors. It is also clear that what is involved is not simply direct detection. When Vader first senses Obi-Wan's presence on the Death Star, he says to himself: "I sense something," not that he senses someone. When he explains this to Tarkin, Vader is even more explicit: "I felt a tremor in the Force. The last time I felt was in the presence of my old master." The emperor echoes this in the way he describes how he has become aware of Luke. "There is a great disturbance in the Force. We have a new enemy, Luke Skywalker."
With that fact in mind, we can look more closely at other things that affect Force-users' sensing abilities. One factor that clearly has an effect is distance. For example, Vader did not sense Obi-Wan's presence until they were both on the Death Star. Only the physical proximity brought the old Jedi to his former pupil's attention. Another example is that, once Luke knows that Vader is close to Endor, he knows that Vader will sense his presence there. He was not worried about alerting the imperials to the plot when he thought that Vader would be far away.
Great distances can be overcome to some extent, with time and effort. However, very-long-distance detection appears to have a difficult time pinpointing individuals. Vader and the Emperor can sense the disruption that Luke creates in the Force energy field even on galactic scales, as he is learning to use his powers effectively. His existence is clear from the imprint he leaves on the Force, but it is not possible to track down his position just by following his trace. (On the other hand, once Vader gets a clue to Luke's location on Hoth, he immediately can identify that it is the right place.)
A Force-user also seems to be much more detectable when they are using their abilities and when they are in a heightened emotional state. (These two are often closely related; Ben instructs Luke to use his Force senses by "stretch[ing] out with [his] feelings.") Vader recognizes Luke's strength with the Force as Luke is on his attack run against the Death Star. And after their battle on Cloud City, Luke is such an emotional wreck that Vader can follow Luke movements with his mind and actually converse with his son telepathically. Luke is a huge, poorly controlled explosion of emotional energy and Force power at this point; it is so strong, in fact, that he can broadcast his position to Leia, who is Force-sensitive but completely untrained.
In contrast to how Luke is a blazing beacon of Force disturbance at the end of The Empire Strikes Back, he certainly does seem to be much better at hiding himself in Return of the Jedi. As I noted above, he feels confident that he will not be detected by a distant Vader, but he also knows that if Vader is in orbit around Endor, Vader will be able to find him. The emperor does not detect him, because of the emotional component. There is an emotional resonance between Luke and his father, which makes it much easier for them to detect each other.
On the other hand, Luke definitely has a limited ability to block Vader's probing. During their battle in the throne room, there is, near the end, a period when Luke is hiding in the darkness under the platform and Vader cannot find him. Ordinarily, a dark lord of the Sith would have no difficulty whatsoever find somebody hiding in a dark corner of the same room; the only conclusion is that Luke is capable, for a brief period at least, of hiding the imprint he makes on the Force, so that Vader cannot immediately divine his location. (Presumably Luke is also trying to hide himself from his father from the moment that he realizes Vader is on the command ship Executor, until he turns himself in at the shield generator facility. However, he knows that it is only a brief matter of time before Vader tracks him down.)
On the other hand, this hiding does not appear to be something that Luke was capable of in The Empire Strikes Back. During the later stages of their battle, Vader seems to have a perfect handle on Luke's location and successfully ambushes him at least once. Luke's greater maturity in the use of the Force, as he displays it in Episode VI, does clearly indicate an ability to shield his presence that he did not really possess before.