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
lazarev-d-m:
Yedelkin:
sergeev: does the file have lines?
FILE_LINE_END
Get end ofline indication
I more or less figured it out, the terminal sees csv file not as a table, but as a usual file where all the variables are lined up and separated by a delimiter, and to orientate in it as in a table, I wrote a little sample script to work with csv as with a table, however strange it may sound, today / tomorrow I will throw in CodeBase, I think many will be interesting
FILE_LINE_END
Get end ofline indicator
I'm not telling you anything. You're already smart.
and you understand that the file has control characters in its line mapping. so that some viewers of its contents will show it according to generally accepted rules.
I have more or less figured it out, the terminal does not see the csv file as a table, but as a normal file where all variables are lined up and separated by a separator
lazarev-d-m:
you have to come up with a mechanism to search for strings,
does the file have lines? how do you mark a new line? (hinting at a special symbol :)
Imagine the file is a one-dimensional array of characters.
how do you find a "new line" in the array?
FILE_LINE_END
Get end of line character
:) Let's assume that the answers to the questions "What is a new line in the file? You got it. You're not supposed to get an answer.
it's all about the concepts used and the perception of those concepts.
What is a"new line" in the file? This is what I am trying to find out from lazarev-d-m. If I wait for an answer, I will correct and explain the concept correctly, if necessary. And then I will direct to the solution of the problem.
And while I do not know what lazarev-d-m imagines when he asks about a "newline". And I can not give an answer how to find it. He knows FileSeek and FileIsLineEnding and FileRead. But does not seem to know what they are for.
It is clear that in his case you can find some character only by searching. But whether he understands that the new string is just a character - I do not know.
The point isthat this forum is a forum for the MQL5 community. And MQL5 implies such a notion as "end of line sign in a file":
FILE_LINE_END.
Getting the end-of-line flags
Therefore, Mr. Lazarev's question is absolutely correct. It is absolutely correct within the MQL5 community.
The point isthat this forum is a forum for the MQL5 community. And MQL5 language implies such a notion as "end of line sign in a file":
Question - tell me which numbers divide by two?
The answer is all.
Moral - do not confuse the end and what you need lazarev-d-m
Question - can you tell me which numbers are divisible by two?
The answer is all.
Moral - do not confuse the end and what you need lazarev-d-m
I understand that there are ways to identify a single line, but no separate command to access it, you need to recalculate the number of characters in line separators, to get to the right string (if you know the "number" of lines).
Or my variant to scan file line by line, which is also a hell of a lot of handy, especially with large files, where there may be hundreds of lines, and if suddenly come across this in the tester, then generally awful.
Here's how I did it, it's not working properly, I'll fix it when I'm free
Now it always returns column1=Code, while it should return the number of the line, which matches the hour with the current time, I think it is clear from the code