Forex Zone | Forex Forum

EA Behaviour

Discussion started on MT4 / MT5 EAs

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
I don't know if this is the right part of the forum for this topic.
What would be the effect if I run 2 EA's on 1 account, both trade in completely different ways but will have the same currency pairs.
I want to run Easier EA which Crazyprog coded for me, and the other is one of the grid EA's.
The broker does allow hedging, so being long and short in the same currency won't matter, my concern is, will the grid EA see the other EA's trades and decide to close it because it reached a profit level it was looking for?
Or is this where the magic numbers come in?


Linkback: https://www.forex.zone/mt4-mt5-eas/7/ea-behaviour/152/
#1 - August 07, 2018, 06:58:46 PM

  • EA Behaviour in MT4 / MT5 EAs_index
  • Posts: 2998
  • Points: 33162
  • Likes Received: 2821
  • Reputation: +156/-13
EA Behaviour in MT4 / MT5 EAs_xx
Yes, this is what the Magic Numbers are used for. As long as you use a different Magic Number for each EA running, it will work and they wont interfere with each other. Magic Numbers are used by EA's to recognize and manage their own trades. So an EA will ignore any trades with different magic numbers or with no magic number (eg. manual trades).
#2 - August 07, 2018, 07:04:46 PM

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
Thank you
Awesome site, Awesome forum.
#3 - August 07, 2018, 07:49:18 PM

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
What will happen in a case where I run 2 EA's, but 1 doesn't have the option to change the magic nr?
The Easier EA Crazyprog coded has the magic nr option, the Stochastic Martingale EA Admin changed (which is working like a well oiled machine now, thanks again) only shows the expert ID (500), is that the magic nr? 
#4 - August 08, 2018, 07:44:30 AM

  • EA Behaviour in MT4 / MT5 EAs_index
  • Posts: 2998
  • Points: 33162
  • Likes Received: 2821
  • Reputation: +156/-13
EA Behaviour in MT4 / MT5 EAs_xx
What will happen in a case where I run 2 EA's, but 1 doesn't have the option to change the magic nr?
The Easier EA Crazyprog coded has the magic nr option, the Stochastic Martingale EA Admin changed (which is working like a well oiled machine now, thanks again) only shows the expert ID (500), is that the magic nr?
If an EA doesn't have a Magic Number input, most likely it has a set value for the Magic Number hard coded into the EA for some reason. Which means it does have a Magic Number, but you just can't adjust it.

If you are referring to the 'MartingailExpert_v1.0_Stochastic (New Bar Version)', it has 2 Magic Number inputs. They are called 'Magicbuy' and 'Magicsell'. One is for buy orders only and the other is for sell orders only. Whoever coded that EA originally made the EA this way. Maybe you are talking about another EA.
#5 - August 08, 2018, 12:47:52 PM

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
All good.
I do refer to the Martingale Stochastic, so that one's magic nr is sorted.
Thanks
#6 - August 08, 2018, 01:07:31 PM

  • EA Behaviour in MT4 / MT5 EAs_index
  • Posts: 2998
  • Points: 33162
  • Likes Received: 2821
  • Reputation: +156/-13
EA Behaviour in MT4 / MT5 EAs_xx
Just a note, but if you ever do run an EA that doesn't have inputs for Magic Number(s) and you don't have access to the source code, you can still find out the Magic Number used. You can just hover your mouse over one of the EA's trades in the terminal. There should be a number there that shows up. This is the Magic Number. Once you know that, then you can make sure to set a different Magic Number for any other EA's you have running at the same time.
#7 - August 08, 2018, 05:30:16 PM

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
Thanks again.
Would you suggest I give each currency pair it's own magic nr for the same EA.
So if  I trade 2 EA's 
USDCHF on EA 1 has magic nr 123, on EA 2 magic nr 456
USDCHF on EA 2 Has magic nr 888 on EA 2 magic nr 45678
#8 - August 08, 2018, 06:58:40 PM

  • Posts: 352
  • Points: 71
  • Likes Received: 144
  • Reputation: +11/-0
EA Behaviour in MT4 / MT5 EAs_xx
So if  I trade 2 EA's 
USDCHF on EA 1 has magic nr 123, on EA 2 magic nr 456
EURUSD on EA 1 Has magic nr 888 on EA 2 magic nr 45678


#9 - August 08, 2018, 07:00:24 PM

  • EA Behaviour in MT4 / MT5 EAs_index
  • Posts: 2998
  • Points: 33162
  • Likes Received: 2821
  • Reputation: +156/-13
EA Behaviour in MT4 / MT5 EAs_xx
Yes, if you are running multiple EA's on the same chart at the same time, you should use different Magic Numbers. Even if they are not both the same exact EA too.
#10 - August 08, 2018, 07:53:43 PM

  • Posts: 13
  • Points: -15
  • Likes Received: 1
  • Reputation: +1/-0
EA Behaviour in MT4 / MT5 EAs_xx
The magic numbers have been explained very well here. Good work:)
#11 - August 14, 2018, 10:56:39 PM

Members:

0 Members and 1 Guest are viewing this topic.


* Share Topic

Share via delicious Share via digg Share via facebook Share via linkedin Share via pinterest Share via reddit Share via stumble Share via tumblr Share via twitter