Skip to content

Your account balance, in your account currency. It changes when a position closes, not while one is open.

declare const BALANCE: number;

In a backtest it starts at the balance you set and moves with the backtest’s closed positions.

function onIntervalClose() {
if (BALANCE < 500) {
error("Balance below 500: stopping");
}
}