CustomSymbol.RemoveBars
method · CustomSymbol · cAlgo.API Since 5.3
DesktopCLICloud
Removes bars of a time frame which has no user.
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(TimeFrame timeFrame)
customSymbol.RemoveBars(timeFrame: TimeFrame) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
timeFrame | TimeFrame | TimeFrame | Bars TimeFrame, it must be a built-in time frame not custom. |
Returns bool — True if bars removed successfully otherwise false
Examples
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.AddBars(TimeFrame.Hour);
Print("Hourly custom bars removed: {0}", customSymbol.RemoveBars(TimeFrame.Hour));
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.AddBars(TimeFrame.Hour)
api.Print(f"Hourly custom bars removed: {customSymbol.RemoveBars(TimeFrame.Hour)}")