Node reference

Unrealized PnL

Open profit/loss of the current position.

Rev. 2026.06

Unrealized PnLstate
No inputsOutputs
Unrealized PnL
PnL
main · number
Configure
side
— Which book to read — net, long, or short
default net

What it does

The not-yet-realized P&L of the position you currently hold.

What happens

Read from the engine's live execution context each candle — it reflects the current run (position, equity, time, trade history), not a computed indicator.

When to use

Trailing exits and profit-based gates.

Gotchas

  • Combines both books by default; set side for one.