Scale In
Scale In adds contracts or equity percentage to an existing open position when triggered by an upstream signal. Use it to pyramid into a trend as confirmation grows, or to average into a mean-reversion setup on successive pullbacks.
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 an add-to-position order is dispatched.
- 3
The order type (market, limit, stop) determines the fill mechanics. Limit and stop orders require the limitPrice parameter to be set.
- 4
Commission and slippage are applied independently of the original Open Position node settings.
Parameters
| Parameter | Default | Description |
|---|---|---|
| orderType | market | Order type for the additional fill: market, limit, or stop. |
| quantity | 1 | Number of contracts/shares to add. Ignored when usePercentOfEquity is true. |
| usePercentOfEquity | false | When true, the added quantity is derived from percentOfEquity. |
| percentOfEquity | 10 | Percent of current equity to add to the position. Active only when usePercentOfEquity is true. |
| limitPrice | null | Price target for limit and stop orders. Required when orderType is limit or stop. |
| commission | 0.1 | Per-add commission in account currency. |
| slippage | 0.05 | Slippage applied to the add-to-position fill price. |
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | signal | Trigger signal. Non-zero last value adds to the open position. |
| Outputs | ||
| triggered | boolean | true when the scale-in order was dispatched on the last tick. |
| lastSignalValue | number | null | The last non-null value read from the input. |
Use Cases
Trend pyramiding
Add 1 contract each time a new 20-day high is made. Wire a Highest-Value comparison node as the signal, increasing exposure only as the trend strengthens.
Pullback averaging
On a long position, add when RSI dips below 40 — averaging down into a mean-reversion setup while keeping the original stop in place.
Equity-proportional scaling
Enable usePercentOfEquity = true and percentOfEquity = 5 to add a consistent 5% risk slice each time the signal fires, regardless of absolute position size.