Fixed MORE bugs

This commit is contained in:
Luke I. Wilson
2023-05-24 15:58:59 -05:00
parent 46fd55ab8d
commit b5434fb5de
10 changed files with 205 additions and 55 deletions

View File

@@ -36,7 +36,7 @@ func Backtest(trader *Trader) {
trader.Tick() // Allow the trader to process the current candlesticks.
broker.Advance() // Give the trader access to the next candlestick.
}
trader.closeOrdersAndPositions() // Close any outstanding trades now.
trader.CloseOrdersAndPositions() // Close any outstanding trades now.
log.Printf("Backtest completed on %d candles. Opening report...\n", trader.Stats().Dated.Len())
stats := trader.Stats()