-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bug in overlap pivots #690
Comments
ok I realized that the therefore lines 183-192 of pivots.py is like this: if freq is not anchor:
df = DataFrame(
data={
"open": open_.resample(anchor).first(),
"high": high.resample(anchor).max(),
"low": low.resample(anchor).min(),
"close": close.resample(anchor).last()
}
)
df.dropna(inplace=True) |
Hi @smhoma,
Awesome you were able to isolate and solve the issue for your use case! 😎 Understandable if you did not want to make a PR so as not to make a breaking change. I'll do it and take the hit. 🤣 If it does cause issues, we can designate a keyword argument name to run Kind Regards, |
Which version are you running? The lastest version is on Github. Pip is for major releases.
I am using python 3.10 and pandas_ta 0.3.91b0.
Do you have TA Lib also installed in your environment?
yes
*Describe the bug
I was working with forex daily data and I figured out that the pivots indicator has issue in calculating pivot points of Mondays based on Fridays and it returns NaN for pivots of Mondays. I think that with the default 'D' anchor, for Mondays, the code is looking for Sunday data which does not exist since its weekend in Forex market, instead of using data of Friday, which is the last trading day in Forex market.
I used anchor 'B' too, but i got this error:
Screenshots
Thanks for using Pandas TA!
The text was updated successfully, but these errors were encountered: