Do I need to worry about "disambiguation" in my variable definitions if I intend to have two EA's operating on one account on two currency pairs (one EA per currency pair)?
No.
No.
Thank you for the quick and straightforward reply!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
For example, the EA I will assign to EURUSD 240min chart has a variable I named "currentsymbol = Symbol()". Obviously when this EA initializes it will set the variable "currentsymbol" to equal "EURUSD".
Then I assign the same EA to another chart (within same MT4 terminal) for AUDUSD. When this EA initializes it will set the variable "currentsymbol" to equal "AUDUSD".
My question is - when the EA asigned to a chart for AUDUSD in this example changes the variable "currentsymbol" does the EA assigned to the chart for EURUSD get its own "same named" vairable changed?
I tried to setup a test for this by having the EA's check and see if the variable was being changed by the other EA, but it has not happened so far in my testing which makes me believe MT4 terminal keeps each EA's variables isolated from each other.
Can this be confirmed? Can one EA inadvertantly change the variable value in another EA? Am I safe in allowing the same EA operate on two currency pairs on two charts?