Skip to content

ChartManager.AddCustomFrame

method · ChartManager · cAlgo.API

DesktopCLICloud

Adds a new custom frame to main chart container.

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.

Overloads

Signature Description
AddCustomFrame(string title) Adds a new custom frame to main chart container.
AddCustomFrame(string title, ChartContainer targetChartContainer) Adds a new custom frame to target chart container.

AddCustomFrame(string title)

Adds a new custom frame to main chart container.

CustomFrame AddCustomFrame(string title)
api.ChartManager.AddCustomFrame(title: str) -> CustomFrame

Parameters

Name C# type Python type Description
title string str Custom frame title.

Returns CustomFrame — Returns newly added custom frame.

Examples

var customFrame = ChartManager.AddCustomFrame("Account Summary");
customFrame.Child = new TextBlock { Text = $"Balance: {Account.Balance}", Margin = 10 };
customFrame = api.ChartManager.AddCustomFrame("Account Summary")
textBlock = TextBlock()
textBlock.Text = f"Balance: {api.Account.Balance}"
textBlock.Margin = Thickness(10)
customFrame.Child = textBlock

AddCustomFrame(string title, ChartContainer targetChartContainer)

Adds a new custom frame to target chart container.

CustomFrame AddCustomFrame(string title, ChartContainer targetChartContainer)
api.ChartManager.AddCustomFrame(title: str, targetChartContainer: ChartContainer) -> CustomFrame

Parameters

Name C# type Python type Description
title string str Custom frame title.
targetChartContainer ChartContainer ChartContainer Target chart container

Returns CustomFrame — Returns newly added custom frame.

Examples

var chartFrame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
chartFrame.Detach();
var customFrame = ChartManager.AddCustomFrame("Notes", chartFrame.ChartContainer);
customFrame.Child = new TextBox { Text = "Write your EURUSD notes here" };
chartFrame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
chartFrame.Detach()
customFrame = api.ChartManager.AddCustomFrame("Notes", chartFrame.ChartContainer)
textBox = TextBox()
textBox.Text = "Write your EURUSD notes here"
customFrame.Child = textBox