Formado com had + been + verbo principal com –ing. Enfatiza a duração ou repetição da ação até determinado tempo no passado. É comum vir acompanhado de advérbios como for, when¸ after: It was 8:00 pm and she was tired because she had been working for ten hours.
Yesterday morning I got up and looked out of the window.The sun was shining but the ground was very wet. It had been raining.
Atenção para não confundir past continuous com past perfect continuous:
When I met Sarah, I saw she was crying (ela estava chorando quando a encontrei)
When I met Sarah, I saw she had been crying ( ela não estava mais chorando, mas deu para perceber que estivera chorando antes).