TimeFrameManager.Custom
property · TimeFrameManager · cAlgo.API Since 5.3
DesktopCLICloud
Provides access to Custom TimeFrames API.
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
CustomTimeFrames Custom {get;}
api.TimeFrameManager.Custom: CustomTimeFrames
Returns CustomTimeFrames
Examples
var customTimeFrame = TimeFrameManager.Custom.Get("My Custom TF") ?? TimeFrameManager.Custom.Add("My Custom TF");
Print("Custom time frame: {0}", customTimeFrame.Name);
customTimeFrame = api.TimeFrameManager.Custom.Get("My Custom TF")
if customTimeFrame is None:
customTimeFrame = api.TimeFrameManager.Custom.Add("My Custom TF")
api.Print(f"Custom time frame: {customTimeFrame.Name}")