Download MetaTrader 5
To add comments, please log in or register
All activity at MQL5.community is clearly visible. Have a look at the Wall!
Tarp999
46
Tarp999 2014.04.23 08:16 

How can I open a separate Window in an Expert Advisor?

Thanks.

Alain Verleyen
Moderator
28536
Alain Verleyen 2014.04.23 09:51  
GarZed9:

How can I open a separate Window in an Expert Advisor?

Thanks.

What do you mean, which kind of window ?
Tarp999
46
Tarp999 2014.04.23 10:26  
angevoyageur:
What do you mean, which kind of window ?

In the Indicators I can do it with instruction:

#property indicator_separate_window

but in Expert Advisor it is not possibile, it generates an error.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.23 10:31  
EA cannot run on separate windows. Only on main windows.
Alain Verleyen
Moderator
28536
Alain Verleyen 2014.04.23 14:44  
GarZed9:

In the Indicators I can do it with instruction:

but in Expert Advisor it is not possibile, it generates an error.


What to do ? An EA can't draw from buffers like indicators. But it can draw objects on any window or subwindow.
Tarp999
46
Tarp999 2014.04.23 16:13  
angevoyageur:
What to do ? An EA can't draw from buffers like indicators. But it can draw objects on any window or subwindow.



Yes, I would simply write (with text objects) some infos in this separate window.
honest_knave
954
honest_knave 2014.04.23 16:21  
GarZed9:


Yes, I would simply write (with text objects) some infos in this separate window.


Bear in mind that the EA can only draw on existing subwindows.

ffoorr
983
ffoorr 2014.04.23 17:19  

Create an empty indicator, call it "empty_indi" exemple :

int start()

{

return(0);

}


And write wathever you want inside his window; included writing from your expert into his window; this is a current way to show information.

int Win_indi; Win_indi = WindowFind("empty_indi");      // Searching for indicator window number
   if (Win_indi<0)return;  // the indicator has to be in the chart


ObjectCreate("Name",OBJ_LABEL, Win_indi,0,0);// Creating
   ObjectSet ect    
Tarp999
46
Tarp999 2014.04.23 21:10  
ffoorr:

Create an empty indicator, call it "empty_indi" exemple :

int start()

{

return(0);

}


And write wathever you want inside his window; included writing from your expert into his window; this is a current way to show information.

Great, but but ..... I would like to launch the empty indicator not manually but from the Expert Advisor.

Can you do?



qjol
3243
qjol 2014.04.23 21:50  
HoJun
3
HoJun 2015.02.10 07:51  
qjol:

WOW!!! How can you do that?

That's exactly what I want....

/ /12
To add comments, please log in or register