Skip to content

ChartObject

interface cAlgo.API

DesktopCLICloud

Represents the chart object.

Environment behaviour

CLI — works differently. Created and kept with all its properties, but never drawn: the CLI displays no chart.

Cloud — works differently. Created and kept with all its properties, but never drawn: the cloud displays no chart.

Definition

public interface ChartObject

Namespace: cAlgo.API · Group: Drawings

Examples

foreach (var chartObject in Chart.Objects)
{
    Print("Name: {0} | Type: {1} | Interactive: {2} | Locked: {3}", chartObject.Name, chartObject.ObjectType, chartObject.IsInteractive, chartObject.IsLocked);
}
for chartObject in api.Chart.Objects:
    api.Print(f"Name: {chartObject.Name} | Type: {chartObject.ObjectType} | Interactive: {chartObject.IsInteractive} | Locked: {chartObject.IsLocked}")

Properties

Name Description
CommentDesktopCLICloudstring Gets or sets the comment for the chart object.
IsAliveDesktopCLICloudbool Defines if the chart object still exists on the chart.
IsHiddenDesktopCLICloudbool Gets or sets if object is hidden and not visible to user or not.
IsInteractiveDesktopCLICloudbool Defines whether the instance is interactive. The non-interactive chart objects cannot be selected, have no hover effect and cannot be searched. Available only for the current cBot or Indicator and will be removed when the cBot/Indicator stops.
IsLockedDesktopCLICloudbool Gets or sets if the object is locked or not, user can't move locked objects unless unlocked.
NameDesktopCLICloudstring Gets the chart object name - the unique identifier for the object in the current chart area.
ObjectTypeDesktopCLICloudChartObjectType Gets the chart object type.
ZIndexDesktopCLICloudint Gets or sets the location of a chart object on the Z-axis in respect to the other chart objects.