Comments (7)
@maheshlnties i have to study it first before i can implement the indicator, you may also create a PR on this, it would be a great help 👍
from trady.
@maheshlnties thanks for the formula, i will take a look of it. It seems we need to implement WMA first, and then HMA based on WMA. I will try to implement it this weekend maybe.
from trady.
@maheshlnties I find there's some possible reasons for the difference when i was implementing the indicator:
-
If input period is an odd number, what number should be used when using "period / 2" in calculation step 1, should we use the flooring integer or ceiling integer? In my implementation, i have used the flooring one.
-
Same decision happens in step 3, if sqrt(n) is not a whole number, should the sqrt-ed number round-up or round-down? I have used the round-down approach.
I would suspect that the correct one should be some combination of the above 2 cases.
from trady.
I have tried implementing, but i am not getting exact values though. HMA is a derivative calculation from WMA.
Calculation:
- Calculate a Weighted Moving Average with period n / 2 and multiply it by 2
- Calculate a Weighted Moving Average for period n and subtract if from step 1
- Calculate a Weighted Moving Average with period sqrt(n) using the data from step 2
HMA= WMA(2*WMA(n/2) − WMA(n)),sqrt(n))
from trady.
@maheshlnties Both the weighted moving average & hull moving average has been implemented. Please help to check if the calculated value is correct.
from trady.
@lppkarl Thanks a lot for your awful effort. Very much appreciated :) WMA works perfect. But HMA I verified values against other brokerage charting tools, it has some slight deviation in values. Even I encountered into same problem when i tried implementing on my own. I am not sure what are we missing here in HMA.
from trady.
@lppkarl Excellent!! Using ceiling integer in step 1 is giving exact values. Thanks a lot once again :)
from trady.
Related Issues (20)
- Transforming Data issue HOT 1
- Not getting expected CCI values HOT 3
- update problem HOT 3
- Kst indicator
- commodity channe lindex incorrect value
- Minute to hour transformation: failure HOT 3
- Rule bug?
- Performance when computing single indexes on RSI with large datasets HOT 2
- How to correctly call and compute indicators HOT 1
- Library incompatible w/ newer versions of CsvHelper HOT 6
- Volume Profile Indicator HOT 1
- Takes Too Long To Get Data From Importer HOT 1
- Need Help With Custom Importer HOT 11
- Indicator on Indicator 'TInput TOutput not matched' HOT 1
- TransformToCandles<Daily> Return repeated days
- Trady for crypto - Node.js
- AccumulationDistributionLine<TInput,TOutput> constructor is protected and cannot be instanciated!
- Performance issues with 2000 candles & Backtesting
- Error occured using trade
- How to import trades
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 trady.