Stop Loss
The Stop Loss node computes the price level at which an open long position should be exited to limit downside. It supports four calculation modes — percentage, fixed amount, pips, and money risk — and produces a per-bar stop price series suitable for chart overlay and strategy execution.
Calculation Modes
close × (1 − stopLossPercent / 100)Most common mode. Stop floats proportionally to price — useful for equities and crypto. Parameters: stopLossPercent
close − fixedAmountSubtract a constant price from entry. Good when the stop distance is known from chart structure. Parameters: fixedAmount
close − pips × pipSizeForex-native mode. Stop = entry minus N pips. Default pipSize = 0.0001 (4-decimal pairs). Parameters: pips, pipSize
close − moneyRisk / positionSizeSpecify the exact dollar loss tolerance. Stop distance = moneyRisk ÷ position size. Parameters: moneyRisk, positionSize
Parameters
| Name | Default | Active in mode | Description |
|---|---|---|---|
| stopType | 'percentage' | all | Selects the calculation mode: 'percentage', 'fixed', 'pips', or 'money'. |
| stopLossPercent | 2.0 | percentage | % below entry price. Also exposed in the output for downstream reference. |
| fixedAmount | 0 | fixed | Constant price offset subtracted from entry. |
| pips | 20 | pips | Number of pips below entry. |
| pipSize | 0.0001 | pips | Price value of one pip. 0.0001 for 4-decimal forex pairs; 0.01 for JPY pairs. |
| moneyRisk | 100 | money | Maximum dollar loss per trade. |
| positionSize | 100 | money | Number of units held. Used to convert moneyRisk to a per-unit price distance. |
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | (number | null)[] | Close price series (entry prices). |
| Outputs | ||
| stopLossPrice | number | null | Stop price at the most recent bar. |
| stopLossPercent | number | The configured percentage (mirrored for downstream nodes). |
| stopType | string | Active mode name. |
| values | (number | null)[] | Per-bar stop loss price series. Chartable as a lower band overlay. |
| timestamps | number[] | UNIX ms timestamps. |