Please Help Me !!! Save and read double variable in file

 

Hi

I Have 2 Variables Of Type Double (Total Of Profit Pips And Total Of Loss Pips) In Ea And I Want Save Their Values In Text File Because I Need Their Value If I Close MT4 Or If  I Want Use Their Value In Another MT4 So Please Help Me To Save And Read Double Variables In File .

   Thanks.

 

For something simple like that, why not use Global Variables of the Terminal?

https://www.mql5.com/en/docs/globals

Documentation on MQL5: Global Variables of the Terminal
Documentation on MQL5: Global Variables of the Terminal
  • www.mql5.com
Global variables are kept in the client terminal for 4 weeks since the last access, then they will be deleted automatically. An access to a global variable is not only setting of a new value, but reading of the global variable value, as well.
 
Hamza Ghennami: I Want Save Their Values In Text File … I Want Use Their Value In Another MT4 … Help Me
  1. You haven't stated a problem, you stated a want.

  2. What's the problem? Open a file for writing, write the values, close the file. Open the file for reading, read the file, close the file.

  3. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help
              urgent help.

    Or pay someone. Top of every page is the link Freelance.

 

thank you very much Keith Watford and William Roeder i use global variable to save my variables 

cheers

Reason: