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

 
solnce600:


http://clip2net.com/s/68GgQ9 two-dimensional surface

http://clip2net.com/s/68Glq8 Optimisation graph as a line


I only saw such charts for MT4 about five years ago in pictures. I have never encountered them in real life. They were always dots. I just shrugged my shoulders and forgot the hell about them...
 
artmedia70:
I only saw such charts for MT4 about five years ago in pictures. I have never encountered them in real life. They were always dots. I just shrugged my shoulders and forgot the hell about them...

Ok. Thanks for the information.
 
mzk_3om6u:


File attached in the post, all errors = 0, i.e. no errors, the whole problem is in the implementation of the logic

That's how it works. Checked.

#include <stdlib.mqh>

void start()
 {
  string sTextWrite = "TEST_1234567890987654321_TEST";
  string sTextRead = "";
  int    hFile = FileOpen("zulu2.txt", FILE_BIN|FILE_READ|FILE_WRITE);
  
  if (hFile < 1) Print("Ошибка открытия файла: \"", ErrorDescription(GetLastError()), "\"");
  if (FileWriteString(hFile, sTextWrite, StringLen(sTextWrite)) < 0) Print("Ошибка записи в файл: \"", ErrorDescription(GetLastError()), "\"");
  if (!FileSeek(hFile, 0, SEEK_SET)) Print("Ошибка перемещения файлового указателя: \"", ErrorDescription(GetLastError()), "\"");
  sTextRead = FileReadString(hFile, StringLen(sTextWrite));
  FileClose(hFile);
  Alert(sTextRead);
 }
 
mzk_3om6u:


File attached in the post, all errors = 0, i.e. no errors, the whole problem is in the implementation of the logic.

And why do you read from the file? You have the whole file in the ReadCBOE variable, you should use it,
 
Zhunko:

That's how it works. Checked it out.


 
We should rename the thread "any newbie answers".
 
mzk_3om6u:

Could you please tell me how to work with .txt files in MQL4?

The task is to find the required line in .txt file and pull it out. The closest function is FileReadString(), but it returns only the first line. The FileSeek() function also moves the value to the first line.

Please advise, maybe there is a third party .dll which solves problems with arbitrary .txt files. May be there is a solution in kernel32.dll , but I haven't found it. Help please :)

p.s. now to get the data, I use the original string, but the string has a size limitation, so in some situations this trick cannot be used :(


Read the article. Basically there is no way in nature to read a given line of a file, you have to read all lines up to a given line... There is a function in the article for reading a text file line by line.
 
Integer:

Read the article. In principle, there is no way in nature to read a given line of the file, you have to read all the lines up to the given line... there's a function in the article for reading a text file line by line.

It was about a particular code that didn't work. From here on, let him do it himself.

There is such a way in nature. Not everyone can figure it out.

 
Zhunko:

It was about a particular code that didn't work. From here on, let him do it himself.

There is such a way in nature. Not everyone can figure it out.


Come on... come on... You should have read first what the man was asking about.... You're the only one who's so clever, no one exists for anyone, no one has figured it out, you're the only hero who's figured it out.

And this particular code... but you're the only one who can't see it.

 
You're a hero, Junko, silently fixing the code and... It's like that's what happened. You're gonna tell me that's what happened, and I'm just bullshitting you? Yes?