Skip to content

FrameContainerChangedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the frame container changed 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 FrameContainerChangedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

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

private void OnFrameContainerChanged(FrameContainerChangedEventArgs args)
{
    Print("Frame {0} moved to container {1}", args.Frame.Id, args.Frame.ChartContainer?.Id);
}
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
    container_id = container.Id if container is not None else "none"
    api.Print(f"Frame {args.Frame.Id} moved to container {container_id}")

Properties

Name Description
FrameDesktopCLICloudFrame Returns the frame.