mirror of
https://github.com/lukewilson2002/autotrader.git
synced 2025-06-15 00:13:51 +00:00
Quick fixes
This commit is contained in:
parent
5ee2df12b5
commit
d755f07d38
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user