INNER CODE UNIT · JavaScript

dstEnd

dearvn/tradovate-trading-bot · agents/order-flow/index.js:55

  const dstEnd = nthSundayUTC(y, 10, 1); // November (month 10), 1st Sunday
  dstEnd.setUTCHours(6); // 02:00 ET = 06:00 UTC
  return now >= dstStart && now < dstEnd ? -4 : -5;
}

function nowET() {
  const now = new Date();
  const off = etOffsetHours(now);
  return new Date(now.getTime() + off * 3_600_000);
}

function etDateStr(et) {
  return `${et.getUTCFullYear()}-${String(et.getUTCMonth() + 1).padStart(2, '0')}-${String(et.getUTCDate()).padStart(2, '0')}`;
}

// ── Session phase ─────────────────────────────────────────────────────────────

function sessionPhase(etDate) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…