CustomTimeFrames.Remove
method · CustomTimeFrames · cAlgo.API Since 5.3
DesktopCLICloud
Removes a custom time frame.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
bool Remove(CustomTimeFrame customTimeFrame)
customTimeFrames.Remove(customTimeFrame: CustomTimeFrame) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
customTimeFrame | CustomTimeFrame | CustomTimeFrame | Custom time frame |
Returns bool — True if remove was successful otherwise False.
Examples
var customTimeFrame = TimeFrameManager.Custom.Get("My Custom TF");
if (customTimeFrame != null)
Print("Custom time frame removed: {0}", TimeFrameManager.Custom.Remove(customTimeFrame));
customTimeFrame = api.TimeFrameManager.Custom.Get("My Custom TF")
if customTimeFrame is not None:
api.Print(f"Custom time frame removed: {api.TimeFrameManager.Custom.Remove(customTimeFrame)}")