ActiveFrameChangedEventArgs.OldFrame
property · ActiveFrameChangedEventArgs · cAlgo.API
DesktopCLICloud
Returns the old / previous 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 OldFrame {get;}
activeFrameChangedEventArgs.OldFrame: Frame
Returns Frame
Examples
protected override void OnStart()
{
ChartManager.ActiveFrameChanged += OnActiveFrameChanged;
}
private void OnActiveFrameChanged(ActiveFrameChangedEventArgs args)
{
if (args.OldFrame != null)
Print("Previous active frame: {0}, index: {1}", args.OldFrame.Id, args.OldFrame.Index);
}
def on_start(self):
api.ChartManager.ActiveFrameChanged += self.on_active_frame_changed
def on_active_frame_changed(self, args):
if args.OldFrame is not None:
api.Print(f"Previous active frame: {args.OldFrame.Id}, index: {args.OldFrame.Index}")