Jake0303 / RobinHood-RSI-Trading-Bot

A Robinhood stock trading bot in Python using the RSI indicator https://youtu.be/kSLkRXY3NPQ
208 stars 115 forks source link

Incorrect RSI #4

Closed HaxOh closed 4 years ago

HaxOh commented 4 years ago

Getting strange RSI results. This is on AMD 5 min candles on 7/28/2020. The RSI on Robinhood web and ToS are staying pretty close to 50. Getting wild swings from the bot though, from 0-29. Support and Resistance look to be working correctly.

Getting historical quotes
Current Support is : 
69.58
Current Resistance is : 
69.58
Current Resistance is : 
69.65
Current Support is : 
69.475
Current Support is : 
69.245
Current Support is : 
69.175
Buying RSI is below 30!
[14.7826087]
Getting historical quotes
Current Support is : 
69.63
Current Resistance is : 
69.63
Current Support is : 
69.475
Current Support is : 
69.2967
Current Support is : 
69.26
Current Support is : 
69.175
Current Support is : 
69.12
[0.]
Getting historical quotes
Current Support is : 
69.475
Current Resistance is : 
69.475
Current Support is : 
69.245
Current Support is : 
69.175
Current Support is : 
69.12
Resetting support and resistance
Current Support is : 
69.09
Current Resistance is : 
69.09
[3.61445783]
Getting historical quotes
Current Support is : 
69.245
Current Resistance is : 
69.245
Current Resistance is : 
69.26
Current Support is : 
69.175
Current Support is : 
69.07
Resetting support and resistance
Current Support is : 
69.09
Current Resistance is : 
69.09
Current Support is : 
69.06
[13.7254902]
Getting historical quotes
Current Support is : 
69.26
Current Resistance is : 
69.26
Current Support is : 
69.175
Current Support is : 
69.07
Resetting support and resistance
Current Support is : 
69.09
Current Resistance is : 
69.09
Current Support is : 
69.06
Current Support is : 
69.03
[7.40740741]
Getting historical quotes
Current Support is : 
69.175
Current Resistance is : 
69.175
Current Support is : 
69.12
Resetting support and resistance
Current Support is : 
69.09
Current Resistance is : 
69.09
Current Support is : 
69.06
Current Support is : 
69.03
Current Support is : 
68.9166
[0.]
Getting historical quotes
Current Support is : 
69.12
Current Resistance is : 
69.12
Resetting support and resistance
Current Support is : 
69.09
Current Resistance is : 
69.09
Current Support is : 
69.06
Current Support is : 
69.03
Current Support is : 
68.9166
[29.07949791]

Got stopped out after copying this log, the bot reported an 89 RSI when Robinhood and ToS were reporting 60.

HaxOh commented 4 years ago

Oh, duh. setting rsiPeriod to 14 to be in line with robinhood and ToS corrected this issue.