Hello. I'm trying to preload an ichimoku indicator with past history using the History function, but I get this runtime error.
Runtime Error: NotSupportedException : IchimokuKinkoHyo does not support Update(DateTime, decimal) method overload. Use Update(IBaseDataBar) instead.
I can't work out how to turn the history output into a IBaseDataBar in Python. I'm using forex data.
self.security = security
self.ichimoku = IchimokuKinkoHyo(security.Symbol, tenkan_period,
kijun_period, senkouA_period, senkouB_period,
chikou_period, chikou_period)
# Populate the Ichimoku with past history
history = algorithm.History(security.Symbol, self.ichimoku.WarmUpPeriod, resolution)
for index, row in history.loc[security.Symbol].iterrows():
algorithm.Debug(f'Populating history {index} {row["close"]}')
self.ichimoku.Update(index, row["close"]) # RUNTIME ERROR
I read in a previous reply to the forum that I just needed to change the last line to self.ichimoku.Update(row), however I then get the following error
Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the Update method. Please checkout the API documentation. TypeError : No method matches given arguments for Update (Open Stacktrace)
Can anyone help?
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!