I'm experimenting with plotting a custom indicator in a Jupyter notebook and followed the Custom Indicators example, https://www.quantconnect.com/docs/v2/research-environment/indicators/custom-indicators, verbatim but I receive the following TypeError,
TypeErrorTraceback (most recent call last) <ipython-input-24-8c5d09adce7b> in <module> 1 for time, row in history.iterrows(): 2 # The Update method's input must be IBaseData object (Tick, TradeBar, QuoteBar). ----> 3 bar = TradeBar(time, symbol, row.open, row.high, row.low, row.close, row.volume) 4 custom.Update(bar) 5 TypeError: No method matches given arguments for .ctor: (<class 'tuple'>, <class 'QuantConnect.Symbol'>, <class 'numpy.float64'>, <class 'numpy.float64'>, <class 'numpy.float64'>, <class 'numpy.float64'>, <class 'numpy.float64'>)@@
Is the example outdated and/or how do I correct?
Louis Szeto
Hi Alpha23
We cannot reproduce your problem. Are you following all steps in the whole tutorial? Did you overwrite some variables and cast them into other types? If this problem persists, please attach codes or a backtest with a jupyter notebook for further assistance.
Best
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Alpha23
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
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!