Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2135-standardlibrary-chart-object-classes-cchartobject-cchartobjectwindow.md
T

28 lines
528 B
Markdown
Raw Normal View History

2026-06-23 21:47:51 +08:00
# Window
Gets the index of the chart window where the graphical object is located.
```
int  Window() const
```
Return Value
The number of the chart window where the graphical object is located (0 - main window). If there is no bound object, it returns -1.
Example:
```
//--- example for CChartObject::Window 
#include <ChartObjects\ChartObject.mqh> 
//--- 
void OnStart() 
  { 
   CChartObject object; 
   //--- get window of chart object  
   int window=object.Window(); 
  } 
```