Title here
Summary here
[logging] groups the options that control logs during backtests, including where they are written and how much detail to keep. A strategy can declare only one [logging] block.
Note: When the CLI runs with --json, console logs are disabled automatically so stdout remains dedicated to the JSON payload. The CLI override takes precedence over the [logging] settings.
[logging]
file_logging_enabled = true
console_logging_enabled = true
objective_limit = 1
include_trades = true| Parameter | Description |
|---|---|
file_logging_enabledBoolean Optional | Enables writing to a log file. Default value: false |
console_logging_enabledBoolean Optional | Enables console message output. Default value: true |
timestamp_enabledBoolean Optional | Enables the timestamp prefix at the beginning of each log line. When false, each line starts directly with the message level, for example [info] ....Default value: true |
estimated_time_display_minutesInteger Optional | Interval, in minutes, between estimated time remaining updates in grid progress logs; set 0 to disable.Default value: 5 |
logs_directoryText Optional | Absolute path to the directory where log files will be stored. The directory is created if it does not exist. Default value: <results_directory>/<strategy name> |
log_file_nameText Optional | Name of the log file. Default value: If not provided, a name is generated from the strategy name and the execution date. |
objective_limitInteger Optional | Maximum number of backtests to display for each objective. Default value: 1 |
include_tradesBoolean Optional | Displays the list of trades at the end of each backtest. Default value: false |
include_all_grid_parametersBoolean Optional | Logs every grid parameter, even when its range does not vary. When false, only grid parameters that vary are logged.Default value: false |
include_all_hyperparametersBoolean Optional | Logs every hyperparameter, even when its range does not vary. When false, only hyperparameters that vary are logged.Default value: false |
include_block_usageBoolean Optional | Includes the number of times each conditional block is executed. The counts are displayed in the final log. Default value: false |
trades_oldest_firstBoolean Optional | Orders the “List of trades” table from the oldest to the newest when true. When false, orders it from the newest to the oldest to match TradingView ordering. This option only has an effect when include_trades is set to true.Default value: false |
include_strategy_tomlBoolean Optional | When true, appends a verbatim copy of the loaded strategy TOML at the very end of the logs. Useful for archiving or reproducing runs. When false, the TOML is not printed.Default value: false |