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 made an indicator that can automatically put ea to chart.
If i click windows taskbar (bottom), the indicator loses focus and the setfocus,key_event cannot work anymore.
Is there any function that can setfocus over the taskbar?
I tried SetForegroundWindow and ShowWindow BringWindowToTop ..etc. no one works.
I imagine an indicator / ea that can change chart's ea freely.
This source cannot work when I clicked taskbar.
///////////////////////////////////////
int t_handle=GetAncestor(WindowHandle(Symbol(),Period()),2);
Print("Focus : ",SetFocus(t_handle)," ",t_handle);
// The EA's hotkey is Ctri+1
keybd_event(VK_CONTROL,0,0,0);
keybd_event(VK_1,0,0,0);
keybd_event(VK_1,0,KEYEVENTF_KEYUP,0);
keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0);