> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trinigence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Take Profit & Stop Loss

> How TP/SL works in Trinigence, how it interacts with exits, and how to write it clearly.

## What TP/SL is

Take profit (TP) and stop loss (SL) are the simplest and most common risk controls.

* **TP** defines where profits are realized
* **SL** defines where losses are cut

In Trinigence, TP/SL can be used as:

* primary exit logic
* part of exit logic alongside indicator exits
* a safety layer (when inferred or completed)

***

## TP/SL vs exit logic

TP/SL is a type of exit, but not the only one.

Exit logic can include:

* fixed TP/SL
* indicator-based exits
* time-based exits
* multiple combined

<Card title="Exit logic" icon="arrow-right-from-bracket" href="/strategy-structure/exit-logic" horizontal>
  See how all exit types work together.
</Card>

***

## Fixed percentage TP/SL (most common)

This is the default style traders use.

Examples:

```text theme={null}
Exit long with TP 6% and SL 1%.
Exit short with TP 5% and SL 1%.
```

Best practice:

* state TP and SL explicitly
* specify direction if asymmetric
* keep values realistic for timeframe

***

## Price-based TP/SL (when needed)

Some strategies define TP/SL relative to price levels.

Examples:

```text theme={null}
Set stop loss at the previous swing low.
Take profit at the previous resistance level.
```

<Info>
  Price-based exits must be expressed in a deterministic way to be backtestable.
</Info>

***

## Combining TP/SL with indicator exits

Many strategies use TP/SL as protection, but exit by logic.

Example:

```text theme={null}
Exit long when RSI crosses below 50,
but also enforce a 1% stop loss and 5% take profit.
```

How it works:

* multiple exits can exist
* the first exit condition met closes the trade

***

## Direction-specific TP/SL

Long and short can have different profiles.

Example:

```text theme={null}
Long: TP 8%, SL 1%.
Short: TP 6%, SL 1.2%.
```

This is useful when:

* shorts move faster
* downside volatility differs
* market behavior is asymmetric

***

## Timeframe sensitivity

TP/SL values should match the timeframe volatility.

General guidance:

* lower timeframes → smaller TP/SL
* higher timeframes → larger TP/SL

<Warning>
  A 10% TP on 5m may never hit. A 0.2% SL on 4h may stop out constantly.
</Warning>

***

## Evaluation behavior (important)

By default, Trinigence evaluates strategy logic on candle close.
However, TP/SL is treated as **risk enforcement**.

That means:

* TP/SL is checked while the trade is open
* it can close trades earlier than indicator exits
* it prevents runaway losses

<Info>
  If you see trades exiting “before your indicator exit”, TP/SL is usually the reason.
</Info>

***

## Defaults and assumptions

If TP/SL is:

* explicitly defined → used exactly
* partially defined → ATI completes conservatively
* missing → ATI may suggest safe defaults

<Card title="What Trinigence fills automatically" icon="robot" href="/writing-ideas/what-trinigence-fills-automatically" horizontal>
  See what happens when risk rules are not fully specified.
</Card>

***

## Common mistakes

<AccordionGroup>
  <Accordion title="Only defining TP, not SL">
    Strategies without SL can look great until one tail event wipes the curve.
  </Accordion>

  <Accordion title="TP/SL too tight for the timeframe">
    Tight stops on high timeframes often create constant stop-outs.
  </Accordion>

  <Accordion title="Conflicting exits">
    Multiple exits can cause surprises if not understood.
  </Accordion>

  <Accordion title="Assuming TP/SL is “optional”">
    It may be optional structurally, but it's rarely optional in practice.
  </Accordion>
</AccordionGroup>

***

## Best practices

* Always define SL
* Keep TP/SL realistic for timeframe volatility
* Use TP/SL as protection even if exits are indicator-based
* Validate the biggest wins and biggest losses

<Card title="Risk management" icon="shield-halved" href="/strategy-structure/risk-management" horizontal>
  See how TP/SL fits into the broader risk layer.
</Card>

***

## What to read next

<CardGroup cols={2}>
  <Card title="Risk management" icon="shield-halved" href="/strategy-structure/risk-management">
    The complete risk layer.
  </Card>

  <Card title="Exit logic" icon="arrow-right-from-bracket" href="/strategy-structure/exit-logic">
    TP/SL as one exit type.
  </Card>

  <Card title="Common pitfalls" icon="triangle-exclamation" href="/backtesting/common-pitfalls">
    TP/SL mistakes that mislead backtests.
  </Card>

  <Card title="Metrics explained" icon="chart-column" href="/backtesting/metrics-explained">
    See how TP/SL affects metrics.
  </Card>
</CardGroup>

<Note>
  A strategy without stop loss is not a strategy - it’s hope.
</Note>
