
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Save the chart as a template then parse the .tpl xml file to find the expert name
Hi nicholishen,
As I already wrote to Alain, it's not a very good solution since the user can choose to attach/drop an Expert in any time, so I'll need always (onTimer) to save the template and check in it if any expert is on - this repeated actions will burden the system.
Hi nicholishen,
As I already wrote to Alain, it's not a very good solution since the user can choose to attach/drop an Expert in any time, so I'll need always (onTimer) to save the template and check in it if any expert is on - this repeated actions will burden the system.
There's no burden on system resources. The only thing is a minor introduction of about 3.5 ms latency per check. I would consider this a non-issue for most indicators. Try it for yourself.
There's no burden on system resources. The only thing is a minor introduction of about 3.5 ms latency per check. I would consider this a non-issue for most indicators. Try it for yourself.
Hi nicholishen,
I checked your code and it works well, thanks.
About the burden on system resources, well, as you mentioned it's not so heavy but my Indicator is run by default on every open Chart,
so it can be a little bit heavy if the user will open plenty of Charts.
But now I'm going to build a checking process that will run your code just from one of the opened Charts, so it's going to be a perfect solution.
So thank you nicholishen for your code,
and I thanks Alain and Chris too.
Hi nicholishen,
I checked your code and it works well, thanks.
About the burden on system resources, well, as you mentioned it's not so heavy but my Indicator is run by default on every open Chart,
so it can be a little bit heavy if the user will open plenty of Charts.
But now I'm going to build a checking process that will run your code just from one of the opened Charts, so it's going to be a perfect solution.
So thank you nicholishen for your code,
and I thanks Alain and Chris too.
if(!ChartSaveTemplate(0,"../MQL4/Files/temp/temp.tpl"))
Interesting, I never knew the double dot was allowed in the paths commands anywhere in MQL.
Interesting, I never knew the double dot was allowed in the paths commands anywhere in MQL.
There is no easy way under mql4.
You can't.
Hi Alain,
but in the documentation of ChartSaveTemplate() it is written:
filename
[in] The filename to save the template. The ".tpl" extension will be added to the filename automatically; there is no need to specify it. The template is saved in data_folder\templates\ and can be used for manual application in the terminal. If a template with the same filename already exists, the contents of this file will be overwritten.
How do I force it to save in data_folder\MQL4\Files ?
Thanks,
Lukasz
Hi Alain,
but in the documentation of ChartSaveTemplate() it is written:
filename
[in] The filename to save the template. The ".tpl" extension will be added to the filename automatically; there is no need to specify it. The template is saved in data_folder\templates\ and can be used for manual application in the terminal. If a template with the same filename already exists, the contents of this file will be overwritten.
How do I force it to save in data_folder\MQL4\Files ?
Thanks,
Lukasz
I tried following:
only last one succeded and off course in the place where FileOpen cannot read it :(.
Please help.