Comments (6)
Added and released as v0.3.0 😄
from umbrella.
Please use v0.3.1 instead...
from umbrella.
I use version "^0.3.1"
const chartDataMACD = Array.from(tx.iterator(stats.macd(fastPeriod, slowPeriod, signalPeriod), closeArray));
console.log('Length MACD: ' + chartDataMACD.length);
console.log('Length data: ' + closeArray.length);
result (with fast: 12, slow: 26, smooth: 9):
Length MACD: 52252
Length data: 52285 (expected: 52252 +26 -1 = 52277)
Can you check this problem? I think the MACD is being miscalculated.
from umbrella.
Hey @sy92th - did you read the docs?
https://github.com/thi-ng/umbrella/blob/master/packages/transducers-stats/src/macd.ts#L34
You didn't take into account the 2nd moving average smooth
applied to difference between the fast
and slow
ones. That's why the total lag of the indicator is slow + smooth - 2
...
52285-(26+9-2) = 52252
from umbrella.
Also see here: https://en.wikipedia.org/wiki/MACD#/media/File:MACDpicwiki.gif
from umbrella.
Ahh I'm wrong. So sorry
from umbrella.
Related Issues (20)
- [shader-ast] Dependency for ternary operators, while and for loop HOT 1
- [shader-ast] Array texture types are missing HOT 1
- [shader-ast] Missing matrix types HOT 1
- [shader-ast] Better design for `defn` with anonymous qualified arguments HOT 7
- [malloc] Multi-threaded allocations HOT 4
- Prototype Pollution vulnerability affecting @thi.ng/paths, versions <=5.1.62 HOT 7
- [hiccup-canvas] "packedPolyline" needs separate implementation or packedPoly needs to accept stride options?
- [color] ? [binary] Comparison with -0 using the "===" operator will also match 0 [equals-negative-zero] HOT 2
- RDMS based on rstream-query HOT 1
- [examples] Issue running the examples (failed to resolve entry for package) HOT 3
- [hiccup-svg] hiccup-svg's attributes don't seem to handle rstream HOT 7
- [rstream] error when using skypack build HOT 5
- [geom-accel] SpatialGrid2 hangs runtime when using `set` method HOT 3
- Polygons with holes? HOT 9
- [shader-ast] "Building a shader graph editor (WebGL, shader AST transpiler, UI)" HOT 2
- [rdom] Issue understanding $klist HOT 4
- [geom] update polymorphic function signatures to provide better return types HOT 1
- [atom & rstream] Asking for advice on good practices
- [rdom] SVG el add class > Uncaught (in promise) TypeError HOT 1
- [rdom] Error: illegal state: operation not allowed in state 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umbrella.