This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

String comparison ("abc"=="ABC")


Back to topics list
avatar
4
daemon 2007.03.02 19:53 
It seams to me there is not possible to compare strings regardless the letter case. I wanted to write the script which draws the history orders from a csv file. In case you lose for some reason the visual information on your chart which reflects your account history, you are not able to restore it from the history journal automatically. And having the script you are almost there, but... when loading the history from a file and filtering the orders by the symbol name you can't use:

string symbol_read_from_csv;
...
symbol_read_from_csv = FileReadString(hnd);
...
if (Symbol()==symbol_read_from_csv) ....


because Symbol() is uppercase and when you save the history you get lowercased symbol names. Of course you can check and change and so on... but... so this is the suggestion and the bug-like report at the same time if you don't mind.

avatar
1
Robopip 2010.04.19 16:23 
Read this article and you will find the answear: http://articles.mql4.com/457
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets