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 have a problem because I want to add 2 indicators using this routine, but for some reason, I can only manage to add the first 1 and the second returns file cannot be found. Can you help?
Function:
int StartCustomIndicator(int hWnd,string IndicatorName, bool AutomaticallyAcceptDefaults=true)
{
Sleep(50);
uchar name[];
StringToCharArray(IndicatorName,name,0,StringLen(IndicatorName));
int MessageNumber=RegisterWindowMessageW("MetaTrader4_Internal_Message");
int r=PostMessageW(hWnd,MessageNumber,15,name);
Sleep(50);
if(AutomaticallyAcceptDefaults) {
int ind_settings = FindWindowW(NULL, "Custom Indicator - "+IndicatorName);
PostMessageW(ind_settings,0x100,VK_RETURN,name);
}
return(INIT_SUCCEEDED);
}
Call:
StartCustomIndicator(WindowHandle(Symbol(),0),"NVC");
StartCustomIndicator(WindowHandle(Symbol(),0),"Correlations MA");