MQL4 Reference
Window functions
WindowOnDropped
Returns window index where expert, custom indicator or script was dropped.
This value is valid if the expert, custom indicator or script was dropped by mouse.
Note: For custom indicators being initialized (call from the init() function), this index is not defined.
The returned index is the number of window (0-chart main menu, subwindows of indicators are numbered starting from 1) where the custom indicator
is working. A custom indicator can create its own new subwindow during its work, and the number of this subwindow will differ from that of the window
where the indicator was really dropped in.
See also WindowXOnDropped(), WindowYOnDropped()
Sample:
if(WindowOnDropped()!=0)
{
Print("Indicator 'MyIndicator' must be applied to main chart window!");
return(false);
}
|
|
|