Skip to content

ActiveFrameChangedEventArgs.NewFrame

property · ActiveFrameChangedEventArgs · cAlgo.API

DesktopCLICloud

Returns the new active frame or null.

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 NewFrame {get;}
activeFrameChangedEventArgs.NewFrame: Frame

Returns Frame

Examples

protected override void OnStart()
{
    ChartManager.ActiveFrameChanged += OnActiveFrameChanged;
}

private void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)
{
    if (args.NewFrame != null)
        Print("New active frame: {0}, size: {1} x {2}", args.NewFrame.Id, args.NewFrame.Width, args.NewFrame.Height);
}
def on_start(self):
    api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed

def on_active_frame_changed(self, args):
    if args.NewFrame is not None:
        api.Print(f"New active frame: {args.NewFrame.Id}, size: {args.NewFrame.Width} x {args.NewFrame.Height}")