---
id: "P:cAlgo.API.BacktestingCompletedEventArgs.HtmlReport"
kind: "property"
type: "T:cAlgo.API.BacktestingCompletedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/HtmlReport/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# BacktestingCompletedEventArgs.HtmlReport

Member of [BacktestingCompletedEventArgs](https://help.ctrader.com/ctrader-algo/references/Plugin/Backtesting/BacktestingCompletedEventArgs/index.md).

## HtmlReport

Gets the HTML report of the backtesting results.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public string HtmlReport {get;}
```

Python:

```python
backtestingCompletedEventArgs.HtmlReport: str
```

### Returns

`string` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Backtesting.Completed += OnBacktestingCompleted;
}

private void OnBacktestingCompleted(BacktestingCompletedEventArgs args)
{
    if (args.HtmlReport == null)
        return;
    var customFrame = ChartManager.AddCustomFrame("Backtesting Report");
    var webView = new WebView();
    webView.Loaded += _ => webView.NavigateToStringAsync(args.HtmlReport);
    customFrame.Child = webView;
}
```

Python:

```python
def on_start(self):
    api.Backtesting.Completed += self.on_backtesting_completed

def on_backtesting_completed(self, args):
    if args.HtmlReport is not None:
        api.Print(f"HTML report length: {len(args.HtmlReport)}")
```

