What do you mean ?
It will not work one expert with three magic numbers, you need three experts for three magic numbers.
If you attach the same EA to 3 different charts and use a different magic number for each chart, then it should work. It should only recognise trades for that particular chart.
Here you go: https://www.mql5.com/en/code