RSI Indicator and Real Time Data
-
So I just started using backtrader today and have been following the tutorial and watching videos and I have a couple questions, and I am trying to create a simple RSI bot. My first question is, if I use this code:
self.rsi = bt.indicators.RSI_SMA(self.data.close, period=14)
it returns a tuple....
the documentation isn't very complete, which value is the current value of the RSI? is it say, rsi[0], rsi[1] etc....
my second question is if I wanted to get the real time daily data of the RSI what would I need to do ? is RSI still computed over a 14 day average if I'm looking at the daily data? and if so , which feeds do I need to implement to get the current rsi data?
-
@Walt-Weston said in RSI Indicator and Real Time Data:
it returns a tuple....
it returns the
line
, array - Docs - Platform Concepts - Linesthe documentation isn't very complete, which value is the current value of the RSI? is it say, rsi[0], rsi[1] etc....
documentation is very good, just try to read it. and it clearly gives an answer on your question. latest value is
self.rsi[0]
- Docs - Platform Concepts - Indexing: 0 and -1my second question is if I wanted to get the real time daily data of the RSI what would I need to do ? is RSI still computed over a 14 day average if I'm looking at the daily data?
you need to pass real time price data to
bt
and calculatersi
. If it will be daily bars andperiod
will be 14, than it will be 14 days RSI value.and if so , which feeds do I need to implement to get the current rsi data?
depends on the broker you are going to use for live trading.
bt
has implementation forib
,oanda
andvisual chart
- Docs - Live Trading - Intro -
@ab_trader thank you, answered my questions.
-
@Walt-Weston no problem