ChartObject.IsLocked
property · ChartObject · cAlgo.API
DesktopCLICloud
Gets or sets if the object is locked or not, user can't move locked objects unless unlocked.
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
bool IsLocked {get; set;}
chartObject.IsLocked: bool
Returns bool
Examples
var line = Chart.DrawHorizontalLine("support", Bars.LowPrices.LastValue, Color.Green);
line.IsInteractive = true;
line.IsLocked = true;
Print("Line is locked: {0}", line.IsLocked);
line = api.Chart.DrawHorizontalLine("support", api.Bars.LowPrices.LastValue, Color.Green)
line.IsInteractive = True
line.IsLocked = True
api.Print(f"Line is locked: {line.IsLocked}")