When I was a kid, we didn't celebrate Halloween in Denmark (people have started to do this within the last 10 years or so), but at Shrovetide we have a similar custom, dressing up and going from door to door, singing a song with a similar meaning to the "trick or treat" concept:
"Shrovetide is my name,
buns do I want,
if I get no buns,
then I'll make trouble.
Buns up, buns down,
buns in my belly.
If I get no buns,
then I'll make trouble."
Usually we didn't get buns though, but money or candy.
I used to enjoy this as a kid.
Last year some kids (not dressed up) came to my door and said "trick or treat", and I may have looked a bit confused, but then they said "it's Halloween". Oh yes, I forgot that or never thought about it because I wasn't used to that custom. But I had some chocolate I could give them.