This commit is contained in:
KienVT9 2025-07-16 23:12:09 +07:00
parent 8588eb9720
commit c01cae412f
3 changed files with 43 additions and 8 deletions

View file

@ -16,7 +16,7 @@ export type EventType = "HighVolatility" | "PinBar" | "EmaCross" | "MacdCross" |
export interface EventHandler {
onBuy: (candle: Order, reason: string) => void;
onSell: (candle: Order, reason: string) => void;
onEvent: (eventType: EventType, analysis: Analysis) => void;
onEvent: (eventType: EventType, {candle, analysis}: {candle: Candle, analysis: Analysis}) => void;
}
export class IndicatorService {
@ -302,7 +302,7 @@ export class IndicatorService {
}
if (analysis.isHighVolatility) {
eventHandler.onEvent("HighVolatility", analysis);
eventHandler.onEvent("HighVolatility", {candle: candles[0], analysis});
}
}