Download MetaTrader 5
To add comments, please log in or register
Use searching on MQL5.community. It is easy!
dolemi
145
dolemi 2015.06.02 03:27 

I can draw a text or create an object on main indicator window, but I use sub-window number to draw a text on sub indicator window, it draws on main window. Any one can help?

Keith Watford
Moderator
7887
Keith Watford 2015.06.02 03:49  
Show what code you are using to draw the object and maybe somebody can help you
dolemi
145
dolemi 2015.06.02 05:36  
dolemi:

I can draw a text or create an object on main indicator window, but I use sub-window number to draw a text on sub indicator window, it draws on main window. Any one can help?


#property  indicator_separate_window


int WinNo;

int init()

{

       WinNo = ChartID(); //Is it correct to get child window ID?

}

int start()

{

     ObjectCreate( WinNo, "Label1", OBJ_LABEL,0,0,0);  // this shows on main window, not at separate window

     ...

}

Keith Watford
Moderator
7887
Keith Watford 2015.06.02 05:53  
     ObjectCreate( WinNo, "Label1", OBJ_LABEL,0,0,0);  // this shows on main window, not at separate window

    
you have written the code to draw the object in the main window. The highlighted 0 is the main window
whroeder1
13596
whroeder1 2015.06.02 11:52  
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
dolemi
145
dolemi 2015.06.02 17:47  
GumRai:
you have written the code to draw the object in the main window. The highlighted 0 is the main window
Thanks!
dolemi
145
dolemi 2015.06.02 17:47  
WHRoeder:

Play video
Please edit your post.
For large amounts of code, attach it.
Thanks!
/
To add comments, please log in or register