Read values in file

Back to topics list To post a new topic, please log in or register
avatar
63
Route206 2015.09.30 15:20
 

Say i have a file: "DOWJONES.txt"

the file is updated from time to time through email scripts whenever the file is updated, it needs to be read by an EA and the new values must be loaded.
FileGetInteger() can tell me if a new file is present by checking the  FILE_MODIFY_DATE. 
So I'm cool with that.

Now for the content of the file: it is structured as follows: "gargabe_and_more_garbage|string1|integer1|double1|double2|double3|garbage|garbage|string2|

as you can see, the relevant info is in between the "|" 

is there anyway i can read that? I've gone over the https://docs.mql4.com/files files but it didn't bring me a solution...

btw: '*.txt 'is my only compatible file format with MT4.

 Any suggestions?

 

 

avatar
12995
WHRoeder 2015.09.30 17:18 #
 
Route206: I've gone over the https://docs.mql4.com/files files but it didn't bring me a solution...
You read it? Did you read FileOpen - MQL4 Documentation

avatar
63
Route206 2015.09.30 18:43 #
 

Ooh sh*t!! - that's the one i use all the time so didn't bother looking at that one :-/

Anyway, i now need to figure out how the actually use it then. I mean, i can set the delimiter, but how to weed the data out between them is my next puzzle then. Clearly never done that before, so pointers are again helpful.

thanks again 


avatar
12995
WHRoeder 2015.09.30 21:25 #
 
Route206: I've gone over the https://docs.mql4.com/files files but it didn't bring me a solution...
You read it? Did you read File Operations - Standard Functions - MQL4 Tutorial

avatar
63
Route206 2015.10.01 09:08 #
 

As annoying as it could potentially be for you, sometimes I like being taken by the hand ;-)

thanks!! 

Back to topics list  

To add comments, please log in or register