-
-
Notifications
You must be signed in to change notification settings - Fork 967
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
something like this #311
something like this #311
Conversation
test_py37 Errors with coverage Errors cuz of new nans behaviour I guess... Well, This new behaviour is correct one, so ... You can just delete everything, but use this CORRECT indicator That's main thing |
seems like pylint error, not my. Well, I tried to do it in |
Hey @Groni3000, Thanks for your efforts on this indicator. Don't worry about the linter bugs. Can you add some tests to the code? |
@bukosabino, sorry it took so long, didn't have time at all. Glanced into your test folder, tried to make tests in your style. Didn't even try to understand what's going on in integration folder, seems like it's supposed to be automated. In unit tests I added new class and some tests for unsmoothed and smoothed versions. Though I didn't really understood why are you doing two tests... Function indicator (1st test) creates class Indicator and runs method, 2nd test uses created class Indicator and test just runs method... Seems like duplicated test for me. And I changed VPT as I saw it in definitions mentioned in links (added them too in docs, I tried to write briefly and informatively). Hope it will be helpful! P.S. What is test_py37 at all? CircleCI doesn't even open for me xDD Maybe I'm supposed to sign in first... Though I dont think I've created acc there long time ago, but still was able to read what kind of error it is. |
And, btw, I couldn't find anything about VPT (or PVT on TradingView) on https://stockcharts.com/ to insert it in docs. |
Embarrassing for me =) Lsp doesn't work and I was coding at 2 AM — these are my excuses xDD |
Hi @Groni3000, Congratulations on your work! Your problem was related to linters (isort and pylint). I have solved it for you: #330 The volume price trend indicator is now fixed and it is included in the latest version v0.11.0. |
@bukosabino, thank you very much! |
I fixed this indicator. It was completely wrong.
Important things:
dropnans
is not True OR you can specifyself._check_fillna(self._vpt, value=-1)
instead ofvalue=0
to make it bfill, but I would not recommend it. Therefore it returnsself._vpt
with propertyself._vpt.shape[0] <= self.close.shape[0]
.smoothing_factor
like in TradingView implementation of this indicator. But it's not used by default (like in pure definition of this indicator).