mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
change objective to emphasize shorter trades and include average profit
This commit is contained in:
parent
bbb2c7cf62
commit
1196983d5f
|
@ -76,7 +76,7 @@ def backtest(conf, pairs, mocker, buy_strategy):
|
|||
print_results(results)
|
||||
if len(results.index) < 800:
|
||||
return 100000 # return large number to "ignore" this result
|
||||
return results.duration.mean() / results.profit.sum() # the smaller the better
|
||||
return results.duration.mean() * results.duration.mean() / results.profit.sum() / results.profit.mean() # the smaller the better
|
||||
|
||||
def buy_strategy_generator(params):
|
||||
print(params)
|
||||
|
|
Loading…
Reference in New Issue
Block a user