backtest work
This commit is contained in:
parent
143e2e1678
commit
55b4ca78c9
6 changed files with 427 additions and 129 deletions
|
|
@ -121,6 +121,8 @@ export abstract class BaseStrategy extends EventEmitter {
|
|||
? currentPos + fill.quantity
|
||||
: currentPos - fill.quantity;
|
||||
|
||||
logger.info(`[BaseStrategy] Position update for ${update.symbol}: ${currentPos} -> ${newPos} (${update.side} ${fill.quantity})`);
|
||||
|
||||
if (Math.abs(newPos) < 0.0001) {
|
||||
this.positions.delete(update.symbol);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue