How do you algorithmise the detection of MA feed clusters? - page 14 1...789101112131415161718 New comment Farkhat Guzairov 2020.10.16 07:03 #131 Dmitry Fedoseev:What have you encountered and what haven't you overcome? Couldn't get the file to reset, the forum suggested just deleting and reopening, ))). Farkhat Guzairov 2020.10.16 07:06 #132 Dmitry Fedoseev:What did you encounter and what didn't you overcome? Can you suggest a combination of flags to open a file so that the contents of the file are reset? Valeriy Yastremskiy 2020.10.16 07:24 #133 Farkhat Guzairov:Couldn't reset the contents of the file, the forum suggested just deleting and reopening, ))). So the file must be opened with read-write flags and the contents must be erased? If you open it with write only flags, it will erase its contents but it won't read, you will have to close it and reopen with read only flags. Apparently there is no standard function to erase the content and at the same time read is available. Writing to the file Any questions from newcomers MQL4: Sharing file between Farkhat Guzairov 2020.10.16 08:45 #134 Valeriy Yastremskiy:I.e. the file must be opened with read-write flags and the content must be erased? If you open with only write flag, the content will be erased, but reading is unavailable, you will have to close and open with read flag. Apparently there is no standard feature that would erase the contents and keep the reading available. Probably not. Aleksey Nikolayev 2020.10.16 08:56 #135 Valeriy Yastremskiy:I.e. the file should be opened with read-write flags, and at the same time the content should be erased? ShouldFileDelete() be used first and then opened for reading and writing? Valeriy Yastremskiy 2020.10.16 09:02 #136 Farkhat Guzairov:Probably not. FileClean(); ))) Valeriy Yastremskiy 2020.10.16 09:05 #137 Aleksey Nikolayev:How about FileDelete() first and then open for reading and writing? This is what I suggested. Sometimes you really want to shorten it by one line)))) Aleksey Nikolayev 2020.10.16 09:39 #138 Valeriy Yastremskiy:This is what was suggested. Sometimes you really want to shorten it by one line)))) Yes, "brevity is our brother's sister") Dmitry Fedoseev 2020.10.16 11:09 #139 Farkhat Guzairov:Can you suggest a combination of flags to open a file so that the contents of the file are reset? FILE_WRITE must be, and there must be no FILE_READ. Then the file will be cleared when opened. Dmitry Fedoseev 2020.10.16 11:10 #140 Valeriy Yastremskiy:I see what the problem is, if you write at the beginning of the file, the lines are overwritten, not shifted))) Can the lines be inserted with the lower ones shifted down? No. Unless you do a full overwrite of the file. 1...789101112131415161718 New comment
What have you encountered and what haven't you overcome?
Couldn't get the file to reset, the forum suggested just deleting and reopening, ))).
What did you encounter and what didn't you overcome?
Can you suggest a combination of flags to open a file so that the contents of the file are reset?
Couldn't reset the contents of the file, the forum suggested just deleting and reopening, ))).
So the file must be opened with read-write flags and the contents must be erased?
If you open it with write only flags, it will erase its contents but it won't read, you will have to close it and reopen with read only flags.
Apparently there is no standard function to erase the content and at the same time read is available.
I.e. the file must be opened with read-write flags and the content must be erased?
If you open with only write flag, the content will be erased, but reading is unavailable, you will have to close and open with read flag.
Apparently there is no standard feature that would erase the contents and keep the reading available.
Probably not.
I.e. the file should be opened with read-write flags, and at the same time the content should be erased?
ShouldFileDelete() be used first and then opened for reading and writing?
Probably not.
FileClean(); )))
How about FileDelete() first and then open for reading and writing?
This is what I suggested. Sometimes you really want to shorten it by one line))))
This is what was suggested. Sometimes you really want to shorten it by one line))))
Yes, "brevity is our brother's sister")
Can you suggest a combination of flags to open a file so that the contents of the file are reset?
FILE_WRITE must be, and there must be no FILE_READ. Then the file will be cleared when opened.
I see what the problem is, if you write at the beginning of the file, the lines are overwritten, not shifted)))
Can the lines be inserted with the lower ones shifted down?
No. Unless you do a full overwrite of the file.