MQL4 Reference
Object functions
ObjectGetValueByShift
| double ObjectGetValueByShift( |
string name, int shift) |
The function calculates and returns the price value for the specified bar (shift related to the current bar).
The price value is calculated by the first and second coordinates using a linear equation. Applied to trendlines and similar objects.
To get the detailed error information, one has to call the GetLastError() function.
See also ObjectGetShiftByValue() function.
Parameters:
| name |
- |
Object name |
| shift |
- |
Bar index. |
Sample:
double price=ObjectGetValueByShift("MyTrendLine#123", 11);
|
|
|