Present perfect continuous for finished actions

Present perfect continuous, aka present perfect progressive - expresses an action that recently stopped or is still going on. It puts emphasis on the duration or course of the action.

Although it doesn't necessarily imply the action has finished, it very specifically contextualises the "duration or course" of that action relative to the present moment. Often, to indicate that the action has been continuous right up until [about] now, and has either just ended or will end very shortly.

In fact, unless the context or specific verb suggests otherwise, it more commonly implies that the action is still ongoing. Thus for example "I have been living there for years" normally implies you're still living there at the time of speaking.

But we often use this construction when the action has just finished - for example, when answering the telephone you might say "I've [I have] been waiting for you to call". In practice this means exactly the same as "I'd [I had] been waiting for you to call", since the context clearly implies you're no longer waiting.

Sometimes we use it simply to stress continuous action from past through present and on into the future - "I have been doing this all my life, and I'm not going to stop now".

Present perfect continuous (I have been doing sth) can be used whether or not you're still doing it, whereas past perfect continuous (I had been doing sth) always implies you're no longer doing it.