-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
KVO gives NaN value when close = low = high #92
Comments
If you look at the formula for KVO here https://tulipindicators.org/kvo you'll notice that there is a divide by zero in the case where high = low, hence the NAN. I'll need to study the code and change it so the behavior matches what happens in the limit. Thanks for bringing this to my attention. |
I noticed this behaviour as well. Any updates on this @codeplea ? |
@cdohotaru Tradingview differs an a lot of stuff. It really just depends on the indicator. I don't consider TV to be an authoritative source. All of the indicators in TI are implement from their original descriptions, whenever possible. |
@codeplea OK, thanks for the reply. |
Hi, when using KVO,
if the close = low = high, it throws a NaN value (I'm using the Node version of this) and then never recovers. i.e. all proceeding values also become NaN.
example is:
{ "symbol": "vxx", "timestamp": "2020-02-19T12:18:00-05:00", "tradingDay": "2020-02-19", "open": 13.565, "high": 13.565, "low": 13.565, "close": 13.565, "volume": 400 }
changing it to
{ "symbol": "vxx", "timestamp": "2020-02-19T12:18:00-05:00", "tradingDay": "2020-02-19", "open": 13.565, "high": 13.566, "low": 13.565, "close": 13.565, "volume": 400 }
fixes it.
The text was updated successfully, but these errors were encountered: