Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 860

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Where the mistake is, I don't know.
Ope.
Something is wrong in the while(O==3) loop
Something is wrong in the while(O==3) loop
Hello, I have this problem, I can't open the file. Tried different file extensions, no use, just gives out: error 5004. File is in file sandbox. It's the handle, but I have no idea why. Here's the code:
Have you tried specifying that the file is in a shared folder
File open flags
The values of the flags that define how the file will be handled. Flags are defined as follows:
Identifier
Value
Description
FILE_READ
1
File is opened for reading. This flag is used when opening a file (FileOpen()). FILE_WRITE and/or FILE_READ must be set when a file is opened.
FILE_WRITE
2
File is opened for writing. This flag is used to open a file (FileOpen()). When a file is opened, the FILE_WRITE and/or FILE_READ flags must be set.
FILE_BIN
4
Binary read-write mode (no conversion from or to string). This flag is used to open files (FileOpen())
FILE_CSV
8
File of csv type (all items written are converted to a string of the appropriate type, unicode or ansi, and separated by a separator). This flag is used when opening a file (FileOpen())
FILE_TXT
16
Simple text file (same as csv, but without separator). This flag is used when files are opened (FileOpen())
FILE_ANSI
32
ANSI strings (single-byte characters). This flag is used when opening files (FileOpen())
FILE_UNICODE
64
UNICODE strings (two-byte characters). This flag is used when opening files (FileOpen())
FILE_SHARE_READ
128
Shared read access by multiple programs. This flag is used when opening a file (FileOpen()), but does not substitute the need for FILE_WRITE and/or FILE_READ when opening a file.
FILE_SHARE_WRITE
256
This flag is used for write access sharing by multiple programs. This flag is used to open files (FileOpen()), but does not substitute FILE_WRITE and/or FILE_READ when opening a file.
FILE_REWRITE
512
File can be overwritten by FileCopy() and FileMove(). The file must exist or be writable. Otherwise, file will not be opened
FILE_COMMON
4096
Location of file in shared folder of all client terminals\Terminal\Common\Files . This flag is used when opening files (FileOpen()), copying files (FileCopy(), FileMove()) and checking for the existence of files (FileIsExist())
One or more flags can be specified when opening a file, this combination is called a combination of flags. The combination of flags is written using the logical OR (|) operation sign that is placed between the flags being enumerated. For example, to open a CSV file for reading and writing at the same time, you can specify the combination FILE_READ|FILE_WRITE|FILE_CSV.
Have you tried specifying that the file is in a shared folder
File open flags
The values of the flags that define how the file will be opened. Flags are defined as follows:
Identifier
Value
Description
FILE_READ
1
File is opened for reading. This flag is used when opening a file (FileOpen()). FILE_WRITE and/or FILE_READ must be set when the file is opened.
FILE_WRITE
2
File is opened for writing. This flag is used when opening a file (FileOpen()). The FILE_WRITE flag must be set and/or the FILE_READ flag must be set when a file is opened.
FILE_BIN
4
Binary read-write mode (unconverted to and from string). This flag is used to open files (FileOpen())
FILE_CSV
8
csv file (all written elements are converted to a string of the appropriate type, unicode or ansi, and separated by a delimiter). This flag is used when opening files (FileOpen())
FILE_TXT
16
Simple text file (same type, but delimiter is ignored). This flag is used when opening a file (FileOpen())
FILE_ANSI
32
String of ANSI type (single-byte characters). This flag is used when opening files (FileOpen())
FILE_UNICODE
64
UNICODE strings (two-byte characters). This flag is used when opening files (FileOpen())
FILE_SHARE_READ
128
Shared read access between multiple programs. This flag is used when opening a file (FileOpen()), but does not substitute for specifying FILE_WRITE and/or FILE_READ when opening a file.
FILE_SHARE_WRITE
256
This flag is for write access shared by multiple programs. This flag is used to open files (FileOpen()), but does not substitute for the need to specify FILE_WRITE and/or FILE_READ flags when opening a file.
FILE_REWRITE
512
FileCopy() and FileMove() can be used to overwrite a file. The file must exist or be writable. Otherwise, file will not be opened
FILE_COMMON
4096
Location of file in shared folder of all client terminals \Terminal\Common\Files . This flag is used when opening files (FileOpen()), copying files (FileCopy(), FileMove()), and checking for the existence of files (FileIsExist())
When opening a file, one or more flags can be specified, this combination is called a combination of flags. A combination of flags is recorded using the logical OR sign (|) placed between the listed flags. For example, to open a CSV file for reading and writing at the same time, you can specify the combinationFILE_READ|FILE_WRITE|FILE_CSV.
And now in case of an error the function returns 0 instead of -1.
Sketched a simple Trailing Stop. bez_Level - Trailing start level in pips. TrallStep - trailing step. Magic - number of Magic.
The problem is that, if several orders are opened by the Expert Advisor, only the first order is trilled. And, when the first order is closed, the second one starts trilling. I do not get any error messages. I cannot try to find out what I have done wrong. Thank you...
int lim=OrdersTotal()-1;
Guys, what's the trick? Why isn't it coming out of Inita?
Guys, what's the trick? Why isn't it coming out of Inita?