You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everybody,
I have a problem about reading some double values from a csv file.
This is the content of my csv file I'm using as example:
3;0;0.01;6;11.91346
63;1;0.02;5;2.786357
and this is my algorithm:
void OnStart()
{
filehandle = FileOpen("WTI.csv",FILE_READ|FILE_CSV,';',CP_ACP);
if(filehandle != INVALID_HANDLE)
{
Print("File correctly read");
while(FileIsEnding(filehandle)==false)
{
while(FileIsLineEnding(filehandle)==false)
{
TempHistArray[c] = FileReadNumber(filehandle);
c++;
}
}
FileClose(filehandle);
}
else
{
PrintFormat("Failed to open file");
}
}
I can correctly open the file but when I use Print functions to display the values I've just read, it shows only 0.0 values: every value is null!
I've followed the instructions I've found on this forum about csv reading, but I cannot achieve this operation.
Might somebody help me?
Thanks very much!