Window functions
PriceOnDropped ()
TimeOnDropped ()
WindowFind ()
WindowIsVisible
WindowOnDropped ()
WindowsTotal ()
WindowXOnDropped ()
WindowYOnDropped ()
double PriceOnDropped ()
Returns price fell part of the point where the expert or script was rejected. This value is valid when the expert or script falls from the mouse.
Note: For custom indicators, this value is undefined.
Sample
double drop_price = PriceOnDropped ();
datetime drop_time = TimeOnDropped ();
//---- May be undefined (zero)
if (drop_time> 0)
{
ObjectCreate ("droped price line", OBJ_HLINE, 0, drop_price);
ObjectCreate ("droped timeline", OBJ_VLINE, 0, drop_time);
}
datetime TimeOnDropped ()
Returns during part of the point where he fell expert or script was rejected. This value is valid when the expert or script falls from the mouse.
Note: For custom indicators, this value is undefined.
Sample
double drop_price = PriceOnDropped ();
datetime drop_time = TimeOnDropped ();
//---- May be undefined (zero)
if (drop_time> 0)
{
ObjectCreate ("droped price line", OBJ_HLINE, 0, drop_price);
ObjectCreate ("droped timeline", OBJ_VLINE, 0, drop_time);
}
int WindowFind (string name)
If the indicator with no name found return index containing a window sign, otherwise returns -1.
Note: For custom indicators WindowFind () returns -1, if it requires is only when the init () function works.
Parameters
name - short name indicator.
Sample
int win_idx = WindowFind ("MACD (12,26,9)");
bool WindowIsVisible (int index)
Returns true if the subwindow pattern is visible otherwise returns false.
Parameters
index - Chart subwindow index.
Sample
int maywin = WindowFind ("MyMACD");
if (maywin> -1 & & WindowIsVisible (maywin) == true)
Print ("window MyMACD visible");
elsewhere
Print ("window MyMACD not found or is't visible");
int WindowOnDropped ()
Returns the index window where an expert, custom indicator or script was rejected. This value is valid when expert, custom indicator or script falls from the mouse.
Note: For custom indicators, this index is undefined when the init () function works and returns the index is an index window where custom indicator works (may be different from putting a window index, since own indicator can create their own new window).
Sample
if (WindowOnDropped ()! = 0)
{
Print ("indicator" MyIndicator "must be applied to the main chart window!");
return (false);
}
int WindowsTotal ()
Returns the number of indicator windows of the table (including the table).
Sample
Print ("Windows count =" WindowsTotal ());
int WindowXOnDropped ()
Returns x-axis coordinate in pixels were expert or script failed.
Sample
Print ("Expert dropped point x =" WindowXOnDropped (), "y =" WindowYOnDropped ());
int WindowYOnDropped ()
Returns y-axis coordinate in pixels were expert or script failed.
Sample
Print ("Expert dropped point x =" WindowXOnDropped (), "y =" WindowYOnDropped ());
Friday, May 27, 2011
Subscribe to:
Post Comments (Atom)
Popular Posts
Powered by Blogger.
No comments:
Post a Comment