@@ -46,10 +46,16 @@ def merge_informative_pair(dataframe: pd.DataFrame, informative: pd.DataFrame,
|
|||||||
# Subtract "small" timeframe so merging is not delayed by 1 small candle
|
# Subtract "small" timeframe so merging is not delayed by 1 small candle
|
||||||
# Detailed explanation in https://github.com/freqtrade/freqtrade/issues/4073
|
# Detailed explanation in https://github.com/freqtrade/freqtrade/issues/4073
|
||||||
if not informative.empty:
|
if not informative.empty:
|
||||||
informative['date_merge'] = (
|
if timeframe_inf == '1M':
|
||||||
informative[date_column] + pd.to_timedelta(minutes_inf, 'm') -
|
informative['date_merge'] = (
|
||||||
pd.to_timedelta(minutes, 'm')
|
(informative[date_column] + pd.offsets.MonthBegin(1))
|
||||||
)
|
- pd.to_timedelta(minutes, 'm')
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
informative['date_merge'] = (
|
||||||
|
informative[date_column] + pd.to_timedelta(minutes_inf, 'm') -
|
||||||
|
pd.to_timedelta(minutes, 'm')
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
informative['date_merge'] = informative[date_column]
|
informative['date_merge'] = informative[date_column]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user