reworked queue lib
This commit is contained in:
parent
629ba2b8d4
commit
c05a7413dc
34 changed files with 3887 additions and 861 deletions
|
|
@ -11,7 +11,6 @@
|
|||
"clean": "rimraf dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@stock-bot/data-frame": "*",
|
||||
"@stock-bot/event-bus": "*",
|
||||
"@stock-bot/logger": "*",
|
||||
"@stock-bot/utils": "*",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { EventEmitter } from 'eventemitter3';
|
||||
import { DataFrame } from '@stock-bot/data-frame';
|
||||
import { EventBus } from '@stock-bot/event-bus';
|
||||
import { getLogger } from '@stock-bot/logger';
|
||||
|
||||
|
|
@ -29,7 +28,6 @@ export interface TradingSignal {
|
|||
export interface StrategyContext {
|
||||
symbol: string;
|
||||
timeframe: string;
|
||||
data: DataFrame;
|
||||
indicators: Record<string, any>;
|
||||
position?: Position;
|
||||
portfolio: PortfolioSummary;
|
||||
|
|
@ -310,7 +308,6 @@ export class StrategyEngine extends EventEmitter {
|
|||
const context: StrategyContext = {
|
||||
symbol,
|
||||
timeframe: '1m', // TODO: Get from strategy config
|
||||
data: new DataFrame([data]), // TODO: Use historical data
|
||||
indicators: {},
|
||||
portfolio: {
|
||||
totalValue: 100000, // TODO: Get real portfolio data
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
"extends": "../../tsconfig.lib.json",
|
||||
"references": [
|
||||
{ "path": "../data-frame" },
|
||||
{ "path": "../event-bus" },
|
||||
{ "path": "../logger" },
|
||||
{ "path": "../utils" }
|
||||
]
|
||||
"references": [{ "path": "../event-bus" }, { "path": "../logger" }, { "path": "../utils" }]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue