Log
Write to the robot or backtest page: the log panel (Log, and trade logs with exchange.Log), the status bar (LogStatus), the profit curve (LogProfit) and custom charts (Chart, KLineChart).
Logs are stored in the robot database; long-running strategies keep it small with LogReset and LogVacuum. console.log and console.error only write to the debug panel, not the log panel.
In this sectionRead the whole section
| Name | Description |
| Log | Outputs logs. |
| LogStatus | Refreshes the status bar of a backtest or live trading page with text, tables, buttons or component objects with a type (KPI cards, charts, tabs and more); each… |
| LogProfit | Records and prints the profit/loss value, and plots the equity curve based on the profit/loss value. |
| LogProfitReset | Clear all profit logs and the profit chart. |
| LogReset | Clear the logs. |
| LogVacuum | Used to reclaim the storage space occupied by deleted data in SQLite after clearing logs with the LogReset() function. |
| EnableLog | Enable or disable logging of order information. |
| Chart | Custom chart plotting function. |
| KLineChart | This function is used to perform custom drawing while a strategy is running, using a drawing approach similar to the Pine language. |
| console.log | Used to output debug information in the "Debug Info" section of the live trading page. |
| console.error | Used to output error messages in the "Debug Information" section of the live trading page. |
| exchange.Log | Outputs order placement and cancellation logs in the log column area. |