MoveObject

Moves a point of a chart object to a new position.

Syntax

MoveObject(objectName: string, pointIndex: number, time: number, price: number): boolean

Parameters

  • objectName: string - The name of the object to move

  • pointIndex: number - The index of the point to move

  • time: number - The new time coordinate

  • price: number - The new price coordinate

Return Value

Returns boolean - true if the object was moved successfully.

Description

The MoveObject method moves a specific point of a chart object to a new position defined by time and price coordinates. This method works with various object types that have movable points, such as trend lines, rectangles, and Fibonacci tools.

Example

Last updated