why am I getting this error? - page 2

 
tec.nacks #:
I have more than one terminal on my VPS, is it okay to use the same magic number across is the terminals? Same EA across
Magic number in EA is uslally using on the way as the following:
one magic number per chart in one terminal.
For example, you attached EA to EUR/USD, and to GBP/USD, and to an other EUR/USD chart.
So, you need 3 different magic numbers in the settings of the EA.

You can do same (differently) on the other terminal.
 
Sergey Golubev #:
Magic number in EA is uslally using on the way as the following:
one magic number per chart in one terminal.
For example, you attached EA to EUR/USD, and to GBP/USD, and to an other EUR/USD chart.
So, you need 3 different magic numbers in the settings of the EA.

You can do same (differently) on the other terminal.
Wow...that’s tedious. 

What’s the implication of having the same magic number  across board?
 
@tec.nacks #Wow...that’s tedious. What’s the implication of having the same magic number  across board?

The implications of using the same magic number across the board is that the EAs will interfere with each other's trades.

However, most EAs, if properly coded, are able to distinguish between symbols, so will allow for the same Magic Number to be used on different symbols.

They will however not be able to distinguish between different time-frames on the same symbol, and thus require a different magic number in those cases.

EDIT: Some EAs are able to adjust their own magic number to include the time-frame so as to prevent a clash. It really depends on the author's coding skill.

 
tec.nacks #:
Wow...that’s tedious. 

What’s the implication of having the same magic number  across board?

Magic number is some kind of identification which Metatrader platform understands.

For example, you opened EUR/USD chart and attached EA onto it with magic number 1111; and you opened the other EUR/USD chart and
attached same EA onto it with magic number 1112.
Your EA opened 1 trades for EUR/USD from one chart and the other trade for EUR/USD from the otheer chart.
After that your EA (you) wants to close one trade for EURUSD from the second chart, and your EA is telling to Metatrader:
"close trade with number 1112 please".
And Metatrader will close.

But two Metatrader platforms are not talking between each other, they are working independently from each other.
And that is why you can use same magic number for EUR/USD chart in one platform and for an other platform.

By the way, if you opened the trade manually so magic number of manual trade is 0 (at least it was coded like that in many EAs for MT4).
And Metatrader understands those numbers.

 
tec.nacks #: Wow...that’s tedious. 

What’s the implication of having the same magic number  across board?

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)
          PositionClose is not working - MQL5 programming forum (2020)
          MagicNumber: "Magic" Identifier of the Order - MQL4 Articles (2006)
          Orders, Positions and Deals in MetaTrader 5 - MQL5 Articles (2011)
          Limit one open buy/sell position at a time - General - MQL5 programming forum (2022)

You need one Magic Number for each symbol/timeframe/strategy. Trade current timeframe, one strategy, and filter by symbol requires one MN.

 
Thank you all for the response