Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2142-standardlibrary-chart-object-classes-cchartobject-cchartobjectshiftobject.md
T

43 lines
807 B
Markdown
Raw Normal View History

2026-06-23 21:47:51 +08:00
# ShiftObject
Shifts a graphical object.
```
bool  ShiftObject(
   datetime  d_time,      // increment of time coordinate
   double    d_price      // increment of price coordinate
   )
```
Parameters
d_time
[in]  Increment of the time coordinate of all anchor points.
d_price
[in]  Increment of the price coordinate of all anchor points.
Return Value
true - success, false - cannot shift the object.
Example:
```
//--- example for CChartObject::ShiftObject  
#include <ChartObjects\ChartObject.mqh>  
//---  
void OnStart()  
  {  
   CChartObject object;  
   datetime     d_time;  
   double       d_price;  
   //--- shift chart object  
   object.ShiftObject(d_time,d_price);  
  }  
```