top of page

What is the magic number, and how do I use it in the MT4 and MT5 EAs?

Today we will talk about the magic number, which you will find in every EA (expert advisor) in Metatrader 4 and Metatrader 5 as well. Many people don't know what this number means or what to do with it. After reading this article, you will find out that it is very simple to use this feature.



Here is the magic number and where to find it.

What is the magic number, and how do I use it in the MT4 and MT5 EAs?

Actually, it is a unique identifier for each trade made by an EA, so you can use multiple Forex robots in the same terminal and each trade will function flawlessly.This also helps when you need to restart MT4 or MT5. After a restart, all robots still know their trades and successfully continue to trade as they're programmed.

What combination of numbers can I use in this setting?

It can be used with any combination of numbers except 0, because 0 means manually placed trades. Just in case, use only numbers and don't use any of the characters.


Here is an example of how to set the magic numbers if only a few Forex robots are being used in the same terminal:

1nr. EA - magic number is 1234.

2nr. EA - magic number is 12345.

3nr. EA - magic number is 123456.


In this example, all the magic numbers are set up correctly, of course. You can use any of your desired numbers. Each number must be distinct from the others. As you can see, it's very easy to set up this setting.


How do I find a trade made by a specific EA with a magic number?

Just hold a mouse arrow for a second on the trade, and you will see its magic number, so you will find every trade. Also, you can identify your trades by commenting on the trade as well.


What is the magic number, and how do I use it in the MT4 and MT5 EAs?

Here's an example of a trade that was manually entered.

What is the magic number, and how do I use it in the MT4 and MT5 EAs?

It's a very easy thing to do, as I promised, but still needs to be done. If you use the same EA on a few charts at the same time with the same magic number, you can get into some trouble, so never forget about this feature. Good luck. I hope that this article was useful for you.



If you still have any questions, don't hesitate to contact us.



Recommended EAs:















4件のコメント


Thanks. I was looking for this info. Explained very simply.

いいね!

Thanks.

いいね!

sami anbar
sami anbar
2020年5月18日

Thank you, That was very useful information.

いいね!

Makes sense, thank you.

いいね!
bottom of page