Close Positions
Close or partially close one or more open trades. The Close Positions rule is a versatile tool for realising profits, cutting losses, and reducing exposure. You can close positions entirely or by a specified percentage, making it ideal for scaling out of winning trades or reducing risk when market conditions change. When a trade is partially closed, its associated stop loss and take profit orders are automatically adjusted to reflect the new position size.
How It Works
The Close Positions rule takes a list of trade IDs and a percentage value. For each trade in the list, it closes the specified percentage of the position. The behaviour depends on the percentage value:
- Full close (100%) — The entire position is closed, realising all profits or losses. Any associated take profit and stop loss orders are automatically cancelled since they are no longer needed.
- Partial close (less than 100%) — Only the specified portion of the position is closed. For example, if a trade has a size of 100 units and the percentage is set to 50%, then 50 units will be closed. The remaining 50 units stay open, and any associated take profit and stop loss orders are automatically adjusted to match the reduced position size.
This rule is essential for implementing sophisticated exit strategies. You can use it to take partial profits at predefined levels, reduce exposure ahead of high-impact news events, or cut losing positions before they reach the stop loss. By connecting it to various condition and filter rules on the canvas, you gain fine-grained control over when and how your positions are closed.
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
| Trade Id(s) | A list of trade IDs for the positions to be closed or partially closed. Connect this to the output of a Place Trades, Place Trade with Risk, or Trade Collector rule. | Yes | — |
| Percent | The percentage of each position to close. Set to 100 for a full close, or a lower value for a partial close (for example, 50 to close half the position). | No | 100 |
Outputs
This rule has no outputs. Once positions are closed (fully or partially), the action is complete. If you need to track which trades remain open after a partial close, use a Trade Collector or Trade Filter rule downstream.
Tips
Use partial closes to implement a scale-out profit-taking strategy. For example, close 50% of your position when the trade reaches a 1:1 risk-reward ratio, and let the remaining 50% run with a trailing stop loss. This approach locks in some profit while maintaining exposure to further favourable price movement. You can chain multiple Close Positions rules at different profit levels to create a multi-tiered exit plan, each triggered by a different condition on the canvas.
Was this helpful? Let us know