Download MetaTrader 5

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

To add comments, please log in or register
Forex Trader
114267
Forex Trader 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.

Forex Trader
114267
Forex Trader 2010.04.19 16:23  
Read this article and you will find the answear: https://www.mql5.com/en/articles/1474
To add comments, please log in or register