I keep getting an error:
RSI is greater then 53
87 | 23:27:57: Runtime Error: TypeError : unindexable object at OnData in main.py:line 41
TypeError : unindexable object (Open Stacktrace)
I am not sure why this error is coming up. I tried a search on Google, but just can't figure this one out.
Here is the snippet of code that is causing the issues:
### Long Entry
if self.rsi.Current.Value < 10 and self.Portfolio["GBPUSD"].Invested <= 0:
if data.QuoteBars["GBPUSD"].Close >= self.sma.Current.Value:
self.MarketOrder("GBPUSD", 1000) ###The error happens on this line per backtest error###
self.Debug("Market order was placed")
if self.rsi.Current.Value > 53:
self.Debug("RSI is greater then 53")
self.Liquidate()