CustomTimeFrameBarsUnloadedEventArgs
class cAlgo.API Since 5.3
DesktopCLICloud
Provides data for custom time frame BarsUnloaded event.
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
public class CustomTimeFrameBarsUnloadedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
protected override void OnStart()
{
var customTimeFrame = TimeFrameManager.Custom.Add("My Time Frame");
customTimeFrame.BarsUnloaded += OnCustomTimeFrameBarsUnloaded;
}
private void OnCustomTimeFrameBarsUnloaded(CustomTimeFrameBarsUnloadedEventArgs args)
{
Print("{0} bars of {1} were unloaded", args.CustomBars.Symbol.Name, args.CustomTimeFrame.Name);
}
def on_start(self):
customTimeFrame = api.TimeFrameManager.Custom.Add("My Time Frame")
customTimeFrame.BarsUnloaded += self.on_custom_time_frame_bars_unloaded
def on_custom_time_frame_bars_unloaded(self, args):
api.Print(f"{args.CustomBars.Symbol.Name} bars of {args.CustomTimeFrame.Name} were unloaded")
Properties
| Name | Description |
|---|---|
CustomBarsDesktopCLICloudCustomBars | Gets custom bars that was unloaded. |
CustomTimeFrameDesktopCLICloudCustomTimeFrame | Gets custom time frame. |