Comments (4)
Also for protections you'll have the same issue (repainting) - so the moment you use ANY other value than open (also through an indicator) - you'll think backtesting works great - but it doesn't work well on live. If you use it as signal or protection does not change the matter.
The function will not be changed to allow looking into the future.
You're obviously free to use a plain "merge" in your strategy (noone forces you to use this method to merge the dataframe back), and no one will prevent you from implementing fake backtest results.
As a library / framework, we'll however try hard to protect people from accidentally doing this - therefore we'll try to design as much as possible to protect from this.
This also includes no option to "enable backtest cheating" - which this option would effectively be.
from technical.
I answer myself...
maybe I still don't understand what is explained in:
freqtrade/freqtrade#4073
but I consider that this way it works correctly because I haven't got delay in the indicators.
please let me know if it is necessary to create a PR.
from technical.
it's pretty dangerous to compare screenshots with screenshots of tradingview without further information.
Tradingview is known to easily allow repainting - (using candle close values before the candle is actually closed - causing the signal to fluctuate) - which is a great way to bump backtest results - but won't work in live.
The change you did above will cause the same exact problem - which will mean that maybe your backtesting results will look great - but the bot will most likely never trade in live.
assuming a 15m / 1h timeframes (for simplicity) - as in freqtrade/freqtrade#4073:
The main point here is to consider that all candle dates are candle open dates.
So a candle 1h candle from 22:00 will go from 22:00-23:00 - and the same 22:00 candle goes from 22:00-22:15.
The candle 22:45/15m
is closed / available at 23:00 - the same goes for the 22:00/1h candle (which also closes at 23:00).
The "modified" date (resample_{resampled_int}_date_merge
) does account for that - while resample_{resampled_int}_date
does not.
Freqtrade will not care which way you do it for backtesting - so your results may look great, as you're looking into the future.
with your "fix": you use data available not before 23:00 (the 1h close) at 22:00.
basically, you use the close value from the candle at 22:45-23:00 at 22:00.
Given, it's a pretty complicated topic, but one we spent several days thinking about (several times, too).
I can be profitable 100% of the time if i know in the morning how today's daily candle will close. Your change would facilitate this - but for live - such a thing will not be possible.
from technical.
Thank you xmatthias for taking the time to answer my question. Now I can understand the purpose of freqtrade/freqtrade#4073
I agree that it is a complicated issue. However, I think it is not useful for 100% of the cases. I want to use it as a protection and not to determine the entry to a trade. So the displacement in a timeframe of 4H or more is a long time of delay.
What is your opinion of this change?
from technical.
Related Issues (20)
- Trend Step Channel - appreciate it HOT 4
- resample_to_interval date shifted HOT 1
- Help with Trend Trader Strategy HOT 1
- ichimoku different value proposal HOT 1
- How to import external data to populate entry/exit trend conditions HOT 14
- Multiple timeframe merge HOT 10
- Laguerre RSI wrong computation HOT 3
- ```crossed``` function throws error with numpy integers
- utils bug HOT 4
- How to plot segtrends or gentrends using freqtrade plot-dataframe ? HOT 1
- Phase Change Index HOT 18
- I try to convert Predictive Ranges [LuxAlgo] to the py, whats the problem? HOT 7
- Involvement of Heikenashi candles could be helpful in trend prediction HOT 1
- Help needed with: AttributeError: 'SSL' object has no attribute 'copy' HOT 3
- warning util.py
- 16 tests failed HOT 4
- Pandas warning when setting fillna(0) on RMI calc HOT 2
- Issues with PMAX indicator HOT 1
- A few Pinescript lines HOT 2
- Error thrown at numpy_rolling_window HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from technical.