Why GlobalVariables doesn't work on tester mt5?

 
Why GlobalVariables don't work on tester mt5?
 
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!

 
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 ? 

 
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?
 
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. 
 
Alain Verleyen: Yes they are and don't interact with terminal GV. 
OK! I was still re-editing my post! Thanks for the update!
Reason: