> ## 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.

# Advanced Examples

> Complex trading ideas using multi-timeframe logic, conditional risk, and advanced exits.

## How to use these examples

These examples are **not meant to be copied blindly**.

They demonstrate:

* layered logic
* conditional behavior
* realistic strategy constraints
* how experienced traders think in systems

<Warning>
  Advanced strategies are harder to debug. Always validate behavior step by step.
</Warning>

***

## Example 1: Multi-timeframe trend + entry + exit

**Trading idea:**

```text theme={null}
Trade BTC/USDT on the 15m timeframe.
Only trade long when the 4h trend is bullish.
Define bullish trend as EMA(50) above EMA(200) on 4h.
Go long on 15m when EMA(20) crosses above EMA(50).
Exit with a 5% take profit and a 1% stop loss.
```

**What this demonstrates:**

* explicit higher-timeframe trend definition
* lower-timeframe execution
* clear separation of filters vs entries

***

## Example 2: Conditional exits based on volatility

**Trading idea:**

```text theme={null}
Trade ETH/USDT on 1h.
Go long when RSI(14) crosses above 50.
If volatility is high, use a 4% take profit.
If volatility is low, use a 7% take profit.
Always use a 1.2% stop loss.
```

**What this demonstrates:**

* conditional exit logic
* context-aware risk behavior
* adaptive strategy structure

<Info>
  Conditional logic increases flexibility but also complexity.
</Info>

***

## Example 3: Regime-based strategy switching

**Trading idea:**

```text theme={null}
Trade BTC/USDT on 1h.
If market is trending:
- go long on EMA(20)/EMA(50) crossovers.
If market is ranging:
- trade RSI(14) mean reversion.
Use a 5% take profit and a 1% stop loss in both regimes.
```

**What this demonstrates:**

* regime detection
* branching strategy logic
* multiple entry systems in one strategy

<Warning>
  Regime definitions must be explicit to avoid ambiguity.
</Warning>

***

## Example 4: Time + exposure constrained system

**Trading idea:**

```text theme={null}
Trade ETH on 1h.
Only trade during the London session.
Allow a maximum of one open trade at a time.
Go long when EMA(20) crosses above EMA(50).
Exit with a 6% take profit or after 12 hours, whichever comes first.
```

**What this demonstrates:**

* exposure limits
* time-based exits
* operational constraints

***

## Example 5: Asymmetric long and short logic

**Trading idea:**

```text theme={null}
Trade BTC/USDT on 4h.
Go long when RSI(14) crosses above 55 with a 6% TP and 1% SL.
Go short when RSI(14) crosses below 45 with a 4% TP and 1.5% SL.
```

**What this demonstrates:**

* asymmetric risk profiles
* direction-specific behavior
* realistic discretionary logic

***

## Common advanced pitfalls

<AccordionGroup>
  <Accordion title="Too many conditions interacting">
    If behavior becomes unclear, break the strategy into simpler parts and test them independently.
  </Accordion>

  <Accordion title="Hidden assumptions in regime logic">
    Always define how a regime is detected - never rely on intuition alone.
  </Accordion>

  <Accordion title="Overfitting complex logic">
    More logic does not guarantee robustness.
  </Accordion>
</AccordionGroup>

***

## How to work with advanced ideas

Best practices:

* build the strategy incrementally
* validate each layer independently
* inspect trades, not just metrics
* compare against simpler baselines

<Card title="Strategy structure overview" icon="diagram-project" href="/strategy-structure/overview" horizontal>
  See how complex ideas are represented internally.
</Card>

***

## What to read next

<CardGroup cols={2}>
  <Card title="Strategy structure overview" icon="diagram-project" href="/strategy-structure/overview">
    Understand the formal strategy model.
  </Card>

  <Card title="Backtesting metrics" icon="chart-line" href="/backtesting/metrics-overview">
    Learn how to evaluate complex strategies.
  </Card>

  <Card title="Iteration & optimization" icon="sliders" href="/iteration-optimization/improving-a-strategy">
    Improve without overfitting.
  </Card>

  <Card title="Intermediate examples" icon="layer-group" href="/writing-ideas/examples-intermediate">
    Step back if needed.
  </Card>
</CardGroup>

<Note>
  Advanced strategies amplify both skill and mistakes.
  Clarity is your best risk control.
</Note>
