Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resample_to_interval dataframe #60

Closed
Mixcoatl5 opened this issue Jan 19, 2020 · 2 comments · Fixed by #61
Closed

Resample_to_interval dataframe #60

Mixcoatl5 opened this issue Jan 19, 2020 · 2 comments · Fixed by #61

Comments

@Mixcoatl5
Copy link

Hey guys,
I have checked modification in code for resample_to_interval. I modified my code according to commits here: freqtrade/freqtrade-strategies#63 and here: #59.

When I backtested strategy and print out my resample_indicators (plus_di, minus_di and roc in my case) and then compare printed message with binance chart I get results shifted by one candle.
Let me explain in more details on print screens.
Btw I am resampling 1h to 1d candles by using dataframe_long = resample_to_interval(dataframe, 1440) – I hope I got this right.

Here is a printed table from backtesting:
resampled

And here is print screened chart of the same coin on 1d timeframe from binance:
LTC_BTC

As you can see printed indicators tells me that there was res_plus_di, res_minus_di and res_roc at 17.7, 25.9 and -3% in 1/10/2020, respectively. When you check the chart you can see these values at the candle from 1/09/2020. So shifted by one into the past.
I do not know if this is a purpose, mistake or I did code something wrong.

Please could you advise how to shift these values to their proper candle?

@xmatthias xmatthias transferred this issue from freqtrade/freqtrade Jan 19, 2020
@xmatthias
Copy link
Member

I'll move this to the technical repository as the problem is there, not with freqtrade itself.

I'll have a look at this later tonight - i have a suspicion about where the problem may lie (it's been there before #59, though).

@xmatthias
Copy link
Member

You're right, this was a heavy bug, causing a .shift(-1) - but in a slightly hidden way.

It's now solved in #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants