MQL4 Reference Chart Operations WindowTimeOnDropped

WindowTimeOnDropped

Returns the time of the chart point where Expert Advisor or script was dropped.

datetime  WindowTimeOnDropped();

Parameters

None.

Returned value

The time value of the chart point where expert or script was dropped. This value is only valid if the expert or script was dropped by mouse.

Notwe

For custom indicators this value is undefined.

Example:

  double   drop_price=WindowPriceOnDropped();
  datetime drop_time=WindowTimeOnDropped();
  //---- may be undefined (zero)
  if(drop_time>0)
    {
     ObjectCreate("Dropped price line"OBJ_HLINE, 0, drop_price);
     ObjectCreate("Dropped time line"OBJ_VLINE, 0, drop_time);
    }

See also

WindowPriceOnDropped(), WindowYOnDropped(), WindowOnDropped()