After update my signal and Expert is gone

 

Hi Guys,

 

This is not the first time this happens. I created my own singal file in the C:\Program Files\MetaTrader 5\MQL5\Include\Expert\Signal directory. After this morings update it is gone...and the Expert in the C:\Program Files\MetaTrader 5\MQL5\Experts\Advisors directory.

 

My own directories I created with other stuff is still ther: C:\Program Files\MetaTrader 5\MQL5\OwnStuff

 

Why does this happen :( ??

 I'm forced to load source control for this.... 

 
LiveUpate automatically always replaces all code samples which go in standard installation pack. So it is not recommended to make a MQL5 program with already existed name and store them in standard folders.
 

Hi Rosh,

 

Thanks for your reply. Here is my response below:

"LiveUpate automatically always replaces all code samples which go in standard installation pack..."
I think you mis understand me. I created my own files. I tried to adhere to the standard OO concepts MT5 set. Even by storing my files in the same locations. I used diffrent names from the examples....

"So it is not recommended to make a MQL5 program with already existed name and store them in standard folders"

nope, it was diffrent name called HeartBeatIndicator. It seem the folder was removed...

 
ToolMaker:

Hi Rosh,

 

Thanks for your reply. Here is my response below:

"LiveUpate automatically always replaces all code samples which go in standard installation pack..."
I think you mis understand me. I created my own files. I tried to adhere to the standard OO concepts MT5 set. Even by storing my files in the same locations. I used diffrent names from the examples....

"So it is not recommended to make a MQL5 program with already existed name and store them in standard folders"

nope, it was diffrent name called HeartBeatIndicator. It seem the folder was removed...

Hi Rosh,

Sorry for posting here but I thought because my history is posted here you would remember my issue. It happened again and this time I lost ALL my code. Luckily I installed source control installed last time and I can just pull the code back. However I managed to isolate this issue and give guidance for investigation. This is not 100% a MetaTrader problem but a Win 7 UAC problem. I can only guess what happens but MT5 needs to investigate and build in some mechanism if needed.

When UAC is activated you don’t have Permission to create files in your Program files folder....or well limited access I believe. When you run the Terminal with UAC enabled it creates a copy MT5 in some temp location C:\Users\USERNAME\AppData\Roaming\MetaQuotes\Terminal\4EDB68BE60D0613734147A2FDBB75058

4EDB68BE60D0613734147A2FDBB75058 - this would differ depending on the vendor platform. This was my GUID for Alphari.

My suspicion is when UAC is enabled it can’t copy the source (I had scenarios where it did copy so this is a hunch) file to this temp folder and thus don’t copy source files at all and only the new source files from the installer is visible then source get lost. Another scenario (this was tested and confirmed) would be when you are running UAC and the temp folder gets created and you created a new source file like a indicator (in this temp folder created for your terminal by win7) and you close the terminal and UAC get removed...then those files in program files don’t get updated and you are pointing to the Program files source again...

I just test tested now and after enabling UAC my terminal pointed to that funny temp folder again and I have my source files again :) jippeee...So clearly there is a synchronization issue here. HOWEVER the next question comes to mind...WHY did my source in Program files got lost after installing build 581....It looks like the Win7 temp folders saved my source...and build 581 is also replicated to these temp folders so build numbers are all these same across folders.

I hate UAC but the laptop I’m using to code on is a work laptop with domain policies filtering down when logging on to the network :( So i can disable UAC however after a few logon intervals the domain policy gets downloaded again and UAC is activated again.

I know this is maybe not a bug to spent time on because it is not directly MT5 but I feel MT5 needs to cater a solution for this?

Suggestion:

Check if the running path doesn't equal the installed path and if so flag a update to this running path on next start up? I don’t know just suggestion. Also you need to keep in mind for all other MT5 terminals installed so the fix needs to be specific to a terminal.

Let me know if this is worthwhile to log in the service desk. 

 

Atleast I know now when my code gone I need to diable/enable UAC. weird that my code in programfiles was gone...

 
So I lost my code after updatingboth terminals.... both terminals in programfiles lost their code and one in the tem folder. I will post if I get more details.