Skip to content

FrameAttachedEventArgs.Frame

property · FrameAttachedEventArgs · 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;}
frameAttachedEventArgs.Frame: Frame

Returns Frame

Examples

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

private void OnFrameAttached(FrameAttachedEventArgs args)
{
    Print("Frame {0} attached: {1}, index: {2}", args.Frame.Id, args.Frame.IsAttached, args.Frame.Index);
}
def on_start(self):
    frame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
    frame.Attached += self.on_frame_attached

def on_frame_attached(self, args):
    api.Print(f"Frame {args.Frame.Id} attached: {args.Frame.IsAttached}, index: {args.Frame.Index}")