Symbol name for comparison
LEHayes:
As you can imagine, I had an uhoh moment when I realized that the Symbol() is actually a numeric value. [...]
As you can imagine, I had an uhoh moment when I realized that the Symbol() is actually a numeric value. [...]
But Symbol() returns string...? You can compare strings, what's the problem?
sorry to trouble you folks over this. I think I will get some sleep now.
According to MQ, the 'Symbol()' variable IS a string value.
There is also OrderSymbol() that returns the 'string' of open orders.
There is another one as well with another word tacked onto the beginning of *Symbol() but I can't recall it at the moment and searching in the MQL editor for 'Symbol' doesn't bring it up. But if I remember it correctly, it doesn't return a pure and litteral 'Character String' anyway.
There is also OrderSymbol() that returns the 'string' of open orders.
There is another one as well with another word tacked onto the beginning of *Symbol() but I can't recall it at the moment and searching in the MQL editor for 'Symbol' doesn't bring it up. But if I remember it correctly, it doesn't return a pure and litteral 'Character String' anyway.
I am collecting the users input for the name of 3 symbols. They MUST match the name of the symbol as the broker displays them.
As you can imagine, I had an uhoh moment when I realized that the Symbol() is actually a numeric value. DUH, so, any suggestion on how I can get a comparison? How can I determine that the Symbol the user is talking about is the same asLater, I do a comparrison between the text provided by the user with the name of the Symbol, like the following:
Symbol()?