← All news
Simulator

Exit and risk blocks

Add an ATR trailing stop, a hard stop-loss or a take-profit in one click. A stop always fires, even if another filter is holding back sells.

Why it was added

Most Simulator filters only narrow when a strategy may buy. Exits were the gap: a trailing stop is measured from the highest price since entry, which cannot be expressed as a condition on top of an existing sell rule. These blocks add a closing rule of their own.

How to use it

  1. In the Simulator, build from a Basic template.
  2. Under Optional filters, open the Exit & risk category.
  3. Add ATR trailing stop, hard stop-loss or take-profit, and set their parameters.
  4. Backtest, and sweep the parameters if you want to see how sensitive the result is.
  5. Generate Pine Script and check it in TradingView before using it live.

When to use it

When you want a defined way out of a losing or fading position that the base template's own exit doesn't provide, or want to see what a stop does to a backtest's drawdown.

Risks and limits

  • A stop is part of the strategy, not the exchange. It only protects you live if the TradingView strategy sends the sell alert and the Autobot executes it.
  • Backtests fill at the next candle's open, so a real stop can fill at a worse price than the simulation shows, especially in fast markets.
  • Tighter stops exit more often and can cut positions that would have recovered. Looser stops allow bigger losses. The tool shows the trade-off on your data; it doesn't pick one.
  • A stop level tuned hard on past data can fit that data's quirks. Use the sweep's out-of-sample view and don't trust a single best combination.