Drawing objects on indicator_separate_window

 
Hey, can anyone help me understand how i can draw objects on indicator_separate_window. What i want to draw is a chart graphical object. It displays a mini chart. If i use the ObjectCreate function, it draws it in the main chart not the indicator window. Can anyone help?
 

bool  ObjectCreate(
   long         chart_id,      // chart identifier
   string       name,          // object name
   ENUM_OBJECT  type,          // object type
   sub_window   nwin,          // window index
   datetime     time1,         // time of the first anchor point
   double       price1,        // price of the first anchor point
   ...
   datetime     timeN=0,       // time of the N-th anchor point
   double       priceN=0,      // price of the N-th anchor point
   ...
   datetime     time30=0,      // time of the 30th anchor point
   double       price30=0      // price of the 30th anchor point
   );

sub_window

[in]  Number of the chart subwindow. 0 means the main chart window. The specified subwindow must exist, otherwise the function returns false.

 
See also ChartWindowFind
 
Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893