untested but try this for a start:
#import "user32.dll" int GetAncestor(int hWnd, int gaFlags); int GetDlgItem(int hDlg, int nIDDlgItem); int PostMessageA(int hWnd, int Msg, int wParam, int lParam); #import #define WM_COMMAND 0x0111 #define WM_KEYDOWN 0x0100 #define VK_HOME 0x0024 #define VK_DOWN 0x0028 void start() { string symb = Symbol(); int hFile, SymbolsTotal, hTerminal, hWnd; hFile = FileOpenHistory("symbols.sel", FILE_BIN|FILE_READ); if(hFile < 0) return(-1); SymbolsTotal = (FileSize(hFile) - 4) / 128; FileSeek(hFile, 4, SEEK_SET); hTerminal = GetAncestor(WindowHandle(Symbol(), Period()), 2); hWnd = GetDlgItem(hTerminal, 0xE81C); hWnd = GetDlgItem(hWnd, 0x50); hWnd = GetDlgItem(hWnd, 0x8A71); PostMessageA(hWnd, WM_KEYDOWN, VK_HOME, 0); for(int i = 0; i < SymbolsTotal; i++) { if(FileReadString(hFile, 12) == symb) { PostMessageA(hTerminal, WM_COMMAND, 33050, 0); break; } PostMessageA(hWnd, WM_KEYDOWN, VK_DOWN, 0); FileSeek(hFile, 116, SEEK_CUR); } FileClose(hFile); return; }
Nice. It works great. Thanks:-)
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
Hello,
Is there a code that automaticly remove only the EA on current chart? I havde tried :
but it removed the EA on all charts?