Errors, bugs, questions - page 947

 
fyords:

Then what are the problems

Writes:

2013.03.25 16:23:25 TransMission (EURUSD,M1) EURUSD.csv File not found!

  string file_name=(Symbol()+".csv");     // variable for storing file names
  string filter=".csv"; // filter for searching the files
//--- receive the search handle in the local folder's root
  long search_handle=FileFindFirst(filter,file_name);
//--- check if FileFindFirst() executed successfully
  if(search_handle!=INVALID_HANDLE)
  {
//--- searching files in the loop
    do
    {
//--- reset the error value
      ResetLastError();
//--- receive the file creation date
      PrintFormat(Symbol()+".csv"+" file deleted!",file_name);
//--- delete the old file
      FileDelete(SubFolder+"\\experts\\files\\"+Symbol()+".csv");
    }
    while(FileFindNext(search_handle,file_name));
//--- close the search handle
    FileFindClose(search_handle);
  }
  else
  {
    Print(Symbol()+".csv"+" File not found!");
    return;
  }
//--- check what files have remained
  PrintFormat("Results:");


 
G001:

Writes:

2013.03.25 16:23:25 TransMission (EURUSD,M1) EURUSD.csv File not found!

I guess I have to close the file first, and then delete it.

string SubFolder = "TransMission";
int file_handle;
//+------------------------------------------------------------------+
int OnInit()
  {
   file_handle=FileOpen(SubFolder+"\\experts\\files\\"+Symbol()+".csv",FILE_WRITE);
   Print("File create: ",(bool)FileIsExist(SubFolder+"\\experts\\files\\"+Symbol()+".csv"));
   return(0);
  }
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   FileClose(file_handle);
   Print("File delete: ",(bool)FileDelete(SubFolder+"\\experts\\files\\"+Symbol()+".csv"));
  }
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+
 
fyords:
Apparently you have to close the file first and then delete it.
Thank you so much!!! It's all worked out.
 
Dear Gentlemen. Please synchronise your server time with the real physical time, it is now running ahead. The gap is growing.
 
Arkadiy:
Dear Sirs. Please synchronise your server time with the real physical one,

ahem... actually gentlemen also have a real physical one :)

maybe your computer needs to be synchronized?

 
sergeev:

ahem... actually gentlemen have a real physical one too :)

maybe your computer needs to be synchronised?

Before I wrote - I synced it to make sure of the time difference. Yesterday then the difference was > 10 seconds (now it's about 3 seconds). For minutes, 10 seconds is significant, from my own experience.
 
Can I make it so that when I run an EA on an empty chart, the indicators it uses are also called along with it? This is not a strategy tester, but an ordinary chart with a real account.
 
lazarev-d-m:
Can I make it so that when I run an EA on an empty chart, the indicators it uses are also called along with it? We are not talking about the strategy tester, but about a normal chart with a real account.
Yes, of course you can. Use the ChartIndicatorAdd() function.
 
tol64:
Yes, of course you can. Use the ChartIndicatorAdd() function.
Thank you, that makes life easier.
 

Afternoon

Can I run only 4 MT5 terminals on my computer at the same time?

... It looks like there is not enough RAM on the PSP...

Reason: