Errors, bugs, questions - page 701

 
Fia:

...

Save files in the terminal's shared folder. To do this, set the FILE_COMMON flag.

//---

For Windows 7 the path is as follows:

C:\ProgramData\MetaQuotes\Terminal\Common\Files\.

//---

For Windows XP I think it's already written that the path is: C:ProgrammaData\MetaQuotes\Terminal\Common\Files:

C:\Documents and Settings\All Users\Application Data\MetaQuotes\Terminal\Common\Files\

 
tol64:
Save the files in the terminal's shared folder. To do this, put the FILE_COMMON flag.

Thanks it works and doesn't seem to delete the file after compiling and testing!

Yes, in win 7 64bit the path to the shared folder is slightly different "C:\ProgramData\MetaQuotes\Terminal\Common\Files" than shown in the help.

(Thank you again, saw your addition after unscrewing the path myself))


But still a question open, is that what I wrote above a bug or is it designed that way?

I should not make people step on the same rake (mysticism) as I have, otherwise it would not be good.

 
Fia:

Gentlemen Developers, please draw your attention to the following problem (and fix it)

We have design

  int filehandle=FileOpen("_My\\Sym.txt",FILE_READ|FILE_TXT|FILE_ANSI);

When testing the program from the help:

At first time the file is read and visible, but as soon as you recompile the application, the file from the testing directory is erased together with the subfolder, just before testing starts!

If that's the way it's meant to be, why?

You run a third-party test (essentially any new location, including the cloud), where no previously saved file can exist by definition. The tester uses its own cleanable /Files repository, different from the working copy of the terminal's /Files directory.

If you want your Expert Advisor to always have the files you need, you may use the following methods:

  1. delivering permanent files via their description in the Expert Advisor via #property tester_file "_My\\sym.txt" (will work everywhere)
  2. work with a shared storage through FILE_COMMON (will work only in local tests)
 

Please note application #163680 in the service-desk.

 

This seems to be a bug. In the tester it returns a value of 1, it should be 0.

int OnInit()
  {
   return(0);
  }
//=========================================================================
void OnDeinit(const int reason)
  {
  }
//============================================================================
void OnTick()
  {
      HistorySelect(0,TimeCurrent());
      int total=HistoryDealsTotal();
      Print("Всего сделок в истории=  ",total);
  }
 

I create a number of profiles with charts of several TFs of the same currency pair, I assign to the profile the name of this currency pair. After terminal reloading the content of profiles is "shuffling", i.e. opening a profile named EURUSD, EURCHF pairs are opened in terminal windows and profiles are renamed or their folders content is changed, not all of them, but selectively.

Could it be due to the name of the profile matching the name of the pair?

Why, when I change the position of the trend line, the midpoint disappears?

Why has the time column disappeared in the Market Watch, how can I bring it up?

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов - Документация по MQL5
 
ivandurak:

This seems to be a bug. In the tester it returns a value of 1, it should be 0.


The deposit transaction is also counted as a transaction and runs as 0. Check it.
 

When you open a demo account, it falls into the wrong group.


 
How do I save the last value of a variable when switching between timeframes? The deinitialisation/initialisation process happens and everything is reset... but I need it to be saved.
 
x100intraday:
How to save the last variable value when switching between timeframes? The deinitialization-initialization process takes place, everything is reset... and I need it to be saved.

Willthe global terminal variables work?

2. Dump to a file, then read it.