Errors, bugs, questions - page 618

 
Doozer2:

No, it's a simple text file with one line inside, not opened anywhere else.

I just want to read one line from the file as an example. But it doesn't work!

What's interesting, if I set theFILE_READ flag, the error is 5004,

and if FILE_READ|FILE_WRITE, the file opens without errors (but still no line can be read from it).

I don't understand anything...

Here's the whole code:

Try adding the FILE_COMMON flag when opening the file. It should be like this:

int hFile=FileOpen(SymbolsFileName,FILE_TXT|FILE_ANSI|FILE_READ|FILE_COMMON);

 
ALozovoy:

Try adding the FILE_COMMON flag when opening a file. It should be like this:


Yes, man, it worked!!!! Thanks!

But what does FILE_COMMON have to do with it? After all, FileIsExist has confirmed that the file exists.

 
Doozer2:

Yeah, man, it's working!!!! Thanks!

But what doesFILE_COMMON have to do with it? Because FileIsExist confirmed that the file exists.

Because reboot thernal

There is probably an unclosed handle hanging around.

 
Doozer2:

Yeah, man, it's working!!!! Thanks!

But what does FILE_COMMON have to do with it? Because FileIsExist confirmed that the file exists.

FileIsExist You checked if the file exists in the common folder of all client terminals, and tried to open it from a local folder.

Look at theFileOpen function.

 
Help me understand. I've started to learn OOP. Sketched out a simple class. When I run it in the tester in visualization mode, it generates a bunch of errors and stops. What have I done wrong. I attach the files.
Files:
 
Trying iAC and iAO indicators with timeframe MN1. When copied to the buffer it shows an error. Why does it not work? What is the reason? Works fine with smaller timeframes.
Files:
testMN1.mq5  5 kb
20120107.log  8 kb
 
VNVNV:
Trying iAC and iAO indicators with timeframe MN1. When copied to the buffer it shows an error. Why does it not work? What is the reason? Works fine with smaller timeframes.

First, set the size of buffer[] array

   ArraySetAsSeries(mrate,true);
   ArrayResize(buffer,3); // зададм размер массиву 
   ArraySetAsSeries(buffer,true);
 
ALozovoy:

Look at theFileOpen function.

Why is there a ban on opening *.reg files ?

gives out 5002

 
sergey1294:

start by setting the size of the buffer[] array

The error still occurs. Why do you need this line? It works fine for smaller timeseries.
 
Now for MT4 409 bild I am writing a function for accounting the minimum stop level. For a buy order the tester considers the minimum values from Bid to be correct, and for a buy limit order the tester considers the minimum values from Ask to be correct. Logically, operations occur - similar buy. Question - is this the intention, or do we need to write to the BOD?
Reason: