Main recent signal adapter that manages both backtest and live recent signal storage.
Features:
constructor();
enable: (() => (...args: any[]) => any) & ISingleshotClearable<() => (...args: any[]) => any>
Enables recent signal storage by subscribing to activePingSubject. Uses singleshot to ensure one-time subscription.
disable: () => void
Disables recent signal storage by unsubscribing from all emitters. Safe to call multiple times.
getLatestSignal: (symbol: string, context: { strategyName: string; exchangeName: string; frameName: string; }, when: Date) => Promise<IPublicSignalRow>
Retrieves the latest active signal for the given symbol and context.
Searches backtest storage first, then live storage.
Returns null if the stored signal's timestamp is greater than the requested when
(look-ahead bias protection).
getMinutesSinceLatestSignalCreated: (symbol: string, context: { strategyName: string; exchangeName: string; frameName: string; }, when: Date) => Promise<number>
Returns the number of whole minutes elapsed since the latest signal's creation timestamp.
Searches backtest storage first, then live storage.
when doubles as the look-ahead cutoff — a signal whose timestamp exceeds
when.getTime() is treated as not yet visible — and as the "now" against
which elapsed minutes are computed.