-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Lockaheaad methods #34
Comments
Hello, Can you please provide more information on this? Thank you, |
@joshyattridge I've noticed, that you are using "future" shifts inside indicators, instead shifting shapes while plotting. For ex. when calculating fvgs. |
@snussik, Thank you for your input, although you should only provide the candles you want the indicator to show. If you don't pass future candles then my indicators can't have a look ahead bias. |
@joshyattridge I think that you are wrong with that: as indicator always needs one future candle, during live plotting it'll never have it to make calculations. So you'll never see any data on the chart. If only you shift live data by that one or two candles to the left (.rolling()). But that means, that you are always left behind market on these candles. |
hi @snussik @joshyattridge. According to freqtrade lookahead bias detection swing_high_low calculation has lookahead bias issue. `import numpy as np class lookahead(IStrategy):
`
I worked on this but i couldnt get rid of bias. As you know almost all other classmethods depends on swing_high_low calculations. Can you check it and show me the way how to fix. Thanks |
@Asite06 That is expected behavior, just shift it.
|
Th
Sadly my solution is wrong. I don't think there is a way to fix it. Too many lookahead and modify past value issues just in swing_highs_lows function. |
Hi @Durden-T |
@Durden-T I think that the whole code base should be refactored to void lookahead methods. It's not just shifts. Smt. like this: pip_range = (max(ohlc["high"]) - min(ohlc["low"])) * range_percent takes into account the whole range. |
If using
.shift(-X)
andSeries[+X]
, your inicaators take into account future candles data.The text was updated successfully, but these errors were encountered: