Why do you want to use StringToCharArray() and CharArrayToString() at all ?
You can either convert your string to a datetime with StringToTime() or extract your data directly from the string using StringSubstr().
I'm willing to convert a historical data txt file to MT5. The text file structure is as follows:
201402101130,780,00,780,00,779,75,779,75,77,6004,1 |
I'm reading from file and willing to convert to below structure and write to a new file as date, time, open,close,high,low,volume
2014.02.01 , 11:30 , 780.0 , 780,0, 779.75, 779.75 , 6004
So I need more string operations.
I think function always starts with start=0 altough I'm willng to use a different position.
int StringToCharArray( string text_string, // source string uchar& array[], // array int start=0, // starting position in the array int count=-1 // number of symbols uint codepage=CP_ACP // code page );
Could you please suggest me a function/method so that I could split and than merge the strings according to my needs.
Thank you.
I'm willing to convert a historical data txt file to MT5. The text file structure is as follows:
201402101130,780,00,780,00,779,75,779,75,77,6004,1 |
I'm reading from file and willing to convert to below structure and write to a new file as date, time, open,close,high,low,volume
2014.02.01 , 11:30 , 780.0 , 780,0, 779.75, 779.75 , 6004
So I need more string operations.
I think function always starts with start=0 altough I'm willng to use a different position.
Could you please suggest me a function/method so that I could split and than merge the strings according to my needs.
Thank you.
I already answered you. You don't need to user char array at all.
Use StringSplit(), StringSubstr(). StringToTime(), StringToDouble()...
AED71 #: I'm willing to convert a historical data txt file to MT5. The text file structure is as follows: 201402101130,780,00,780,00,779,75,779,75,77,6004,
Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?
How To Ask Questions The Smart Way. (2004)
When You Ask.
Follow up with a brief note on the solution.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I would like to seperate year, month and day from date but the code does not work properly. Could you please help me.