Working with CSV-Files --I am going crazy

 

Hi,
I am writing an EA which is working with CSV-Files.
For testing I put my CSV Files in the following folder:
/tester/files

Here is only a small part from my EA:
[CODE]
int handle = 0;
int Long = 0;

handle=FileOpen("LongMarket.csv",FILE_CSV|FILE_READ,';');

if (handle > 0)
{
Long= FileReadNumber(handle);
FileClose(handle);

}
Print("LongMarket = ", Long);
Print("Long handle = ", handle); [/CODE]

In my EA I read the CSV-Files and then I write some integers down.
Now when I do my test and read in the journal the "Print"-messages, I often get old integers which aren't writen in the CSV-Files anymore!!
For example:
First there is written 3 and my EA ist working and writes the 0 into the file,
I can only see the 3 in that CSV-File!!
When I clear that CSV-File and put a new CSV-File with 3 in that " /tester/files"-Folder, I can only read the 0 from the test before!!!! But I can't find, where the EA reads the 0!!!

I am going crazy!!!!!
I hope you can understand my question and give me a tipp!!

 

here you can find a lot about this. http://eareview.net/tick-data/ ;) Enjoy

Reason: