Type/to search
Built-in Functions
Global
Log
Log
LogStatus
LogProfit
LogProfitReset
LogReset
LogVacuum
EnableLog
Chart
KLineChart
console.log
console.error
exchange.Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

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

NameDescription
LogOutputs logs.
LogStatusRefreshes 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…
LogProfitRecords and prints the profit/loss value, and plots the equity curve based on the profit/loss value.
LogProfitResetClear all profit logs and the profit chart.
LogResetClear the logs.
LogVacuumUsed to reclaim the storage space occupied by deleted data in SQLite after clearing logs with the LogReset() function.
EnableLogEnable or disable logging of order information.
ChartCustom chart plotting function.
KLineChartThis function is used to perform custom drawing while a strategy is running, using a drawing approach similar to the Pine language.
console.logUsed to output debug information in the "Debug Info" section of the live trading page.
console.errorUsed to output error messages in the "Debug Information" section of the live trading page.
exchange.LogOutputs order placement and cancellation logs in the log column area.