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

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

# Symbol.PipsForFixedRisk

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

## PipsForFixedRisk(double amount, double volume)

Calculates the number of pips to be risked based on the specified stop loss and trading 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 PipsForFixedRisk(double amount, double volume)
```

Python:

```python
api.Symbol.PipsForFixedRisk(amount: float, volume: float) -> float
```

### Parameters

- `amount` (`double`, Python `float`): The amount to be risked.
- `volume` (`double`, Python `float`): The volume to be traded.

### Returns

`double` — The calculated volume in units.

### Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo.Robots;

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

        var stopLossInPips = Symbol.PipsForFixedRisk(amountRisked, tradeVolume);

        Print($"If you trade {tradeVolume} with a risk of losing {amountRisked} {Account.Asset.Name} 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
        amountRisked = 100
        stopLossInPips = api.Symbol.PipsForFixedRisk(amountRisked, tradeVolume)
        print(f"If you trade {tradeVolume} with a risk of losing {amountRisked} {api.Account.Asset.Name} you should use {stopLossInPips} Pips as your StopLoss")
```

config.json:

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

