technicalindicators icon indicating copy to clipboard operation
technicalindicators copied to clipboard

Looks like most of indicator calculation is wrong.

Open dipankar08 opened this issue 3 years ago • 8 comments
trafficstars

I have tried to use this indicator and I found significant different the actual value and the values provided by this indicator module. Looks like RSI, PSAR, MACD proving the wrong results. ( while examine with talib, tradingview ). I see only SMA is working as expected.

I think the libs is not yet ready for prod usecase.

dipankar08 avatar Dec 30 '21 01:12 dipankar08

I have tried to use this indicator and I found significant different the actual value and the values provided by this indicator module. Looks like RSI, PSAR, MACD proving the wrong results. ( while examine with talib, tradingview ). I see only SMA is working as expected.

I think the libs is not yet ready for prod usecase.

I believe the same, I was using a library that depends on this one and the results are off and only sma and ema are working

da7a90 avatar Jan 06 '22 21:01 da7a90

Since the calculation is based on historical data and serially, to have an accurate result, the number of input candles must be increased to 1000. :)

moshtaghi avatar Jan 11 '22 19:01 moshtaghi

Since the calculation is based on historical data and serially, to have an accurate result, the number of input candles must be increased to 1000. :)

I agree with his statement. I use this library and use over 1000 candles. The calculations match exactly with my charts on the TD Ameritrade ThinkorSwim platform.

rlmomin avatar Jan 14 '22 17:01 rlmomin

Yes, I also agree. I've used most of the indicators in this library and I still don't find any errors in the value. You should give more input data in order for the calculations to be accurate

rishikesh2003 avatar Jan 16 '22 07:01 rishikesh2003

Confirmed. it's the sample set size. For ema interval 50, I took history of 200 points and it showed correct value. If I take only 51 or so, it shows incorrect EMA calculation.

DroidBoyJr avatar Oct 14 '22 19:10 DroidBoyJr

it's a good library, where most indicators seem to be working correctly.

it is true that giving all candles/data works for some indicators like RSI and MACD(for SMA only) but not for all, or at least I see an issue with MACD(EMA based) even after feeding with all the candle/data as input, looks like EMA isn't working properly, are there any inputs to fix this issue?

saru2020 avatar Nov 20 '22 14:11 saru2020

i feed 500 continuous candles to calculate Stochastic Oscillator, sometimes it looks good(still a little deviation), but it looks ridiculous in next second. only the last candle is realtime updating, how does it make such huge difference?

{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.11111111111111, d: 37.16962962962969 }
{ k: 11.122222222222275, d: 37.17333333333341 }
{ k: 11.122222222222275, d: 37.17333333333341 }
{ k: 11.122222222222275, d: 37.17333333333341 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }
{ k: 77.77777777777779, d: 59.391851851851904 }

liesauer avatar Jun 15 '23 08:06 liesauer

i don't think it's the data samples issue.

image

liesauer avatar Jun 15 '23 09:06 liesauer