---
id: "M:cAlgo.API.AbsoluteStopLossProtection.#ctor(System.Double)"
kind: "constructor"
type: "T:cAlgo.API.AbsoluteStopLossProtection"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/Constructor/"
---

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

# AbsoluteStopLossProtection constructor

Member of [AbsoluteStopLossProtection](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteStopLossProtection/index.md).

## AbsoluteStopLossProtection(double Price)

Represents a stop loss defined at an absolute price level.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public AbsoluteStopLossProtection(double Price)
```

Python:

```python
AbsoluteStopLossProtection(Price: float)
```

### Parameters

- `Price` (`double`, Python `float`): The absolute price at which the stop loss is triggered.

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null && position.TradeType == TradeType.Buy)
{
    var pipSize = position.Symbol.PipSize;
    var takeProfits = new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));
    var result = ModifyPosition(position, new AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits);
    Print("Stop loss set at {0}: {1}", position.EntryPrice - 20 * pipSize, result.IsSuccessful);
}
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None and position.TradeType == TradeType.Buy:
    pipSize = position.Symbol.PipSize
    takeProfits = AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))
    result = api.ModifyPosition(position, AbsoluteStopLossProtection(position.EntryPrice - 20 * pipSize), takeProfits)
    api.Print(f"Stop loss set at {position.EntryPrice - 20 * pipSize}: {result.IsSuccessful}")
```

## AbsoluteStopLossProtection(AbsoluteStopLossProtection original)



Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public AbsoluteStopLossProtection(AbsoluteStopLossProtection original)
```

Python:

```python
AbsoluteStopLossProtection(original: AbsoluteStopLossProtection)
```

### Parameters

- `original` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`):

Available since cAlgo.API 5.8.

