voidOnDeinit(constint reason)
{
Comment("");
string folder=(SubFolder+"\\experts\\files\\");
string file_name=(Symbol()+".csv"); // variable for storing file namesstring filter=".csv"; // filter for searching the files//--- receive the search handle in the local folder's rootlong search_handle=FileFindFirst(filter,folder);
//--- check if FileFindFirst() executed successfullyif(search_handle!=INVALID_HANDLE)
{
//--- searching files in the loopdo
{
//--- reset the error valueResetLastError();
//--- receive the file creation datePrintFormat(Symbol()+".csv"+" file deleted!",file_name);
//--- delete the old fileFileDelete(file_name);
}
while(FileFindNext(search_handle,folder));
//--- close the search handleFileFindClose(search_handle);
}
else
{
Print(Symbol()+".csv"+" File not found!");
return;
}
//--- check what files have remainedPrintFormat("Results:");
}
It may be desirable to add this fact in the manual of this function. The Expert Advisor doesn't start well with my method of startup (although it's not really needed).
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
This isn't working out for me.
Thank you for your reply. A word or two about ON_EXTERNAL_EVENT - in what situations should it be used?
It's not working for me.
Will create the next tree:
C:\Users\User\AppData\Roaming\MetaQuotes\Terminal\**********MQL5\Files\experts\files\1.txtand if you useFILE_COMMON
then the file will be created in:C:\ProgramData\MetaQuotes\Terminal\Common\Files\experts\files\1.txtThis is the base path:ie.
will create the next tree:
and if you useFILE_COMMON
then the file will be created in:Thank you, I have a file created:
input string SubFolder = "TransMission";How do I look for it there?
Thank you, I have a file created:
How do I look for it there?
So you have it:
C:\Users\***\AppData\Roaming\MetaQuotes\Terminal\**********\MQL5\Files\TransMission\experts\files\***.txtOr did I misunderstand the question?
If you open it with a second EA, you specify exactly the same path.
In the strategy tester(visualisation mode), should IndicatorRelease work?
No, it should not.
So you have it:
Or have I misunderstood the question?
If you open with a second EA, you specify exactly the same path.
Then what are the problems