for(int i=0;i<SymbolsTotal(1);i++) { Print("SYMBOL: ",SymbolName(i,1)," Found At: ",i); }
Marco vd Heijden just gave you your answer. He showed you how the two relate.
All you had to do was think and code it.
int IntegerValue (string symbolName, bool isSelected=true){ for(int i=SymbolsTotal(isSelected)-1; i>=0; --i) { if( SymbolName(i,isSelected) == symbolName) return i; } return -1; }
Was that so hard that you couldn't even try to code it?
It does not exist and even if it did, it would be implemented very similarly to the way @Marco vd Heijden has demonstrated. In other words, you can build your own reverse function by simply going through the entire list until a match is found.
EDIT: Looks like @whroeder1 hit the button before me!
It does not exist and even if it did, it would be implemented very similarly to the way @Marco vd Heijden has demonstrated. In other words, you can build your own reverse function by simply going through the entire list until a match is found.
EDIT: Looks like @whroeder1 hit the button before me!
SymbolName()
which is what I failed to come up with. But I got the jerk now.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am aware of the function
used to return a symbol name given an integer.
I am looking for a function to return the integer value of an instrument given a symbol name. Something that looks like:
IntegerValue (SymbolName, true):
Any help. Thanks in advance.