---
id: "T:cAlgo.API.StopLossBreakEven"
kind: "record"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/"
---

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

# StopLossBreakEven (record)

Represents a break-even rule that moves the stop loss to the entry price (optionally offset by a number of pips) once the trade has moved a configured trigger distance in favor of the position.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class StopLossBreakEven
```

Available since cAlgo.API 5.8.

## Examples

C#:

```csharp
var breakEven = new StopLossBreakEven(15, 2);
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitLastProtection(40));
var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, "myLabel", new RelativeStopLossProtection(20), takeProfits, breakEven);
Print("Stop loss moves to entry + {0} pips after {1} pips: {2}", breakEven.Offset, breakEven.TriggerDistance, result.IsSuccessful);
```

Python:

```python
breakEven = StopLossBreakEven(15, 2)
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitLastProtection(40))
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "myLabel", RelativeStopLossProtection(20), takeProfits, breakEven)
api.Print(f"Stop loss moves to entry + {breakEven.Offset} pips after {breakEven.TriggerDistance} pips: {result.IsSuccessful}")
```

## Constructors

- `public StopLossBreakEven(double triggerDistance, double offset)` — Initializes a new instance of the StopLossBreakEven record. [details](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/index.md)
- `public StopLossBreakEven(StopLossBreakEven original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Constructor/index.md)

## Properties

- `public double Offset {get;}` — The offset in pips applied to the entry price when the stop loss is moved. [details](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/Offset/index.md)
- `public double TriggerDistance {get;}` — The distance in pips that activates the break-even rule. [details](https://help.ctrader.com/ctrader-algo/references/Trading/StopLossBreakEven/TriggerDistance/index.md)

