Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 477
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
Checked myself - everything compiles in mql4.
You made a mistake somewhere else.
This is not my code, it's Vasily Sokolov's class. Two people have complained to me that it doesn't compile under MT4. I got an error too, build 1090. Could you please check this class on MT4 compilation? It looks like some kind of nonsense. Thanks in advance.
https://www.mql5.com/ru/articles/1334#summary - the class itself is at the bottom of the article.
This is not my code, it's Vasiliy Sokolov's class. I've had two people complain that it doesn't compile under MT4. I got an error too, build 1090. Could you please check this class on MT4 compilation? It looks like some kind of nonsense. Thanks in advance.
https://www.mql5.com/ru/articles/1334#summary - the class itself is at the bottom of the article
Compiled by
Show me how you tested it.
Show me how you tested it.
Show me how you tested it.
This class
That's the class.
Well, well, well. I've found another bug. I once had the MT4 terminal for development incompletely updated. The terminal version is 1090 and the editor version is 1562. On other terminals union compiles normally, editor's version is 1601! It must be because the editor was already open at the time of the update, so the old version was left. Man, I spent half a day on this garbage.
Anyway, everything compiles fine under editor 1601.
Skip FileSeek- search for the end of the file and after FileOpen it is written to the beginning every time
Alexey Volchanskiy:
Well, well, well. I've found another bug. I had my MT4 development terminal incompletely updated at the time. The version of the terminal is 1090 and the editor is 1562. On other terminals union compiles normally, editor's version is 1601! It must be because the editor was already open at the time of the update, so the old version was left. Man, I spent half a day on this garbage.
Anyway, everything compiles fine under editor 1601.
Well, good for you ;)
you missed FileSeek() - search for the end of the file and after FileOpen it is written to the beginning every time
There isFileSeek(File,0,SEEK_END); and everything is written to the file from a new line.
The problem is that there are 4 files and you need to write data on four positions, each in a separate file, each file has a position ticket in the name, but data are written only to one, the last file, data on the last position.