cleanup and fixed initial capital / commision / splippage
This commit is contained in:
parent
70da2c68e5
commit
d14380d740
19 changed files with 1344 additions and 33 deletions
|
|
@ -202,8 +202,9 @@ export abstract class BaseStrategy extends EventEmitter {
|
|||
}
|
||||
|
||||
protected getEquity(): number {
|
||||
// Simplified - in reality would calculate based on positions and market values
|
||||
return 100000 + this.performance.totalPnl; // Assuming 100k starting capital
|
||||
// Get initial capital from config parameters or default
|
||||
const initialCapital = this.config.parameters?.initialCapital || 100000;
|
||||
return initialCapital + this.performance.totalPnl;
|
||||
}
|
||||
|
||||
protected async signalToOrder(signal: Signal): Promise<OrderRequest | null> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue