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

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

# AbsoluteTakeProfitLastProtection constructor

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

## AbsoluteTakeProfitLastProtection(double Price)

Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public AbsoluteTakeProfitLastProtection(double Price)
```

Python:

```python
AbsoluteTakeProfitLastProtection(Price: float)
```

### Parameters

- `Price` (`double`, Python `float`): The absolute price at which the remaining volume is closed.

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null && position.TradeType == TradeType.Buy)
{
    var targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize;
    var result = position.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));
    Print("Take profit set at {0}: {1}", targetPrice, result.IsSuccessful);
}
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None and position.TradeType == TradeType.Buy:
    targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize
    result = position.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))
    api.Print(f"Take profit set at {targetPrice}: {result.IsSuccessful}")
```

## AbsoluteTakeProfitLastProtection(AbsoluteTakeProfitLastProtection original)



Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public AbsoluteTakeProfitLastProtection(AbsoluteTakeProfitLastProtection original)
```

Python:

```python
AbsoluteTakeProfitLastProtection(original: AbsoluteTakeProfitLastProtection)
```

### Parameters

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

Available since cAlgo.API 5.8.

