Question on coding - How to store a persistant variable and use it for back testing

 
I have written an EA that opens orders and when the price reaches 1:1 RR ratio, moves SL to Breakeven. I need the program to remember this SL and I store in in a file that I retrieve later for my calculations. This works well in forward testing. However while doing backtesting the EA does not seem to write the values in the file. Is there anyway this can be done. Or is there any way I can achieve my objective.

I name the file with the ticket number so I can easily retrieve the Stoploss for the right order.

Any help will be appreciated.
 

Are you writing /reading from the correct directory?


A group of functions for working with files.

There are three directories (with subdirectories) where working files can be placed:

  • /HISTORY/<current broker> - especially for the FileOpenHistory function;
  • /EXPERTS/FILES - common case;
  • /TESTER/FILES - especially for testing.
 
phy wrote >>

Are you writing /reading from the correct directory?


A group of functions for working with files.

There are three directories (with subdirectories) where working files can be placed:

  • /HISTORY/<current broker> - especially for the FileOpenHistory function;
  • /EXPERTS/FILES - common case;
  • /TESTER/FILES - especially for testing.

Phy,

What File functions work for which directory? Thanks.