A magic number is an identifier that you can assign to an order in metatrader 4 using the mql4 language. What is magic number? When working with scripts, indicators , and expert advisors in metatrader 4, you may arrive to a stage where you manage many orders at the same time.
When a trade is opened by an expert advisor, a magic number can be associated with the trade. ( the ordersend function can be difficult to configure) ordersend has many parameters, one of them is named magic.
the expert magic number represents the metatrader concept to track open positions that are generated by the expert advisor. Using an expert magic number ea can mark each position by number and distinguish the opened trades versus trades that did not open. The expert magic number can be any unique number and they are license plates for eas.
the magic number is a metatrader concept used to track the open positions of an ea. The concept allows the ea to distinguish the trades that it opened versus those that it did not.
I want to set the magic number in my robots in metatrader 5 (mql5).