fix: Don't round date up to next date
it'll cause a record in the future eventually.
This commit is contained in:
@@ -6,7 +6,6 @@ import pandas as pd
|
|||||||
|
|
||||||
from freqtrade.constants import IntOrInf
|
from freqtrade.constants import IntOrInf
|
||||||
from freqtrade.exchange.exchange_utils_timeframe import (
|
from freqtrade.exchange.exchange_utils_timeframe import (
|
||||||
timeframe_to_next_date,
|
|
||||||
timeframe_to_prev_date,
|
timeframe_to_prev_date,
|
||||||
timeframe_to_resample_freq,
|
timeframe_to_resample_freq,
|
||||||
)
|
)
|
||||||
@@ -81,7 +80,7 @@ def balance_distribution_over_time(
|
|||||||
Each column will contain the amount of the currency at the given time
|
Each column will contain the amount of the currency at the given time
|
||||||
"""
|
"""
|
||||||
min_date_res = timeframe_to_prev_date(timeframe, min_date)
|
min_date_res = timeframe_to_prev_date(timeframe, min_date)
|
||||||
max_date_res = timeframe_to_next_date(timeframe, max_date)
|
max_date_res = timeframe_to_prev_date(timeframe, max_date)
|
||||||
index = pd.date_range(min_date_res, max_date_res, freq=timeframe_to_resample_freq(timeframe))
|
index = pd.date_range(min_date_res, max_date_res, freq=timeframe_to_resample_freq(timeframe))
|
||||||
df = pd.DataFrame(index=index)
|
df = pd.DataFrame(index=index)
|
||||||
df[stake_currency] = float(start_balance)
|
df[stake_currency] = float(start_balance)
|
||||||
|
|||||||
Reference in New Issue
Block a user