Bitvested / ta.js

Financial Technical Analysis in JavaScript
MIT License
142 stars 33 forks source link

Major changes #15

Closed maxah closed 1 year ago

maxah commented 1 year ago

Hello, Developer. I have a suggestion for some changes. I use ta.js and I like it a lot. I am working on trading bots and often test some things on TradingView (TV). So, some indicators in TV are implemented a bit different than in classic version and their values are a bit different. For example RSI and ATR. The calculation is slightly different and uses RMA. I implemented it in my fork, but the classic variant is still available. I made it so: ta.rsi(data, length) - classic calculation, ta.rsi(data, length, 'TV') - TradingView variant. How about this. There are other indicators that can be done as in TV. It would be very cool.

Vultwo commented 1 year ago

Hi, the trading view variant of the RSI is actually the WRSI indicator in ta.js. You can use it using ta.wrsi(data, length); I'll have to look into the ATR calculation. Have you implemented this in your fork too?

maxah commented 1 year ago

Wow... This variety of names is confusing. I should have been more careful when reading the code. No, I haven't done ATR yet, but I was going to. It turns out I tried for nothing.)

maxah commented 1 year ago

image One-to-one

Vultwo commented 1 year ago

Yeah the different names are a pain. Not sure why tradingview would call WRSI RSI. Please don't hesitate to let me know if you discover something new / confusing.