Skip to content

Algorithm SDK

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;
function onTick() {
if (UNREALIZED_PROFIT > 100) {
closeAllPositions();
}
}