Shared read access by multiple programs. This flag is used when opening files (FileOpen()), but does not replace the need to specify FILE_WRITE and/or FILE_READ when opening a file
It does not. And in general, it's better not to open and close the file on every tick
It allows shared reads, not shared reads
Thank you. It's working! I feel sorry for the compukter to close the file every tick, so I put closing the file in OnDeinit.
Вещественные типы (или типы с плавающей точкой) представляют значения, имеющие дробную часть. В языке MQL5 есть два типа для чисел с плавающей точкой. Способ представления вещественных чисел в машинной памяти определен стандартом IEEE 754 и не зависит от платформ, операционных систем и языков программирования. Константы с плавающей точкой...
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.
FILE_SHARE_READ
128
Shared read access by multiple programs. This flag is used when opening files (FileOpen()), but does not replace the need to specify FILE_WRITE and/or FILE_READ when opening a file
It does not. And in general, it's better not to open and close the file on every tick
It allows shared reads, not shared readsHow do I replace the Sleep(500) function in the indicator?
If you really need it, make your own pause that counts processor tick times in milliseconds. It will pause, but the whole thread will be waiting.
Why declare variable "time" if it is not used in "FileWrite"? If you don't declare it: the compiler will swear, but what is the point?
THIS WHAT?????
Maybe remove that line altogether and see?
THIS IS WHAT?????
Maybe remove that line altogether and see?
It says so in the Help: https://www.mql5.com/ru/docs/dateandtime/timelocal
Call without parameters
datetimeTimeLocal();
This is what it says in the Help file: https://www.mql5.com/ru/docs/dateandtime/timelocal
Called without parameters
datetimeTimeLocal();
FileOpen
The function opens a file with specified name and specified flags.
intFileOpen(
stringfile_name,//file name
intopen_flags,// combination of flags
shortdelimiter='\t',// delimiter
uintcodepage=CP_ACP//codepage
);
And this is how fileopen is written. This is not an example of how to write it in a program, but an indication of the type of the return value.
It makes sense to assign the time variable to the local computer time in oninit and this will be the start time of the EA)))The result prints -0.1299999999999999. Why?
Features of storing real numbers in computer memory.
Use DoubleToString() to output with the desired accuracy
In general, you should learn the basics, and then try to write programs.