Download MetaTrader 5
To add comments, please log in or register
Do you want to order an application? Find out how to obtain the desired result
TheLobos
70
TheLobos 2016.05.27 08:58 

I have an issue with an EA which seems to hang after a few passes during backtesting with optimization. Trying to figure out what's going on, I am using the following code: 

void subFileWriteFlush (string sFilename, string str)
{
   int iHandle = FileOpen (sFilename, FILE_READ|FILE_WRITE|FILE_CSV, "/t");
   FileSeek  (iHandle, 0, SEEK_END);
   FileWrite (iHandle," Time " + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS) + ": " + str);
   FileClose (iHandle);
}

 

and  then placing calls to this at various places in my code. 

The code compiles cleanly, but I can't see any output in any of my MT4 folders.

Questions

1) Does anybody know of any issues using such code to trace?

2) Does anybody have any better ideas on how to trace an EA in backtesting with optimization mode?

Thank you for any ideas. 

whroeder1
13593
whroeder1 2016.05.27 09:20  
TheLobos: but I can't see any output in any of my MT4 folders.
  1. Where are you looking? Data folder -> tester -> files not Data folder -> MQL4 -> files.
  2. Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 17.02.2014
TheLobos
70
TheLobos 2016.05.27 09:27  
WHRoeder:
  1. Where are you looking? Data folder -> tester -> files not Data folder -> MQL4 -> files.
  2. Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 17.02.2014

That's it ... I was looking in the wrong place. Everything is under /tester/files ...

Thank you once again. 

/
To add comments, please log in or register