CustomTimeFrame.RemoveBars
method · CustomTimeFrame · cAlgo.API Since 5.3
DesktopCLICloud
Removes bars of a symbol which is not being used.
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 RemoveBars(Symbol symbol)
customTimeFrame.RemoveBars(symbol: Symbol) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
symbol | Symbol | Symbol | Bars Symbol |
Returns bool — True if bars removed successfully otherwise false
Examples
var customTimeFrame = TimeFrameManager.Custom.Add("My Custom TF");
var symbol = Symbols.GetSymbol("EURUSD");
customTimeFrame.AddBars(symbol);
Print("Custom bars removed: {0}", customTimeFrame.RemoveBars(symbol));
customTimeFrame = api.TimeFrameManager.Custom.Add("My Custom TF")
symbol = api.Symbols.GetSymbol("EURUSD")
customTimeFrame.AddBars(symbol)
api.Print(f"Custom bars removed: {customTimeFrame.RemoveBars(symbol)}")