MQL4参考 图表操作 WindowPriceOnDropped

WindowPriceOnDropped

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

double  WindowPriceOnDropped();

Parameters

None.

Returned value

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

Note

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

WindowTimeOnDropped(), WindowYOnDropped(), WindowOnDropped()