Title: MACDIndicatorValue has histogram and signal values reversed · Issue #517 · massive-com/client-python · GitHub
Open Graph Title: MACDIndicatorValue has histogram and signal values reversed · Issue #517 · massive-com/client-python
X Title: MACDIndicatorValue has histogram and signal values reversed · Issue #517 · massive-com/client-python
Description: Describe the bug The MACDIndicatorValue object create in response to python API call get_macd() has its histogram and signal values reversed. It appears the from_dict() deserializer either uses wrong labels or the variable assignment is ...
Open Graph Description: Describe the bug The MACDIndicatorValue object create in response to python API call get_macd() has its histogram and signal values reversed. It appears the from_dict() deserializer either uses wro...
X Description: Describe the bug The MACDIndicatorValue object create in response to python API call get_macd() has its histogram and signal values reversed. It appears the from_dict() deserializer either uses wro...
Opengraph URL: https://github.com/massive-com/client-python/issues/517
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MACDIndicatorValue has histogram and signal values reversed","articleBody":"**Describe the bug**\r\nThe MACDIndicatorValue object create in response to python API call get_macd() has its histogram and signal values reversed. It appears the from_dict() deserializer either uses wrong labels or the variable assignment is incorrect.\r\n\r\n**To Reproduce**\r\nAs an example the most recent MACDIndicatorValue returned by the call\r\n\r\n client = RESTClient(api_key=“….”)\r\n client.get_macd(ticker=“DBC”, timestamp_lte=\"2023-09-16\", timespan=“week”, short_window=4, long_window=13, \r\n signal_window=8, series_type=\"close\")\r\n\r\nis \r\n MACDIndicatorValue(timestamp=1694318400000, value=0.6858891541204777, signal=0.23005417069090606, \r\n histogram=0.4558349834295716)\r\n\r\nComparing with the values returned by a similar call to MACD with the same parameters in TradeView which yield:-\r\n hist (histogram) = 0.2301\r\n macd (value) = 0.6859\r\n signal (signal) = 0.4558\r\n\r\nAppears polygon has swapped its returned histogram and signal values. This, on the surface is confirmed by looking at the code\r\nWith respect to tag v1.12.4\r\nFile client-python/polygon/rest/models/indicators.py \r\nLine 34 \u0026 35\r\n signal=d.get(\"histogram\", None),\r\n histogram=d.get(\"signal\", None),\r\n\r\n**Expected behavior**\r\nWould expect the returned MACDIndicatorValue object in this situation to be :-\r\n\r\nMACDIndicatorValue(timestamp=1694318400000, value=0.6858891541204777, histogram=0.23005417069090606, signal=0.4558349834295716)\r\n\r\n**Screenshots**\r\nNone\r\n\r\n**Additional context**\r\nNone\r\n\r\n","author":{"url":"https://github.com/ibcodemonkey","@type":"Person","name":"ibcodemonkey"},"datePublished":"2023-09-17T12:30:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/517/client-python/issues/517"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0929e397-7c35-02d8-7c3e-fb9ecb0d453a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E194:DA997:106A925:16086AD:6A4D8D6E |
| html-safe-nonce | d08d995cf72edc4e3eeeb90ffeb6c2c19d18aae9eda1b08465668c66026590dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTk0OkRBOTk3OjEwNkE5MjU6MTYwODZBRDo2QTREOEQ2RSIsInZpc2l0b3JfaWQiOiI3MzE4MzI5MjIyNzk5MTM0MDYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 72466adce2f91d36211ecabb53ccd19d83093a0cbfc53b287788651592a96f36 |
| hovercard-subject-tag | issue:1899768052 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/massive-com/client-python/517/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d587a4b4287503a5b3671b4ad7452269ec1db5068ca028782f01edc57caa3acc/massive-com/client-python/issues/517 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d587a4b4287503a5b3671b4ad7452269ec1db5068ca028782f01edc57caa3acc/massive-com/client-python/issues/517 |
| og:image:alt | Describe the bug The MACDIndicatorValue object create in response to python API call get_macd() has its histogram and signal values reversed. It appears the from_dict() deserializer either uses wro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ibcodemonkey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| turbo-cache-control | no-preview |
| go-import | github.com/massive-com/client-python git https://github.com/massive-com/client-python.git |
| octolytics-dimension-user_id | 191946194 |
| octolytics-dimension-user_login | massive-com |
| octolytics-dimension-repository_id | 216660192 |
| octolytics-dimension-repository_nwo | massive-com/client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 216660192 |
| octolytics-dimension-repository_network_root_nwo | massive-com/client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width