Difference chart(ID), window, subwindow?

 

Hi,

please, can somebody explain what is what in from the mql5 point of view? A lot of elements/objects need to know this params, I'm wondering how to use them to produce reusable code. 

Thanks a lot,
Alex 

 
Every chart has an unique identification number. You can know this number through ChartID() function. Inside a chart there is, at least, one window (main chart window, whose number is always 0). If you attach indicators that work in separate windows, this chart can contain several subwindows (whose numbers start from 1, 2, 3..... etc). It's all. Regards.
Reason: