Comments (4)
You got me convinced! :) I will take a look and update the calculation here.
from indicator.
Hi! So sorry for my very late response. I was on a trip, and just had a chance to take a look at this. First of all, thank you very much for taking the time to write such a descriptive bug report. Very much appreciated definitely.
I looked at your calculations document, and I noticed that on Column F, you are calculating the SMA with =SUM(D3:D16)/14 but afterwards, you are using =((F16*13)+D17)/14 for the remaining rows. I guess that is the reason for the difference in the results.
I copied your calculations document, and added the columns J and K to calculate the SMA through the =SUM()/14 method, and I was able to get results aligned with the ones calculated by the page at rows 92 to 101.
Could you take a look? I hope it didn't miss anything.
https://docs.google.com/spreadsheets/d/1e3r1mBAQNXd3yI2l-CiEls0Pfn3mRGv_jxTVJ8kNT9Q/edit?usp=sharing
from indicator.
@cinar Thanks for responding!
you are calculating the SMA with =SUM(D3:D16)/14 but afterwards, you are using =((F16*13)+D17)/14 for the remaining rows
The logic here is that on the 15th closing I calculate the average of the previous 14 values, after that, I calculate the weighted average using =((F16*13)+D17)/14
.
I would be glad to take a look if you allow the document for reading :)
from indicator.
@cinar Looks like I found the answer, to why my calculations are the same as on the Binance but differ from those provided by this library.
The Binance exchange uses the TradingView plots. If we take a look at the TradingView RSI documentation we will see, that in their RSI formula they use the Rolling Moving Average:
which in its turn has exact the same formula that I used in my calculations (screenshot is taken from here):
While in this library for the RSI calculation the Simple Moving Average is used.
During my further research, I found out, that the first average gain and all subsequent should be calculated slightly differently. Here's what I found on the stockcharts.com:
The same is told on quantinsti.com:
Not an expert, but it's clear to me that the current RSI implementation differs a bit.
What do you think about it?
from indicator.
Related Issues (20)
- Bollinger Bands standard deviation calculation is different from other implementations HOT 5
- Rename Std to StdFromSma and have a Std function without the Sma provided HOT 1
- Vwma indicator HOT 2
- projectionOscillator returns values less than 0(minimum), and returns values grater than 100(maximum)
- Restructure Candlestick HOT 1
- StochasticOscillator returns NaN for D HOT 4
- Aroon Indicator HOT 2
- Why is volume an []int64 and not []float64 ? HOT 6
- Getting invalid SMA's
- Add Generator support for streams
- Setup dependabot
- Dependabot for GitHub actions.
- Implement the Larry Connors the 2-period RSI strategy #69
- (CRT-P0003) Function params involve heavy amount of copying
- Enable the Go Report Card Badge.
- Enable Coveralls Test Coverage Badge.
- Check if codecov is better.
- Remove the Coveralls from the travis configuration.
- Go Report Card warning: "substract" is a misspelling of "subtract" (misspell)
- Replace Travis CI with GitHub Actions.
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 indicator.