Plugin.Print
method · Plugin · cAlgo.API
DesktopCLICloud
Prints text representation of the specified object to the log.
Environment behaviour
CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.
Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.
Overloads
| Signature | Description |
|---|---|
Print(object value) | Prints text representation of the specified object to the log. |
Print(object[] parameters) | Prints a message to the Log |
Print(string message, object[] parameters) | Prints a message to the Log. |
Print(object value)
Prints text representation of the specified object to the log.
public void Print(object value)
api.Print(value: object) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
value | object | object | Object to print. |
Examples
Print(Positions.Count);
api.Print(api.Positions.Count)
Print(object[] parameters)
Prints a message to the Log
public void Print(object[] parameters)
api.Print(parameters: list[object]) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
parameters | object[] | list[object] | Parameters to print |
Examples
Print(Account.Balance, " ", Account.Equity);
api.Print(api.Account.Balance, " ", api.Account.Equity)
Print(string message, object[] parameters)
Prints a message to the Log.
public void Print(string message, object[] parameters)
api.Print(message: str, parameters: list[object]) -> None
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
message | string | str | Message to print. |
parameters | object[] | list[object] | Parameters (optional) |
Examples
Print("Current Balance is {0}, Equity is {1}.", Account.Balance, Account.Equity);
api.Print(f"Current Balance is {api.Account.Balance}, Equity is {api.Account.Equity}.")