Questions from a "dummy" - page 115

 

This is a question for the participants:

when I run the mt5setup(410KB) web installer, it starts downloading the distribution itself(7MB), where on my computer does this distribution fit? I'm not talking about the directory with:\Program Files\MT5.
 
IlshatG:
I am not a programmer by training, please tell me what |= operator means and what is the form of number recording - 0x10 0x20 ? Thanks in advance.
uint first=0x20;   // число в шестнадцатиричном представлении
uint second=16;    // число в десятичном представлении
//---
first|=second;     // производится операция "побитового ИЛИ" и результат помещается в first
 
first|=second

is an abbreviated notation of the expression

first=first|second
Assignment operations
 

issue with writing to a file. I do this (based on example from help for FileOpen()):

string terminal_data_path=TerminalInfoString(TERMINAL_COMMONDATA_PATH);
   string subfolder="";
   int filehandle=FileOpen("datta.txt",FILE_WRITE|FILE_READ|FILE_CSV);
   if(filehandle!=INVALID_HANDLE)
   {
      FileSeek(filehandle, 0, SEEK_END);
      FileWrite(filehandle, "Параметры прогона:");
      FileWrite(filehandle, IntegerToString(N) + "\t" + IntegerToString(TP) + "\t" + IntegerToString(SL) + "\t" + IntegerToString(K) + "\t" + IntegerToString(BU));
      FileWrite(filehandle, IntegerToString(TP_count) + "\t" + IntegerToString(SL_count) + "\t" + IntegerToString(BU_count));
      FileClose(filehandle);
      Print("Файл должен быть создан в папке "+terminal_data_path+"\\"+subfolder);
   }
   else Print("File open failed, error ",GetLastError());


The result is an entry in the tester:

File must be created in C:\ProgramData\MetaQuotes\Terminal\Common\.

Фактически файл находится в C:\Users\Владимир\AppData\Roaming\MetaQuotes\Tester\5E85412506E8F1E33F561B4D4F8D4015\Agent-127.0.0.1-3000\MQL5\Files

and is overwritten instead of overwritten. But not always.

(Windows Vista Home Premium)

 
ilunga:

a question about writing to a file. Doing this:

Forgot to add FILE_COMMON flag.
 
Renat:
You forgot to add FILE_COMMON flag.

Thank you, with it now:

the file must be created in C:\ProgramData\MetaQuotes\Terminal\Common\.

the file is in: C:\ProgramData\MetaQuotes\Terminal\Common\Files\.

No overwrite.


This is fine for the current tasks

 
Help!!! I know that the dll "hangs" in memory as long as there are processes that loaded it. Question: Is there any "tricks" and directives which can leave dll in memory even without any processes using this dll? And unloading the dll would be on the shoulders of the OS.
 
uncleVic:


mql5:

is an abbreviated notation of the expression

Assignment operations
Thank you!
 

I have W7 64 but the terminal 32 works.

1. should this be the case?

2. What are the problems with the 32 bit version of the terminal running on a 64 bit operating system?

 

The indicator is built on the type of lines DRAW_ZIGZAG, how to determine the start and end buffer by which the segment is built on the bar, ie, the direction of the segment, maybe there is an algorithm?