Merge branch 'develop' into backtest-export
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
# pragma pylint: disable=missing-docstring,W0212
|
||||
|
||||
import logging
|
||||
from typing import Tuple, Dict
|
||||
from typing import Dict, Tuple
|
||||
|
||||
import arrow
|
||||
from pandas import DataFrame, Series
|
||||
from tabulate import tabulate
|
||||
|
||||
import freqtrade.misc as misc
|
||||
import freqtrade.optimize as optimize
|
||||
from freqtrade import exchange
|
||||
from freqtrade.analyze import populate_buy_trend, populate_sell_trend
|
||||
from freqtrade.exchange import Bittrex
|
||||
from freqtrade.main import min_roi_reached
|
||||
import freqtrade.misc as misc
|
||||
from freqtrade.optimize import preprocess
|
||||
import freqtrade.optimize as optimize
|
||||
from freqtrade.persistence import Trade
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -93,15 +93,14 @@ def get_trade_entry(pair, row, ticker, trade_count_lock, args):
|
||||
if min_roi_reached(trade, row2.close, row2.date) or \
|
||||
(row2.sell == 1 and use_sell_signal) or \
|
||||
current_profit_percent <= stoploss:
|
||||
current_profit_btc = trade.calc_profit(rate=row2.close)
|
||||
|
||||
return row2.Index, (pair,
|
||||
current_profit_percent,
|
||||
current_profit_btc,
|
||||
row2.Index - row.Index,
|
||||
current_profit_btc > 0,
|
||||
current_profit_btc < 0
|
||||
)
|
||||
current_profit_btc = trade.calc_profit(rate=row2.close)
|
||||
return row2.Index, (pair,
|
||||
current_profit_percent,
|
||||
current_profit_btc,
|
||||
row2.Index - row.Index,
|
||||
current_profit_btc > 0,
|
||||
current_profit_btc < 0
|
||||
)
|
||||
|
||||
|
||||
def backtest(args) -> DataFrame:
|
||||
@@ -217,6 +216,6 @@ def start(args):
|
||||
'record': args.export
|
||||
})
|
||||
logger.info(
|
||||
'\n==================================== BACKTESTING REPORT ====================================\n%s', # noqa
|
||||
'\n==================================== BACKTESTING REPORT ====================================\n%s', # noqa
|
||||
generate_text_table(data, results, config['stake_currency'], args.ticker_interval)
|
||||
)
|
||||
|
Reference in New Issue
Block a user