problem with GlobalVariableGet()

 

Hi, I have a problem with GlobalVariableGet() function.

I define my variables in this way:

string count_long = StringConcatenate("count_long_",Symbol()) ;

GlobalVariableSet(count_long,1) ;

The expert runs on different pairs.

So I obtain “count_long_EURUSD”, “count_long_EURJPY”, “count_long_GBPUSD” ...

How can I recall the exact variable using GlobalVariableGet()?

On the EURUSD graph I need to obtain “count_long_EURUSD” and so on.

What can I specify in GlobalVariableGet()?

Thank you!

 
Alberto_jazz:

On the EURUSD graph I need to obtain “count_long_EURUSD” and so on.

What can I specify in GlobalVariableGet()?

You already have the code, you virtually posted it above . . .

double ValueFromGV;

ValueFromGV = GlobalVariableGet( StringConcatenate( "count_long_",Symbol() ) );
 
Thank you very much!
Reason: