Closed froggleston closed 9 months ago
https://github.com/mkajnar/HighProfitStrategy/blob/main/HPStrategyV7.py#L68 is classic lookahead. You can't call max() on full series in backtesting - it'll use future data.
Using a pre-existing heiken calculation like qtpylib.heikenashi would remove the issue, and I doubt the existing strategy backtesting performance would remain.
qtpylib.heikenashi
Thanks for advices. :)
Reworked :)
https://github.com/mkajnar/HighProfitStrategy/blob/main/HPStrategyV7.py#L68 is classic lookahead. You can't call max() on full series in backtesting - it'll use future data.
Using a pre-existing heiken calculation like
qtpylib.heikenashi
would remove the issue, and I doubt the existing strategy backtesting performance would remain.