No free help
urgent help.
So write it. Help you with what? You haven't stated a problem. Show us your attempt (using SRC) and state the nature of your problem.
No free help
urgent help.
I can't write it, that's why I'm asking here. I think I've explained perfectly well what I want to achieve.
I use this code to change the template on ALL open charts
#property show_inputs #include <WinUser32.mqh> #import "user32.dll" int PostMessageA(int hWnd,int Msg,int wParam,int lParam); int GetWindow(int hWnd,int uCmd); int GetParent(int hWnd); #import extern int templateIndex = 0; int start() { bool blnContinue = true; int intParent = GetParent( WindowHandle( Symbol(), Period() ) ); int intChild = GetWindow( intParent, GW_HWNDFIRST ); if ( intChild > 0 ) { if ( intChild != intParent ) PostMessageA( intChild, WM_COMMAND, 34800 + templateIndex, 0 ); } else blnContinue = false; while( blnContinue ) { intChild = GetWindow( intChild, GW_HWNDNEXT ); if ( intChild > 0 ) { if ( intChild != intParent ) PostMessageA( intChild, WM_COMMAND, 34800 + templateIndex, 0 ); } else blnContinue = false; } // Now do the current window PostMessageA( intParent, WM_COMMAND, 34800 + templateIndex, 0 ); }
I want to apply different templates to different markets with a single script, i.e GBPUSD gets one template of my choice, EURUSD gets a different one, USDJPY gets another one etc
I can't write it, that's why I'm asking here. I think I've explained perfectly well what I want to achieve.
It sounds to me like you're not asking for programming help, but you'd rather have someone make it for you from scratch? You should post this job to the freelance section or google search the internet for a script that does what you want.
I just want to know the bit of code that does the following:
if(market=XXX){
apply template X
}
Coincidentally, nicholishen, it's for use on the off chance that you added the modification I requested to your excellent crosshair indicator
- mp21: I can't write it, that's why I'm asking here. I think I've explained perfectly well what I want to achieve.You have only four choices:
- Search for it,
- learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
No free help
urgent help. - Perhaps you should read the manual.
ChartApplyTemplate - Chart Operations - MQL4 Reference -
mp21:When you post code please use the SRC button! Please edit your post.
I use this code to change the template on ALL open charts
PostMessageA( intParent, WM_COMMAND, 34800 + templateIndex, 0 );}
General rules and best pratices of the Forum. - General - MQL5 programming forum - Stop using that ancient code. A lot has changed since February 3, 2014 (Build 600)
-
You have only four choices:
- Search for it,
- learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
- Beg at Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum or Need help with coding - General - MQL5 programming forum or Free MQL4 To MQL5 Converter - General - MQL5 programming forum or Requests & Ideas (MQL5 only!),
- or pay (Freelance) someone to code it.
No free help
urgent help. - Perhaps you should read the manual.
ChartApplyTemplate - Chart Operations - MQL4 Reference -
When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum - Stop using that anchant code. A lot has changed since February 3, 2014 (Build 600)
Ok, YOU aren't willing to help, whoroeder, that much is clear. Hopefully someone else will, I thought that's what forums like this were for after all.
There are no slaves here. What part of "No free help" was unclear? We are willing to help, not to do your coding for free.
Ok, YOU aren't willing to help, whoroeder, that much is clear. Hopefully someone else will, I thought that's what forums like this were for after all.
He tried to help you. The answer is in his response. You missed it.
Ok, YOU aren't willing to help, whoroeder, that much is clear. Hopefully someone else will, I thought that's what forums like this were for after all.
He helped you. You can't see it, that's a pity.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I have a script that changes the template on ALL open charts. It has an input parameter to determine which template [0,1,2,etc]. Is there some code I could add to this which applies different templates to different markets?
For example:
if(market=GBP/USD)
{
apply template 1
}
if(market=EUR/USD)
{
apply template 2
}