fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Read information from a .csv file

    Questions & Answers
    2
    3
    6141
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      james last edited by

      Hello! 🙂

      The brilliant fxDreema software is still just as brilliant! Thank you.

      I have a query - well, a request really. You have a "File Write (Excel table)" block, but no "File Read" block. As it turns out, this would now be of use to me. I understand from http://book.mql4.com/functions/files that it is possible to read data from a .csv file into an EA.

      Specifically I'm looking to record a number after each trade, and then use that number to adjust the position size on the next trade. The reason I need it to be laid down in a .csv, is so that if there is a power failure or something, then when the system comes back up, the number will be there. I could do this in a global variable, but I suppose I'd also like to have it in a safer non-volatile format.

      Would you consider adding this block? I, for one, would be most grateful!

      Thanks, as always,

      James.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Well, CSV is not just a simple text or value, this is table with values and will be array with values in MQL. How many people can handle that 🙂

        Until I make block to read files I will suggest to use those global variables that are available for MetaTrader. Not the global variables for the file, but those that can be seen when clicking F3 in MetaTrader. There is a block to set these and they can be read as well: http://prntscr.com/4knlk3 Only numeric values 🙂
        So, these are stored for 4 weeks somewhere in files. Useful if you want to send some values from one EA to another, or in your case - to keep some values.

        1 Reply Last reply Reply Quote 0
        • J
          james last edited by

          Yes. Thanks, I realised I could do this in a global variable, but I suppose I'd also like to have it in a safer non-volatile format! 🙂

          For now I'll keep to the global variable, and look forward to a new block sometime!

          🙂

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          S
          M
          L
          N
          Q
          A
          F
          S
          T
          A
          P

          18
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors