Change Time Frame All (Indicator)

Change Time Frame All (Indicator)最新版

更新日期:2022-03-01分类标签: 语言:中文平台:没限制

20 人已下载 手机查看

//+——————————————————————+
//| ChangeTF-All.mq4 |
//| Copyright ?2010, zznbrm |
//+——————————————————————+
#property copyright “Copyright ?2010, zznbrm”

#import “user32.dll”
int PostMessageA(int hWnd,int Msg,int wParam,int lParam);
int GetWindow(int hWnd,int uCmd);
int GetParent(int hWnd);
#import

#define GW_HWNDFIRST 0
#define GW_HWNDNEXT 2
#define WM_COMMAND 0x0111

extern int eintTF = PERIOD_M5;

int start()
{
bool blnContinue = true;
int intParent = GetParent( WindowHandle( Symbol(), Period() ) );
int intChild = GetWindow( intParent, GW_HWNDFIRST );
int intCmd;

switch( eintTF )
{
case PERIOD_M1: intCmd = 33137; break;
case PERIOD_M5: intCmd = 33138; break;
case PERIOD_M15: intCmd = 33139; break;
case PERIOD_M30: intCmd = 33140; break;
case PERIOD_H1: intCmd = 35400; break;
case PERIOD_H4: intCmd = 33136; break;
case PERIOD_D1: intCmd = 33134; break;
case PERIOD_W1: intCmd = 33141; break;
case PERIOD_MN1: intCmd = 33334; break;
}

if ( intChild > 0 )
{
if ( intChild != intParent ) PostMessageA( intChild, WM_COMMAND, intCmd, 0 );
}
else blnContinue = false;

while( blnContinue )
{
intChild = GetWindow( intChild, GW_HWNDNEXT );

if ( intChild > 0 )
{
if ( intChild != intParent ) PostMessageA( intChild, WM_COMMAND, intCmd, 0 );
}
else blnContinue = false;
}

// Now do the current window
PostMessageA( intParent, WM_COMMAND, intCmd, 0 );
}

 

 

如果你对文件有了解,请帮助投票!

If you are familiar with the file, please help vote!

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位投票人。

相关资源

暂无评论

暂无评论...