Using global variables as input parameters

Alon D  

I am trying to follow this article

https://www.mql5.com/en/articles/4917


He is setting the optimized parameters as global variables.

But how do I use them in my EA?

I can't set input parameters to global variables because they require a constant.

And if I cancel all the inputs and just make them regular variables, then I won't be able to use the bot in the strategy tester...

Alon D  
How do I check if EA runs in optimization mode?
Alon D  
Found it