UNREALIZED_PROFIT
The profit or loss of your open positions if they closed now, in your account currency. Negative when they are losing.
declare const UNREALIZED_PROFIT: number;Example
Section titled “Example”function onTick() { if (UNREALIZED_PROFIT > 100) { closeAllPositions(); }}