Quick fixes

This commit is contained in:
Luke Wilson 2024-11-03 09:50:30 -06:00
parent 5ee2df12b5
commit d755f07d38
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ func Backtest(trader *Trader) {
}
})
profit := stats.Dated.Float("Profit", -1)
profitFactor := stats.Dated.Float("Profit", -1) / maxDrawdown
profitFactor := profit / maxDrawdown
maxDrawdownPct := 100 * maxDrawdown / stats.Dated.Float("Equity", 0)
// Print a summary of the statistics to the console.

View File

@ -38,7 +38,7 @@ type TradeStat struct {
Exit bool // Exit is true if the trade was to exit a previous position.
}
// Performance (financial) reporting and statistics.
// Financial performance reporting and statistics.
type TraderStats struct {
Dated *Frame
returnsThisCandle float64