feat: Pair-Typ um Trump-Universum erweitert (LINK/AAVE/ONDO/ENA/SUI/SEI)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 07:44:17 +00:00
parent 896a29bd04
commit 713f4efc3c
6 changed files with 19 additions and 9 deletions

View File

@@ -82,7 +82,7 @@ export function processCycle(
}
return { pair, c4h, ind: computeIndicators(c4h, cfg.params), next4h };
});
const byPair = new Map(contexts.map((c) => [c.pair, c]));
const byPair = new Map<Pair, (typeof contexts)[number]>(contexts.map((c) => [c.pair, c]));
const timeline: { ts: number; pair: Pair; candle: Candle }[] = [];
for (const ctx of contexts) {
@@ -90,7 +90,7 @@ export function processCycle(
if (candle.ts > state.cursorTs) timeline.push({ ts: candle.ts, pair: ctx.pair, candle });
}
}
timeline.sort((a, b) => a.ts - b.ts || PAIRS.indexOf(a.pair) - PAIRS.indexOf(b.pair));
timeline.sort((a, b) => a.ts - b.ts || PAIRS.indexOf(a.pair as (typeof PAIRS)[number]) - PAIRS.indexOf(b.pair as (typeof PAIRS)[number]));
let cursorTs = state.cursorTs;
let lastEquityBucket = -1;