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

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

# BacktestingProcess.MonteCarloJsonReport

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

## MonteCarloJsonReport

Gets the Monte Carlo simulation result as JSON, which is the same snapshot that is written to the output file of the MonteCarlo settings. Returns null when no Monte Carlo simulation was configured, when the backtesting is not finished, when the backtest produced no trades, or when an error occurred.

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
string MonteCarloJsonReport {get;}
```

Python:

```python
backtestingProcess.MonteCarloJsonReport: str
```

### Returns

`string` — 

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
if (AlgoRegistry.Get("Sample Trend cBot", AlgoKind.Robot) is not RobotType robotType)
    return;
var settings = new BacktestingSettings
{
    StartTimeUtc = new DateTime(2025, 1, 1),
    EndTimeUtc = new DateTime(2025, 2, 1),
    Balance = 10000,
    MonteCarlo = new MonteCarloSettings(MonteCarloMethod.Reshuffle, @"C:\Temp\montecarlo-result.json")
};
var process = Backtesting.Start(robotType, "EURUSD", TimeFrame.Hour, settings);
process.Completed += args => Print("Monte Carlo result: {0}", args.Process.MonteCarloJsonReport);
```

Python:

```python
from System import DateTime
algoType = api.AlgoRegistry.Get("Sample Trend cBot", AlgoKind.Robot)
if algoType is None:
    return
settings = BacktestingSettings()
settings.StartTimeUtc = DateTime(2025, 1, 1)
settings.EndTimeUtc = DateTime(2025, 2, 1)
settings.Balance = 10000
settings.MonteCarlo = MonteCarloSettings(MonteCarloMethod.Reshuffle, r"C:\Temp\montecarlo-result.json")
process = api.Backtesting.Start(RobotType(algoType), "EURUSD", TimeFrame.Hour, settings)
process.Completed += lambda args: api.Print(f"Monte Carlo result: {args.Process.MonteCarloJsonReport}")
```

