Skip to content

Frame

interface cAlgo.API

DesktopCLICloud

Base interface for chart frames.

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 interface Frame

Namespace: cAlgo.API · Group: Chart

Examples

foreach (var frame in ChartManager)
{
    if (frame is ChartFrame chartFrame)
        Print("Chart frame {0}: {1} {2}", frame.Id, chartFrame.Symbol.Name, chartFrame.TimeFrame);
    else if (frame is CustomFrame)
        Print("Custom frame {0}, size {1}x{2}", frame.Id, frame.Width, frame.Height);
}
for frame in api.ChartManager:
    if isinstance(frame.__implementation__, ChartFrame):
        chartFrame = ChartFrame(frame)
        api.Print(f"Chart frame {frame.Id}: {chartFrame.Symbol.Name} {chartFrame.TimeFrame}")
    elif isinstance(frame.__implementation__, CustomFrame):
        api.Print(f"Custom frame {frame.Id}, size {frame.Width}x{frame.Height}")

Methods

Name Description
ActivateDesktopCLICloudvoid Brings the chart frame to the front.
Attach 2 overloadsDesktopCLICloudbool Attaches frame to main chart container.
DetachDesktopCLICloudbool Detaches frame from it is chart container.

Properties

Name Description
ChartContainerDesktopCLICloudChartContainer Returns frame container.
HeightDesktopCLIClouddouble Returns current height of frame.
IdDesktopCLICloudstring Returns frame Id.
IndexDesktopCLICloudint Get / set frame index in container.
IsAttachedDesktopCLICloudbool Returns true if frame is attached otherwise false.
WidthDesktopCLIClouddouble Returns current width of frame.

Events

Name Description
AttachedDesktopCLICloudAction<FrameAttachedEventArgs> Occurs when frame is attached.
ContainerChangedDesktopCLICloudAction<FrameContainerChangedEventArgs> Occurs when frame container is changed.
DetachedDesktopCLICloudAction<FrameDetachedEventArgs> Occurs when frame is detached.
SizeChangedDesktopCLICloudAction<FrameSizeChangedEventArgs> Occurs when frame size changes.

See also