about reading data: need to open data, then read its content:
bool ReadFile(const string fileName, string &data){
const int handle=FileOpen(fileName,FILE_READ|FILE_TXT);
if (handle==INVALID_HANDLE) return false;
string collector = "";
int SIZE = (int)FileSize(handle);
int size=StringLen(collector);
while(size < SIZE && !IsStopped()){
collector = StringConcatenate(collector, "\n", FileReadString(handle, SIZE - size));
size = StringLen(collector);
}
FileClose(handle);
if (!FileDelete(fileName))
Print("FileDelete(", fileName, ") FAILED"); // to delete this file after it is read
data = collector;
return true;
}
about parsing each line of the above obtained text:
MqlTime mql;
int st_pos=0,end_pos=0;
int year = 0;
end_pos = StringFind(line, ".", st_pos);
int year = StrToInteger(StringSubStr(line,st_pos+1,end_pos-st_pos-1));
mql.year = year;
// same with month, day, hour and minute
datetime time = StructToTime(mql); - this is your date
after that - find index using iBarShift()
that corresponds to your date and Buffer[i] = value that is parsed from the same line