Scale Out
Scale Out reduces an open position by a fixed quantity or percentage when triggered. Use it to lock in partial profits at predetermined levels, reduce exposure as momentum slows, or de-risk progressively as the trade extends into potentially thin price territory.
How It Works
- 1
Connect a boolean or numeric signal. The node reads the last non-null value each tick.
- 2
When the value is non-zero and an open position exists, triggered is set to true and a reduce-position order is dispatched.
- 3
When usePercentOfPosition is true, the node closes percentOfPosition % of the current holding (e.g. 50 = close half). Otherwise it reduces by the fixed quantity value.
- 4
Commission and slippage are applied to each partial close independently.
Parameters
| Parameter | Default | Description |
|---|---|---|
| orderType | market | Order type for the partial close: market, limit, or stop. |
| usePercentOfPosition | true | When true, reduces by percentOfPosition % of the current holding. |
| percentOfPosition | 50 | Percent of the current position to close. Active only when usePercentOfPosition is true. |
| quantity | 1 | Number of contracts/shares to remove. Used when usePercentOfPosition is false. |
| limitPrice | null | Price target for limit and stop orders. Required when orderType is limit or stop. |
| commission | 0.1 | Per-partial-close commission in account currency. |
| slippage | 0.05 | Slippage applied to the partial close fill price. |
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | signal | Trigger signal. Non-zero last value reduces the open position. |
| Outputs | ||
| triggered | boolean | true when the scale-out order was dispatched on the last tick. |
| lastSignalValue | number | null | The last non-null value read from the input. |
Use Cases
Partial profit at 1R
Close 50% of a position when price reaches the 1R target, then let the remainder run with a trailing stop. Locks in profit while keeping upside exposure.
Tiered exit ladder
Chain multiple Scale Out nodes with different percentage thresholds. Fire the first at +1%, the second at +2%, and so on to exit in steps across a rising market.
Momentum fade exit
Wire an RSI divergence or volume drop signal to reduce exposure when momentum shows early signs of exhaustion, without fully exiting the trend.