mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Implement reloading of chart
This commit is contained in:
parent
e9478bfaab
commit
9a714cf082
|
@ -826,7 +826,13 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
break;
|
||||
case FtWsMessageTypes.newCandle:
|
||||
console.log('exitFill', msg);
|
||||
showAlert(`New Candle`, 'success');
|
||||
const [pair, timeframe] = msg.data.key;
|
||||
// TODO: check for active bot ...
|
||||
if (pair === this.selectedPair) {
|
||||
showAlert(`New Candle for ${pair}`, 'success');
|
||||
// Reload pair candles
|
||||
this.getPairCandles({ pair, timeframe, limit: 500 });
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Unhandled events ...
|
||||
|
@ -870,7 +876,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
FtWsMessageTypes.whitelist,
|
||||
FtWsMessageTypes.entryFill,
|
||||
FtWsMessageTypes.exitFill,
|
||||
// FtWsMessageTypes.newCandle,
|
||||
FtWsMessageTypes.newCandle,
|
||||
/*'new_candle' /*'analyzed_df'*/
|
||||
],
|
||||
}),
|
||||
|
|
|
@ -2,7 +2,7 @@ export enum FtWsMessageTypes {
|
|||
whitelist = 'whitelist',
|
||||
entryFill = 'entry_fill',
|
||||
exitFill = 'exit_fill',
|
||||
newCandle = 'newCandle',
|
||||
newCandle = 'new_candle',
|
||||
}
|
||||
|
||||
export interface FtBaseWsMessage {
|
||||
|
@ -29,8 +29,14 @@ export interface FtExitFillMessage extends FtBaseWsMessage {
|
|||
// ...
|
||||
}
|
||||
|
||||
export interface NewCandleMessage {
|
||||
/** Pair, timeframe, candletype*/
|
||||
key: [string, string, string];
|
||||
}
|
||||
|
||||
export interface FtNewCandleMessage extends FtBaseWsMessage {
|
||||
type: FtWsMessageTypes.newCandle;
|
||||
data: NewCandleMessage;
|
||||
// ...
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user