MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Window functions  WindowHandle

 
int WindowHandle( string symbol, int timeframe)
Returns the system window handler containing the given chart. If the chart of symbol and timeframe has not been opened by the moment of function calling, 0 will be returned.
Parameters:
symbol   -   symbol name.
timeframe   -   Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
Sample:
  int win_handle=WindowHandle("USDX",PERIOD_H1);
  if(win_handle!=0)
    Print("Window with USDX,H1 detected. Rates array will be copied immediately.");