I need to create a Metatrader 4 script that will automatically save template of all charts once I drag it on any chart. It should be compatible and be compiles for MT build >600
The indicator that does it automatically has already been created and works great. The indicator saves template with the name of the instrument every time there is a new object added/modified on the chart. So all is done, except the script.
The script will do this:
- When dragged on any chart, it will automatically save a template for all instruments/tabs open on MT. If they are 5 then 5, if there are 30 instruments, then 30 instruments. By default it will do that, and the name of the template will be the name of the instrument, [url removed, login to view], etc, that's already done as you can see in the attached indicator
- ALL_PAIRS variable. By default it will be true, so when the script is dragged on the chart, it will save templates on instruments transparently and overwritting files without asking (it's done in the indicator). If ALL_PAIRS = false, then it will ONLY save the template for the pair where it was dragged
- extern string DestinationPath="";
This variable exists in the indicator, need it on the script as well. The template will be saved on MT template folder, and a second copy will be saved on a second folder like C:\Users\templates\ or anything I want. Like I said, this is already done, you just need to add it to the script.