Moves the top-left corner of a box to a position held in a chart.point.
The point supplies the bar and the price for the corner in one value. It is the point-based form of box.set_lefttop().
Pair it with box.set_bottom_right_point() to place both corners from stored points.
Syntax
box.set_top_left_point(id: series box, point: chart.point) -> void
box.set_top_left_point(point: chart.point) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box whose top-left corner moves. |
| point | chart. | required | A chart.point whose index or time sets the left edge and whose price sets the top edge. |
Returns
Nothing.
Example
//@version=6
indicator("box.set_top_left_point: corner", overlay = true)
var box z = box.new(bar_index, high, bar_index + 1, low)
box.set_top_left_point(z, chart.point.from_index(bar_index - 10, high))See also
Runs on Sidechair