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

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

# MonteCarloSettings.RuinFloor

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

## RuinFloor

Gets the equity level that is treated as account ruin. The risk of ruin is the share of the simulations whose equity drops to or below this level. It must be greater than or equal to 0 and the default value is 0.

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 double RuinFloor {get; set;}
```

Python:

```python
monteCarloSettings.RuinFloor: float
```

### Returns

`double` — 

Available since cAlgo.API 5.10.

### Examples

C#:

```csharp
var monteCarlo = new MonteCarloSettings(MonteCarloMethod.Bootstrap, @"C:\Temp\montecarlo-result.json") { RuinFloor = 5000 };
Print("Account ruin level: {0}", monteCarlo.RuinFloor);
```

Python:

```python
monteCarlo = MonteCarloSettings(MonteCarloMethod.Bootstrap, r"C:\Temp\montecarlo-result.json")
monteCarlo.RuinFloor = 5000
api.Print(f"Account ruin level: {monteCarlo.RuinFloor}")
```

