Why GlobalVariables doesn't work on tester mt5?

To add comments, please log in or register
Amirhossein Karimzadeh
629
Amirhossein Karimzadeh  
Why GlobalVariables don't work on tester mt5?
Fernando Carreiro
4433
Fernando Carreiro  
Amirhossein Karimzadeh: Why GlobalVariables doesn't work on tester mt5?

Because they are not simulated in the Strategy Tester! So, use a condition in your code, to only use them when the code is not being run in the tester!

Disregard my comment and see @Alain Verleyen's answer below and the link he provided!

Alain Verleyen
36131
Alain Verleyen  
Fernando Carreiro:
Because they are not simulated in the Strategy Tester! So, use a condition in your code, to only use them when the code is not being run in the tester!

I suppose you mean they are simulated in ST ? 

Fernando Carreiro
4433
Fernando Carreiro  
Alain Verleyen: I suppose you mean they are simulated in ST ? 

No, I meant "NOT"!

I have not tested this on MT5, but on MT4 any Global Variable manipulated in the tester actually accesses the "real" global variables and not any simulated ones, which can cause havoc because it messes up any variables in use by EAs that are running on the live charts.

I had assumed that the same happens on MT5 as well, but from your statement, it seems that they are simulated in MT5?

So, the question now for the OP, is what he actually means - if by not working, he means that the "real" ones are not affected or they are affected?
Alain Verleyen
36131
Alain Verleyen  
Fernando Carreiro:

No, I meant "NOT"!

I have not tested this on MT5, but on MT4 any Global Variable manipulated in the tester actually accesses the "real" global variables and not any simulated ones, which can cause havoc because it messes up any variables in use by EAs that are running on the live charts.

I had assumed that the same happens on MT5 as well, but from your statement, it seems that they are simulated in MT5?

Yes they are and don't interact with terminal GV. 
Fernando Carreiro
4433
Fernando Carreiro  
Alain Verleyen: Yes they are and don't interact with terminal GV. 
OK! I was still re-editing my post! Thanks for the update!
To add comments, please log in or register