Delete a template from code

To add comments, please log in or register
BeLikeTrader
3785
BeLikeTrader  
Hello my question is simple, Is it possible to delete a template from code?
Anthony Garot
3273
Anthony Garot  
Luis Alejandro Diaz Vidal:
Hello my question is simple, Is it possible to delete a template from code?
I don't recall a native MQL function to do this, but you could always just delete the .tpl file using


bool DeleteFileW(string lpExistingFileName);


which is in kernel32.dll

aslkdjf
22
aslkdjf  
 FileDelete("path\\to\\template.tpl");
Anthony Garot
3273
Anthony Garot  

aslkdjf:

FileDelete("path\\to\\template.tpl");


No, this will not work. The documentation is very specific on this point.


Note

For security reasons, work with files is strictly controlled in the MQL5 language. Files with which file operations are conducted using MQL5 means, cannot be outside the file sandbox.


BeLikeTrader
3785
BeLikeTrader  
Anthony Garot:


No, this will not work. The documentation is very specific on this point.


Note

For security reasons, work with files is strictly controlled in the MQL5 language. Files with which file operations are conducted using MQL5 means, cannot be outside the file sandbox.


Yeah no native function.. just what I thought, thank you for your time :)

To add comments, please log in or register