Service for logging partial profit/loss events to SQLite database.
Captures all partial position exit events (profit and loss levels) and stores them in the Report database for tracking partial closures.
Features:
constructor();
loggerService: any
Logger service for debug output
tickProfit: any
Processes partial profit events and logs them to the database.
tickLoss: any
Processes partial loss events and logs them to the database.
subscribe: (() => () => void) & ISingleshotClearable
Subscribes to partial profit/loss emitters to receive partial exit events. Protected against multiple subscriptions. Returns an unsubscribe function to stop receiving events.
unsubscribe: () => Promise<void>
Unsubscribes from partial profit/loss emitters to stop receiving events. Calls the unsubscribe function returned by subscribe(). If not subscribed, does nothing.