Download MetaTrader 5

how to draw a text on sub indicator window

To add comments, please log in or register
dolemi
145
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?

Keith Watford
Moderator
10614
Keith Watford  
Show what code you are using to draw the object and maybe somebody can help you
dolemi
145
dolemi  
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
10614
Keith Watford  
     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
16105
whroeder1  
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
dolemi
145
dolemi  
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  
WHRoeder:

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