Better Vest

Lift a lock early

The tilt guard and your own lock hold until their time is up or Vest’s day ends at 8 pm New York. That’s on purpose, so there’s no button to undo them. If you need one gone anyway, or it locked you by mistake, this lifts it.

To close a position you don’t need it: FLAT, 50%, your stops and Vest’s own close buttons always work while you’re locked.

How

  1. 1. Close every other Vest tab. If the copy trader is on, switch it off first: its Turbo tabs are Vest tabs too.
  2. 2. In the Vest tab that’s left, open Chrome’s console: Cmd+Option+J on a Mac, Ctrl+Shift+J on Windows.
  3. 3. If Chrome asks, type allow pasting and press Enter.
  4. 4. Copy the code below, paste it into the console and press Enter. It says what it lifted, then reloads the page.
Paste into the console of your Vest tab
(() => {
  const t = Date.now();
  const p = Object.fromEntries(new Intl.DateTimeFormat('en-US', { timeZone: 'America/New_York', hourCycle: 'h23', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit' }).formatToParts(new Date(t)).map((x) => [x.type, x.value]));
  const today = new Date(Date.UTC(+p.year, +p.month - 1, +p.day + (+p.hour >= 20 ? 1 : 0))).toISOString().slice(0, 10);
  const D = JSON.parse(localStorage.getItem('ax4p_dll') || '{}');
  const S = JSON.parse(localStorage.getItem('ax4p_settings') || '{}');
  const lifted = [];
  let loss = false, profit = false;
  for (const [id, r] of Object.entries(D)) {
    if (!r || typeof r !== 'object') continue;
    if (id === '*') {
      if ((r.manual && r.manual.until > t) || Object.values(r.accs || {}).some((m) => m && m.until > t)) lifted.push('your own lock');
      delete r.manual; delete r.accs;
      continue;
    }
    if (r.locked === true && r.key === today) { lifted.push('loss limit on account ' + id + ' (' + r.lockPnl + ')'); r.locked = false; delete r.lockPnl; loss = true; }
    if (r.plocked === true && r.key === today) { lifted.push('profit limit on account ' + id + ' (+' + r.plockPnl + ')'); delete r.plocked; delete r.plockPnl; profit = true; }
    if (r.cool && r.cool.until > t) { lifted.push('cooldown on account ' + id); delete r.cool; } // coolFrom stays: the tilt guard counts only new trades
  }
  S.dll = Object.assign({}, S.dll);
  if (loss) S.dll.on = false;
  if (profit) S.dll.pon = false;
  if (!lifted.length) return console.log('No lock found.');
  localStorage.setItem('ax4p_dll', JSON.stringify(D));
  localStorage.setItem('ax4p_settings', JSON.stringify(S));
  console.log('Lifted: ' + lifted.join(', ') + '.' + (loss ? ' Loss limit switched off.' : '') + (profit ? ' Profit limit switched off.' : '') + ' Reloading.');
  location.reload();
})();

What it does

  • It lifts every lock of today in this browser: the tilt guard’s cooldown and your own lock (and, before 9.9, the daily loss and profit limits).
  • It switches off a limit whose lock it lifts. Left on, the limit would see the same loss and lock you again a few seconds later. Turn it back on in Settings › Risk and limits after 8 pm New York.
  • It only changes Better Vest’s own saved settings in this browser, and sends nothing. Other browsers keep their own locks.
  • Only paste code you copied from this page, never code someone sends you.