Did you search before posting ?
Yep - that's where I found the above.
But I'm stumped now. Did you know the answer?
jer99:
See https://www.mql5.com/en/forum/211558
Yep - that's where I found the above.
But I'm stumped now. Did you know the answer?
Path + ChartApplyTemplate
- 2017.07.18
- www.mql5.com
Hi, I'm trying to make an algorithm which will open all charts in selected template based on user inputs...
Thanks. That thread doesnt really answer the question except to say that the person cant figure out how to:
1) use ChartApplyTemplate and
2) use the standard templates directory.
Both of which I'm trying to find an answer for.
Seems that the use of the standard template directory would be fairly straightforward and logical. Also seems that the function should work. I just havent had a lot of luck.
How can I declare a template name to change
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
I read where I can create a script and assign it to a hotkey to change the template in MT4.
the Path for the template is :
"C:\Program Files (x86)\OANDA - MetaTrader\Personal_Account\"
and the template is called "!!LINEAR REGRESSION
I figured this should be easy. Not so much.
The below is my futile attempt. Anyone notice anything that would cause this not to work ?
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
ChartApplyTemplate(0, TerminalInfoString(TERMINAL_PATH)+"\\templates\\!!LINEAR REGRESSION.tpl");
}
//+------------------------------------------------------------------+