ChartArea.RemoveObject
method · ChartArea · cAlgo.API
DesktopCLICloud
Removes the chart object of the specified name.
Definition
void RemoveObject(string objectName)
chartArea.RemoveObject(objectName: str) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
objectName | string | str | The name of the object. |
Examples
Chart.DrawHorizontalLine("target", Symbol.Bid + 20 * Symbol.PipSize, Color.Green);
Chart.RemoveObject("target");
Print("Target line exists: {0}", Chart.FindObject("target") != null);
api.Chart.DrawHorizontalLine("target", api.Symbol.Bid + 20 * api.Symbol.PipSize, Color.Green)
api.Chart.RemoveObject("target")
api.Print(f"Target line exists: {api.Chart.FindObject('target') is not None}")