OrderSymbol() vs Symbol() vs Currency

 

Hi;

I am curious to know: presuming I have a global variable assigned the value of Symbol().

Which expression (see below) would be better to use and what are the differences?

Thank you.

string Currency=Symbol();    // global variable      

MarketInfo(OrderSymbol(), MODE_POINT);

MarketInfo(Symbol(), MODE_POINT);

MarketInfo(Currency, MODE_POINT);
 

You should not be assigning it to a globally scoped variable declaration in the first place.

When the program first starts, there is no guarantee that market information will be available at all.

You should only be reading that information, once you know it is available, for example after the first tick has arrived.

 
And for OrderSymbol() you need to select the order before using it 
 

Now it makes sense.

Thank you much.

Reason: