---
id: "M:cAlgo.API.Internals.Symbol.PipsForProportionalRisk(cAlgo.API.ProportionalAmountType,System.Double,System.Double)"
kind: "method"
type: "T:cAlgo.API.Internals.Symbol"
url: "https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/PipsForProportionalRisk/"
---

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

# Symbol.PipsForProportionalRisk

Member of [Symbol](https://help.ctrader.com/ctrader-algo/references/MarketData/Symbols/Symbol/index.md).

## PipsForProportionalRisk(ProportionalAmountType type, double percentage, double volume)

Calculates the stop loss (in pips) for the proportional amount to be risked based on the specified volume. Note that the result of this calculation may be imprecise as the exact degree of risk always depends on market movement and is impossible to predict.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
double PipsForProportionalRisk(ProportionalAmountType type, double percentage, double volume)
```

Python:

```python
api.Symbol.PipsForProportionalRisk(type: ProportionalAmountType, percentage: float, volume: float) -> float
```

### Parameters

- `type` (`ProportionalAmountType`, Python `ProportionalAmountType`): The type of the amount to be risked (either balance or equity).
- `percentage` (`double`, Python `float`): The percentage of equity or balance to be risked.
- `volume` (`double`, Python `float`): The volume to be traded.

### Returns

`double` — The calculated stop loss in pips.

### Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

public partial class TestExample : Robot
{
    protected override void OnStart()
    {
        var tradeVolume = Symbol.VolumeInUnitsMin;
        var riskPercentage = 1;

        var stopLossInPips = Symbol.PipsForProportionalRisk(ProportionalAmountType.Equity, riskPercentage, tradeVolume);

        Print($"If you trade {tradeVolume} with a risk of losing {riskPercentage}% of your account equity you should use {stopLossInPips} Pips as your StopLoss");
    }
}
```

Python:

```python
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *

# Import trading wrapper functions
from robot_wrapper import *

class Test():
    def on_start(self):
        tradeVolume = api.Symbol.VolumeInUnitsMin
        riskPercentage = 1
        stopLossInPips = api.Symbol.PipsForProportionalRisk(ProportionalAmountType.Equity, riskPercentage, tradeVolume)
        print(f"If you trade {tradeVolume} with a risk of losing {riskPercentage}% of your account equity you should use {stopLossInPips} Pips as your StopLoss")
```

config.json:

```json
{
  "AccessRights": "None"
}
```

