I then tried to replicate the bookmarks loss with a shutdown , compile and shutdown when done without closing the editor , but they were not lost.
Perhaps the operating system managed to close the editor normally during shutdown
Bookmarks, breakpoints, cursor position, etc. are stored with the source file as NTFS data streams.
So, when those streams are cleared due to some indirect method, then the information is lost, for example when an external text editor that does not understand or not respect NTFS data streams, or something else that clears them.
Forum on trading, automated trading systems and testing trading strategies
Are there plans for expand/collapse of functions/structs/classes ?
Fernando Carreiro, 2023.02.03 14:07
They are kept on the source file itself as an NTFS data stream.
streams v1.60 - Reveal NTFS alternate streams. Sysinternals - www.sysinternals.com source_file.mq5: :CursorPos:$DATA 444 :LineFlags:$DATA 448
Perhaps the operating system managed to close the editor normally during shutdown
But the shutdown was normal on both cases . When i heard the notification i hit ctlr+S and then start->shutdown as fast as i could .
Bookmarks, breakpoints, cursor position, etc. are stored with the source file as NTFS data streams.
So, when those streams are cleared due to some indirect method, then the information is lost, for example when an external text editor that does not understand or not respect NTFS data streams, or something else that clears them.
nothing else opened the file though
Unfortunately, MetaTrader applications have a nasty habit of not saving files properly when a shutdown event prompts them to close.
A manual closing of the applications is required and waiting a bit for the file cache to be flushed, otherwise they sometimes don't save properly.
A properly sized UPS should give up to 15min to let you do things calmly, so don't be in such a hurry. Haste makes waste!
EDIT: On two separate occasions, MetaEditor even filled my active source file with empty white space (during a shutdown), and had to go to my backups to restore the file.
So I developed two habits:
- Press 'ctlr+S' - so as not to lose the source code
- Restart the editor to avoid losing its "state". For example, a list of open files (in the editor), bookmarks, and the like
Ohhh. So in the second test i hit compile not just save ...hmmm .
So I developed two habits:
- Press 'ctlr+S' - so as not to lose the source code
- Restart the editor to avoid losing its "state". For example, a list of open files (in the editor), bookmarks, and the like
I do it too , every change i hit ctrl+s . Sometimes i hit ctrl+s here (while writing a post) out of habit as well 😄
Unfortunately, MetaTrader applications have a nasty habit of not saving files properly when a shutdown event prompts them to close.
A manual closing of the applications is required and waiting a bit for the file cache to be flushed, otherwise they sometimes don't save properly.
A properly sized UPS should give up to 15min to let you do things calmly, so don't be in such a hurry. Haste makes waste!
EDIT: On two separate occasions, MetaEditor even filled my active source file with empty white space (during a shutdown), and had to go to my backups to restore the file.
Okay so the process is :
- hit compile
- close the editor
- close the mt
- one missisipi two missisipi three missisipi , shutdown
The time depends on the wattage of the pc as well , the more powerful the pc the less time the ups will give you .
A "properly sized UPS" gives 15min (or more). You should select a UPS size based on your computer's power consumption, including any peripherals connected to it (monitors, external hard drives, etc.).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm not sure exactly when it happens but sometimes i open the editor up and a files bookmarks have been erased.
In this case there was a power outage but the pc is on a line interactive ups so it gave me time to save and shutdown , but, on the next start of the editor the bookmarks were gone in the code.
I then tried to replicate the bookmarks loss with a shutdown , compile and shutdown when done without closing the editor , but they were not lost.
What is the proper sequence , (for future outages) , so that they don't get erased .
Thanks