-
Notifications
You must be signed in to change notification settings - Fork 2k
initial RSI values are calculated wrong #2583
Comments
How did you get the values from Zenbot? I can't see the RSI in the simulation results. |
Using the RSI indicator, is that what you are asking? |
No I meant the actual RSI values. You say they are wrong, but where do you get to see that wrong number? The simulation does not put out RSI values - at least for me. |
https://github.com/DeviaVir/zenbot/tree/unstable/docs#reading-the-console-output
A segunda, 28/12/2020, 09:01, XL-Reaper <notifications@github.com> escreveu:
… No I meant the actual RSI values. You say they are wrong, but where do you
get to see that wrong number? The simulation does not put out RSI values -
at least for me.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF6776BYBNZWUOZ5ZYCXAX3SXBCOTANCNFSM4VK7TF7Q>
.
|
https://en.wikipedia.org/wiki/Thank_You So you actually just have to enable verbose output to see these. |
Sorry, yes, that's right, you need to enable verbose output and they are shown in one of the columns. |
I'm comparing Kraken XBT - USD https://www.tradingview.com/chart/?symbol=KRAKEN%3AXBTUSD 5M Period between 2020-12-28 08:15:00 - 2020-12-28 08:35:00 2020-12-28 08:15:00 26797.00 XXBT-ZUSD -0.28% 118 --- 34.35 -0.00192 0.0000 34.35 0.005 |
I'm using Binance but with TradingView graphs also. |
I run from docker: If I change the file, the results (at least in that timeframe that I mentioned) don't change for me |
Thank you. I think I know where the "problem" is. Trend_ema uses a min_periods value of 52, which give RSI enough old data to converge to right values after many periods as I said. |
Even with the command you suggested the RSI values don't change for me. |
Merged your PR (thanks for contributing that!), good to close this? |
Took me a while to notice we were on different time zones hahaha. |
Cool! Thank you for taking your time to check it. |
Comparing RSI indicator values with Binance exchange, I've realized they were wrong. Debugging RSI indicator code, I've found the initial calculation (when the sum of gains and losses is made) is handled incorrectly as it uses the values from s.loopback array that are in reversed time order, so it is considering every gain as a lose and viceversa.
Reversing the array fixes the problem, I'll commit the fix soon.
The text was updated successfully, but these errors were encountered: