Skip to content

ChartManager.FramesRemoved

event · ChartManager · cAlgo.API

DesktopCLICloud

Occurs when frames are removed.

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

event Action<FramesRemovedEventArgs> FramesRemoved;
api.ChartManager.FramesRemoved += handler  # handler(obj: FramesRemovedEventArgs)

Examples

protected override void OnStart()
{
    ChartManager.FramesRemoved += OnFramesRemoved;
}

private void OnFramesRemoved(FramesRemovedEventArgs args)
{
    foreach (var frame in args.RemovedFrames)
        Print("Frame removed: {0}", frame.Id);
}
def on_start(self):
    api.ChartManager.FramesRemoved += self.on_frames_removed

def on_frames_removed(self, args):
    for frame in args.RemovedFrames:
        api.Print(f"Frame removed: {frame.Id}")