+ Reply to Thread
Results 1 to 2 of 2

Thread: Open/Close, Reading files from MQL4

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    Open/Close, Reading files from MQL4

    Does anybody know how to open, read files from MQL4. Here is the problem. MQL4 doesnt have a really good mathematical interface or doesnt allow you to create multiple dimension arrays. So, I have parallel programs that run mathematical formulas and yields a result based on the typical HLOCV data on each and every tick. The result is storage in a xyz.dat file. So, what I need is;
    a.- To turn on a 'flag' that I can read using MQL4 that will indicate that the program finished its calculation and xyz.dat is updated.
    b.- To allow me from MQL4 to open xyz.dat file, read its content, and use it on the decision making process.

    Does anybody know how to read such flags and open/close files from MQL4??
    Thanks,
    Algobrain

  2. #2
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    383
    Hi AlgoBrain,

    Sounds like you're after the MQL4 file functions?

    For an example of how they can be used in practice you might like to take a look at the source of our GuruLogger "indicator", though that writes bars rather than reads them.

    You can try using a zero length file as a flag. If you can't open it successfully, then xyz.dat isn't ready yet. Create your "flag" file when it is.

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts