how to draw a text on sub indicator window

Back to topics list To post a new topic, please log in or register
avatar
50
dolemi 2015.06.02 05: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?


avatar
Moderator
3404
GumRai 2015.06.02 05:49 #
 
Show what code you are using to draw the object and maybe somebody can help you
avatar
50
dolemi 2015.06.02 07: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

     ...

}

avatar
Moderator
3404
GumRai 2015.06.02 07: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
avatar
12983
WHRoeder 2015.06.02 13:52 #
 
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
avatar
50
dolemi 2015.06.02 19:47 #
 
GumRai:
you have written the code to draw the object in the main window. The highlighted 0 is the main window
Thanks!
avatar
50
dolemi 2015.06.02 19:47 #
 
WHRoeder:

Play video
Please edit your post.
For large amounts of code, attach it.
Thanks!
Back to topics list  

To add comments, please log in or register