PDA

View Full Version : Reading News from a CSV file



Jundla
00:28,
Hi All,

The thought I have is that, after a week I download a csv file using the high impact news and I want my EA to read it and to filter transaction occasions based on those events.

Does anyone know of an easy thing to do about this? Below is the way.

Thanks in advance
https://www.forexsoutheast.asia/attachments/1527746473727168677.jpg

Jundla
19:36,
Hi Sangmane,

Excellent example! Thanks so much for your help, I think about a week, you saved me. https://www.forexsoutheast.asia/attachments/1527746467.png

Javicsu05
20:56,
Hi Sangmane,
Your EA works fantastic for me,now my csv like this:
Time Bid Ask
2014.08.20 08:14:26 171.754 171.794
2014.08.20 08:14:27 171.754 171.792
2014.08.20 08:14:29 171.755 171.793
2014.08.20 08:14:29 171.756 171.795
2014.08.20 08:14:31 171.756 171.796
2014.08.20 08:14:31 171.756 171.796
2014.08.20 08:14:31 171.756 171.795
2014.08.20 08:14:33 171.755 171.795
2014.08.20 08:14:33 171.755 171.793
2014.08.20 08:14:33 171.757 171.794
2014.08.20 08:14:34 171.757 171.795
2014.08.20 08:14:34 171.757 171.797
2014.08.20 08:14:34 171.758 171.794
2014.08.20 08:14:34 171.758 171.796
2014.08.20 08:14:34 171.758 171.799
2014.08.20 08:14:34 171.758 171.798
2014.08.20 08:14:34 171.761 171.8
2014.08.20 08:14:34 171.76 171.8


Could you show me the way to read the last line and the last-n lineup?

crisvaxxs
22:17,
Hi,

I want same as above rather than printing the values, I want to put into the structure using FileReadStruct or FileReadArray function and then print values in the structure. Can anyone have suggestion or piece of code onto this.

Thanks Regards
Pazhani

kosol88
23:38,
I use this to see from a news csv file that only has in it the following format: 2014.10.28 14:25

The document is read along with the date and time read in an array which is then utilized to halt trading.

In my EA the code is:

//-- parameters for data reading
string InpFileName =News.csv; // document name
string InpDirectoryName=Information; // directory name



int openTheFile()
FILE_WRITE

Jundla
00:59,
Okay.. So a couple of questions. . No on second thoughts;

does anyone know of a bit of code they could point me I could use for instance?