The magic number is simply an ID that is applied to an order when placed that the EA can refer to later. So, if I open an order, I could give it a magic number of 123. Then the EA can review open orders and find ones that have the same magic number of 123 and manage them. This allows you to run a second EA on the same account, providing you have assigned a different magic number to the second EA. So EA #2 would use 456, and open trades on the same account, but now it can manage it's orders by looking at the ID of the order. This ensures an EA only works with orders it has placed. |