Magic Number

 
Do I need to have a different magic number for each currency pair using the same EA?
 

Hi,

it depends on the way you want to manage your order (or position in MT5).
If you have only one EA on a currency pair you can identify the order by the symbol.
If you habe multiply EAs (or Moduls) a different magic number is a good way to
identify a order and handle it on different ways.

I hope, this helps you.

Best regards

 
yes or no, depends on your ea coding
 
Pak Hong Poon:
yes or no, depends on your ea coding

I don't know how it is coded.

 
MAopen MAclose Creator:

I don't know how it is coded.

then you need to ask the ea author
 
MAopen MAclose Creator:

I don't know how it is coded.

then you need to ask the ea author
 
MAopen MAclose Creator:

I don't know how it is coded.

then you need to ask the ea author
 
  1. MAopen MAclose Creator: I don't know how it is coded.

    Then no one can help you. Depends on how it/they is/are coded.

  2. Magic number only allows an EA to identify its trades from all others. Using OrdersTotal/OrdersHistoryTotal (MT4) or PositionsTotal (MT5), directly and/or no Magic number/symbol filtering on your OrderSelect / Position select loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
              Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum (2013.02.15)
              PositionClose is not working - MQL5 programming forum (2020.02.21)
              MagicNumber: "Magic" Identifier of the Order - MQL4 Articles (24 July 2006)
              Orders, Positions and Deals in MetaTrader 5 - MQL5 Articles (1 February 2011)

Reason: