Logs
Use logs to debug and analyze the behavior of your strategy.
Your strategy can easily generate log output by using the Log()
method. Log output appears in the backtest result page - if you are running a backtest - or the strategy detail page - if the strategy is deployed, below the charts section under the "Logs" tab.
Example
Let's say we have a strategy which triggers and action every single day:
Now let's say that we would like to output a "Hello world" message each time the registered action is triggered. We also would like to know what the date is in the log, so we will use the Market object to add time information into our log.
Now, when you run the backtest for two days, you will find two your logs in the backtest result page. You can identify your logs by the severity code set to DEBUG
.
Last updated