Download MetaTrader 5

How do I store CSV file into a 2d array!!

To add comments, please log in or register
king_david599
50
king_david599  
I don't know the syntax, I've tried the mt4 guide/book, no help! I just need the information from people who have done it before, its taking me a week!

Main idea:
for(row=0; row<=8; row++)
  for(col=0; col<=8; col++)
   Arr[row][col] = FileReadNumber(handle)
rod178
272
rod178  
king_david599:
I don't know the syntax, I've tried the mt4 guide/book, no help! I just need the information from people who have done it before, its taking me a week!

Main idea:
for(row=0; row<=8; row++)
  for(col=0; col<=8; col++)
   Arr[row][col] = FileReadNumber(handle)
https://docs.mql4.com/files/filereadstring
Carl Schreiber
7239
Carl Schreiber  

I split the part by lines and then by 'cells':

nL = StringSplit(txtFile,StringGetCharacter("\n",0),allLines); 
...
   nI  = StringSplit(allLines[iL],';',singLine);

This causes less headache

king_david599
50
king_david599  
gooly:

I split the part by lines and then by 'cells':

This causes less headache


Thanks a lot guys! @rod178 was right! Much appreciation!
Another stumbling block, how do I loop through each Column and Row, to get values from the array. I'm loping through searching for a value in the array that's above 85.
To add comments, please log in or register