Skip to content

FrameContainerChangedEventArgs.Frame

property · FrameContainerChangedEventArgs · cAlgo.API

DesktopCLICloud

Returns the 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

public Frame Frame {get;}
frameContainerChangedEventArgs.Frame: Frame

Returns Frame

Examples

protected override void OnStart()
{
    var frame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
    frame.ContainerChanged += OnFrameContainerChanged;
}

private void OnFrameContainerChanged(FrameContainerChangedEventArgs args)
{
    var container = args.Frame.ChartContainer;
    if (container != null)
        Print("Container {0} now has {1} frames, mode: {2}", container.Id, container.Count, container.Mode);
}
def on_start(self):
    frame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
    frame.ContainerChanged += self.on_frame_container_changed

def on_frame_container_changed(self, args):
    container = args.Frame.ChartContainer
    if container is not None:
        api.Print(f"Container {container.Id} now has {container.Count} frames, mode: {container.Mode}")