Stop loss

Updated

A stop loss is an order that closes a position when the price reaches a level you set in advance. It answers one question before the trade opens: at what price is this idea wrong? For a long position the stop sits below the entry; for a short position it sits above.

How it works

When the price touches the stop level, the stop order triggers and the position is closed, usually at market. In a fast or gapping market the fill can be worse than the stop price; that difference is slippage. Stops can trigger on the last traded price, the mark price or the index price, depending on the exchange and your settings.

The distance between the entry and the stop is the trade's risk, often called R. Position size is best chosen from that distance, so that a stopped-out trade loses an amount you have decided on beforehand.

Why it matters for bots

A bot without a stop loss can hold a losing position indefinitely. On Algonney a stop loss is required: a strategy cannot be saved without one, and when a position opens, its stop is placed on the exchange before anything else. Because it lives on the exchange, the stop keeps protecting the position even while the platform is offline. On futures, the stop must also sit inside the liquidation price.

A stop can be a percent from the entry, a fixed price, or a level from the chart, such as the low of the signal candle.

Related: take profit, trailing stop, Automated crypto trading bots and Crypto risk management.