I tried to compile the following mql4 code in mt5 Metaeditor
#import "user32.dll"int PostMessageA(int hWnd,int Msg,int wParam,int lParam);
int GetWindow(int hWnd,int uCmd);
int GetParent(int hWnd);
#import
int start()
{
bool blnContinue = true;
int intParent = GetParent( WindowHandle( Symbol(), Period() ) );
int intChild = GetWindow( intParent, 0 );
int intCmd=33134;
if ( intChild > 0 )
{
if ( intChild != intParent ) PostMessageA( intChild, 0x0111, intCmd, 0 );
}
else blnContinue = false;
while( blnContinue )
{
intChild = GetWindow( intChild, 2 );
if ( intChild > 0 )
{
if ( intChild != intParent ) PostMessageA( intChild, 0x0111, intCmd, 0 );
}
else blnContinue = false;
}
// Now do the current window
PostMessageA( intParent, 0x0111, intCmd, 0 );
return(0);
}
and get the following error 'WindowHandle' - function not defined.
This code compliles in mt4 Metaeditor on the same computer without any problems.
This script converts the timeframes of all charts in a given profile to Daily timeframe. I have successfully converted several scripts from mql4 to mql5, but can't understand what's the problem here. Thanks.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I tried to compile the following mql4 code in mt5 Metaeditor
and get the following error 'WindowHandle' - function not defined.
This code compliles in mt4 Metaeditor on the same computer without any problems.
This script converts the timeframes of all charts in a given profile to Daily timeframe. I have successfully converted several scripts from mql4 to mql5, but can't understand what's the problem here. Thanks.