Frame.Attach
method · Frame · cAlgo.API
DesktopCLICloud
Attaches 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 |
|---|---|
Attach() | Attaches frame to main chart container. |
Attach(ChartContainer targetContainer) | Attaches frame to passed chart container. |
Attach()
Attaches frame to main chart container.
bool Attach()
frame.Attach() -> bool
Returns bool — True if successful otherwise false
Examples
var chartFrame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
chartFrame.Detach();
Print("Attached back to main container: {0}", chartFrame.Attach());
chartFrame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
chartFrame.Detach()
api.Print(f"Attached back to main container: {chartFrame.Attach()}")
Attach(ChartContainer targetContainer)
Attaches frame to passed chart container.
bool Attach(ChartContainer targetContainer)
frame.Attach(targetContainer: ChartContainer) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
targetContainer | ChartContainer | ChartContainer | Target chart container |
Returns bool — True if successful otherwise false
Examples
var firstFrame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
firstFrame.Detach();
var secondFrame = ChartManager.AddChartFrame("GBPUSD", TimeFrame.Hour);
Print("Moved to detached container: {0}", secondFrame.Attach(firstFrame.ChartContainer));
firstFrame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
firstFrame.Detach()
secondFrame = api.ChartManager.AddChartFrame("GBPUSD", TimeFrame.Hour)
api.Print(f"Moved to detached container: {secondFrame.Attach(firstFrame.ChartContainer)}")