The practice of dressing up in costumes and begging door to door for treats on holidays dates back to the Middle Ages and includes Christmas wassailing. Trick-or-treating resembles the late medieval practice of souling, when poor folk would go door to door on Hallowmas (November 1), receiving food in return for prayers for the dead on All Souls Day (November 2). It originated in Ireland and Britain, although similar practices for the souls of the dead were found as far south as Italy. Shakespeare mentions the practice in his comedy The Two Gentlemen of Verona (1593), when Speed accuses his master of "puling [whimpering or whining] like a beggar at Hallowmas." The custom of wearing costumes and masks at Halloween goes back to Celtic traditions of attempting to copy the evil spirits or placate them, in Scotland for instance where the dead were impersonated by young men with masked, veiled or blackened faces, dressed in white.
So you see...Halloween has been around longer than Canada and America!
Have a fabulous day!