Object type determines anchor coordinates
A horizontal line needs a price anchor, while a trend line needs time and price coordinates for multiple points. Text, labels, arrows, rectangles, and Fibonacci tools each have their own coordinate and property requirements.
On the current chart, ObjectCreate reports whether creation succeeded. For another chart, true only confirms that the command entered its queue; verify the result separately. Check GetLastError after a failed request instead of assuming a later property call repaired it.
| Object | Coordinates | Common use |
|---|---|---|
| OBJ_HLINE | One price | Level |
| OBJ_VLINE | One time | Event marker |
| OBJ_TREND | Two time-price points | Trend segment or ray |
| OBJ_LABEL | Screen corner and pixel offsets | Fixed chart UI |
