Chart ID of SubChart

 

Hey guys

I was wondering how it is possible to identify object SubChart on a chart? I wanna use some methods of a chart by my SubChart object, but for that I need its chart_id property. How can I get it? Upon creation I use chart_id of the main chart.

Thank you for your help.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Chart Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Chart Properties - Documentation on MQL5
 

See as sample EA_OBJPROP_CHART_ID
 

Thank you, Rosh!

Spot on, nice use of the indicator SubWindow - tidy solution.

Reason: