update
This commit is contained in:
parent
8588eb9720
commit
c01cae412f
3 changed files with 43 additions and 8 deletions
|
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue