[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 223

 
sergeev:

Well, look elsewhere.
I already did.
 
orb:
already looked at it.

Congratulations.
 
orb:
Comrades I can't understand why CSV files are not created, everything worked before.

No entries in file, and generic errors.
Errors, MetaTrader 5 MQL, Closed, Started: 2012.01.16 10:50, #313612

Terminal version and bit mode

MT4 409

Problem description

When attempting to write into a text file with FILE_READ|FILE_WRITE key without explicitly setting the file pointer using FileSeek() function, the writing does not occur at all. No error is generated.

Sequence of actions

...

Result ...

...

Expected result ...

...

More info

In previous versions of the terminal, when reading a text file using FileReadString() fuction, it was automatically set a file pointer.

Support Team 2012.01.16 12:15

The last change in the file functionality is from the middle of 2008.

Never before has it been possible to append to a file without first setting a file pointer to the end.

Again a question about the extra information. Does this have anything to do with appending to the end of a file?

Any file read-write operations automatically move the file pointer around. This has always been the case and hasn't changed. However, if the file is opened as a csv, intermediate data buffering is possible. Then the file pointer may not be where you expect it to be. Again, this has always been the case, both in the previous version and in the pre-release, since the beginning of the official release.

We have reiterated many times that the default principle is extremely detrimental. Including for file pointers. Handle file pointers explicitly unless you're using continuous read or continuous write (especially the exotic case of mixed read-write)

And the files by the way are not created either.
 
FAQ:



It has FileSeek in both cases
 

Hello, could you please tell me if anyone knows how to write this condition in the code?

(level is defined as a moving average)

1) The EA opens 2) Checks if there is a "working" order:

A) there is one and when the price reaches a certain level, you have to close it and open a reverse order.

B) if there is no order and when the price reaches a certain level, you should close it and open a reverse order.

Thanks in advance for your time...!

 
okvseok:

Hello, could you please tell me if anyone knows how to write this condition in the code?

(level is defined as a moving average)

1) The EA opens 2) Checks if there is a "working" order:

A) there is one and when the price reaches a certain level, it is necessary to close it and open a reverse order.

B) if there is no order and when the price reaches a certain level, you should close it and open a reverse order.

Thank you in advance for your time!

https://book.mql4.com/ru/samples/expert
 
sergeev:

It has FileSeek in both cases

Only files with FILE_READ | FILE_WRITE key will not be created.
 

Huge problem.

I download MetaTrader4 web version installer (<0.5Mb) from any broker.

Installation goes fine. When I try to enter the program, it starts and immediately exits.

What is the problem and how to solve it?

 
Rutra:

Huge problem.

I download MetaTrader4 web version installer (<0.5Mb) from any broker.

Installation goes fine. When I try to enter the program, it starts and immediately exits.

What is the problem and how do I fix it?


Read from here :https://www.mql5.com/ru/forum/139759/page6#641857

And this topic too : https://www.mql5.com/ru/forum/140182

 
orb:
Comrades, I can't understand why CSV files are not being created, it all worked before.
For some reason they are being created. Just something to think about --> https://www.mql5.com/ru/forum/137718
Reason: