"I have been in America for 10 years" indicates that the speaker is still currently in America.
But what if you are not in America anymore and you want to express that you have spent 10 years living in America? Can you say:
I had been in America for 10 years. I was in America for 10 years.
Or are there any other ways to express the same idea?